You cannot avoid capital gains tax entirely, but you can reduce what you owe

Capital gains tax is owed on the profit you make when you sell an investment or property for more than you paid for it. You cannot legally eliminate this tax, but several strategies let you defer it to a later year, reduce the amount you owe in a given year, or move gains into a lower tax bracket. The most common approaches involve timing your sales, using tax-loss harvesting, holding assets longer to may have access to for lower rates, and using retirement accounts that shelter gains from tax.

The strategy that works best depends on your income, how long you have held the asset, and whether you have other losses to offset gains. A tax professional can review your specific situation, but understanding the main options helps you make informed decisions about when and how to sell.

Key Takeaways

  • Long-term capital gains (assets held over one year) are taxed at lower rates than short-term gains, so holding an asset longer can significantly reduce your tax bill.
  • Tax-loss harvesting lets you sell investments at a loss to offset gains from other sales in the same year, reducing your total taxable gain.
  • Spreading large sales across two or more years can keep your income lower in each year and may move you into a lower tax bracket.
  • Retirement accounts like 401(k)s and IRAs shelter investment gains from capital gains tax entirely, as long as money stays in the account.
  • Donating appreciated assets to charity avoids the capital gains tax on those assets and gives you a charitable deduction.

Hold assets for more than one year to may have access to for long-term rates

The single largest factor in your capital gains tax is whether you hold the asset for more than one year. Short-term capital gains (assets held one year or less) are taxed as ordinary income at your regular tax rate, which can be 10%, 12%, 22%, 24%, 32%, 35%, or 37% depending on your income. Long-term capital gains (assets held longer than one year) are taxed at preferential rates of 0%, 15%, or 20%, which are substantially lower.

If you are considering selling an investment that you have held for just under one year, waiting a few weeks or months to cross the one-year threshold can save thousands of dollars in tax. For example, a $50,000 gain taxed as short-term at the 24% rate costs $12,000. The same gain taxed as long-term at the 15% rate costs $7,500. The difference is $4,500 just from waiting.

This strategy works only if you can afford to hold the asset longer and if you believe the asset will not drop significantly in value during the waiting period. It is not a reason to hold a losing investment, but it is worth considering when you are on the fence about selling.

Sell losses to offset gains in the same year

Tax-loss harvesting means selling an investment at a loss to offset gains from other sales. If you sell Stock A for a $10,000 gain and Stock B for a $3,000 loss in the same year, your net capital gain is $7,000, and you owe tax only on that $7,000 instead of the full $10,000.

You can harvest losses from any investment account — stocks, mutual funds, bonds, or real estate. The loss must be real (you actually sold at a loss), not just a paper loss. You can carry unused losses forward to future years if your losses exceed your gains in the current year. For example, if you have $5,000 in gains and $8,000 in losses, you can use $5,000 of the loss this year and carry the remaining $3,000 forward to offset gains next year.

One important rule: the wash-sale rule prevents you from buying back the same or a substantially identical investment within 30 days before or after the sale. If you do, the IRS disallows the loss. To avoid this, wait 31 days before repurchasing, or buy a similar but not identical investment in the meantime (for example, a different index fund in the same category).

Spread large sales across multiple years

If you are selling a large asset — a business stake, real estate, or a concentrated stock position — you may be able to spread the sale across two or more years. This keeps your income lower in each individual year and can prevent you from jumping into a higher tax bracket.

Tax brackets are progressive: as your income rises, the rate on each additional dollar increases. If you have a $200,000 gain and you are already in the 24% bracket, that entire gain might be taxed at 24%. But if you sell $100,000 in year one and $100,000 in year two, you might stay in the 22% bracket both years, saving money on the difference. The savings depend on your other income and the specific brackets that year.

Spreading sales also gives you flexibility to harvest losses in years when you have large gains. You can plan which losses to use in which year to minimize your total tax bill over the two-year period.

Use retirement accounts to avoid capital gains tax on investment growth

Money inside a 401(k), traditional IRA, or Roth IRA grows without triggering capital gains tax. You can buy and sell investments inside these accounts as often as you want, and no tax is owed on the gains until you withdraw the money (or never, in the case of a Roth IRA).

This is one of the most powerful tax tools available. If you have $100,000 in a regular brokerage account and it grows to $150,000, you owe capital gains tax on the $50,000 gain when you sell. But if that same $100,000 grows to $150,000 inside a Roth IRA, you owe no tax on the gain, ever, as long as you follow the withdrawal rules.

The downside is that retirement accounts have contribution limits (for 2024, $7,000 per year for an IRA and $23,500 for a 401(k), with higher limits if you are 50 or older). You cannot put unlimited money into these accounts. But if you have the ability to save through a retirement plan, prioritizing it over a regular brokerage account can save substantial tax over time.

Donate appreciated assets to charity instead of selling

If you own an investment or property that has gained significantly in value and you want to give to charity, donating the asset itself (rather than selling it and donating the proceeds) avoids the capital gains tax entirely. You also receive a charitable deduction for the full current value of the asset.

For example, if you bought stock for $10,000 and it is now worth $40,000, you could sell it and owe capital gains tax on the $30,000 gain. Or you could donate the stock directly to a may have access to charity. You avoid the capital gains tax and deduct the full $40,000 as a charitable contribution (subject to the limits on charitable deductions, which vary by income and asset type).

This strategy works best if you have appreciated assets you were planning to sell anyway and you have a charitable cause you support. You must donate to a may have access to charity (the IRS website has a searchable list), and you need a written appraisal for assets worth over $5,000. Your tax professional can help you determine whether the deduction is worth more than the tax you would have paid.

Use installment sales to spread gains across years

An installment sale is when you sell property and the buyer pays you over time in installments rather than all at once. You report the gain proportionally as you receive each payment, which spreads the tax liability across multiple years.

This is most common in real estate sales. Instead of selling a property outright, you might finance it yourself and have the buyer make payments over five or ten years. You report a portion of the gain each year as you receive payments, rather than reporting the entire gain in the year of sale.

Installment sales are complex and have specific IRS rules about interest rates and documentation. They work best when you are selling to a buyer you trust and when spreading the gain across years will meaningfully lower your tax. A tax professional or real estate attorney should review the terms before you proceed.

Frequently Asked Questions

Can I avoid capital gains tax by not selling?

Yes. As long as you hold an investment, no capital gains tax is owed, even if it has grown significantly in value. Tax is owed only when you sell. This is why some people hold appreciated assets for decades — they defer the tax indefinitely. However, if you need the money or want to rebalance your portfolio, deferring forever is not always practical.

What if I have more losses than gains in a year?

You can use up to $3,000 of net capital losses to offset ordinary income in a single year. Any losses beyond that carry forward to future years, where you can use them to offset future gains or additional ordinary income. This means a year with large losses can actually lower your overall tax bill.

Does the step-up in basis explore to me?

A step-up in basis is a rule that resets the cost basis of inherited assets to their value on the date of death. If your parent bought stock for $10,000 and it is worth $100,000 when they die, your cost basis becomes $100,000, not $10,000. You owe no capital gains tax if you sell when ready. This applies to inherited assets only, not gifts received during someone's lifetime.

Can I deduct capital losses against my regular income?

Yes, but only up to $3,000 per year. If your capital losses exceed your capital gains by more than $3,000, you can use $3,000 to reduce your ordinary income (wages, salary, interest, etc.). The remaining losses carry forward to future years.

What is the difference between a capital gain and a dividend?

A capital gain is profit from selling an asset for more than you paid. A dividend is a payment a company makes to shareholders from its profits. may have access to dividends are taxed at the same preferential rates as long-term capital gains (0%, 15%, or 20%), but they are reported separately on your tax return and are not subject to the wash-sale rule.