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

Capital gains tax is owed when you sell an asset for more than you paid for it. The difference between what you paid and what you sold it for is your gain, and that gain is taxable income. There is no legal way to sell an asset at a profit and pay zero tax on it — but there are several legitimate strategies that lower your tax bill or defer it to a later year.

The most common approaches involve timing your sales, using tax-advantaged accounts, offsetting gains with losses, and holding assets long enough to may have access to for lower tax rates. Each strategy has specific rules about how and when you can use it, and some depend on your income level or how long you have owned the asset.

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 reduce your tax bill significantly.
  • You can offset capital gains by selling investments at a loss in the same year, a strategy called tax-loss harvesting.
  • Certain accounts like IRAs and 401(k)s allow you to buy and sell investments without triggering capital gains tax until you withdraw the money.
  • Donating appreciated assets to charity instead of selling them lets you avoid the capital gains tax entirely while getting a charitable deduction.
  • The step-up in basis rule means heirs inherit assets at their current market value, erasing the original owner's capital gains tax liability.

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

The IRS taxes short-term capital gains (assets held one year or less) as ordinary income, which means they are taxed at your regular income tax rate — potentially as high as 37 percent. Long-term capital gains (assets held longer than one year) are taxed at preferential rates: 0 percent, 15 percent, or 20 percent depending on your total income for the year.

The difference is substantial. If you sell a stock after holding it for 13 months instead of 11 months, you might move from a 37 percent tax rate to a 15 percent rate on the same gain. This is one of the most straightforward ways to reduce your tax bill — you simply wait before selling.

The holding period starts the day after you purchase the asset and ends on the day you sell it. If you buy on January 15 and sell on January 16 of the following year, that counts as long-term. If you sell on January 15, it is short-term.

Offset gains by selling investments at a loss in the same tax year

Tax-loss harvesting means selling an investment that has declined in value to create a loss, then using that loss to cancel out capital gains from other sales. If you sold a stock for a $5,000 gain and sold another for a $3,000 loss in the same year, you would owe tax on only $2,000 of gain.

You can also use losses to offset up to $3,000 of ordinary income in a single year. If your losses exceed your gains by $8,000, you can deduct $3,000 against your salary or other income, and carry the remaining $5,000 forward to future years to use against future gains or income.

The IRS has a rule called the wash-sale rule that prevents you from immediately buying back the same or substantially identical investment after selling it at a loss. If you sell a stock at a loss and buy the same stock again within 30 days before or after the sale, the loss is disallowed. You can buy a similar but not identical investment (like a different fund tracking the same index) to stay invested while preserving the loss.

Use tax-advantaged retirement and investment accounts

Money inside a traditional IRA, 401(k), or 403(b) grows without triggering capital gains tax each year. You can buy and sell investments within these accounts as often as you want, and no tax is owed until you withdraw the money in retirement. This means you can realize gains, reinvest them, and compound your money without any annual tax drag.

A Roth IRA or Roth 401(k) goes further: money grows tax-free, and may have access to withdrawals in retirement are not taxed at all. If you sell an investment at a gain inside a Roth account, that gain is never taxed, even when you withdraw it decades later.

529 college savings plans work the same way for education expenses. Gains are not taxed as long as the money is used for may have access to education costs like tuition, room and board, or books. If you withdraw money for non-education purposes, the gains portion is taxed plus a 10 percent penalty.

Contribution limits apply to these accounts. For 2024, you can contribute $7,000 per year to a traditional or Roth IRA (or $8,000 if you are 50 or older). 401(k) limits are higher — $23,500 per year ($31,000 if 50 or older). 529 plans have no annual contribution limit, but gifts over $18,000 per person per year may trigger gift tax reporting.

Donate appreciated assets to charity instead of selling them

If you own stock, real estate, or other property that has increased in value, you can donate it directly to a may have access to charity and avoid the capital gains tax entirely. You also receive a charitable deduction equal to the current market value of the asset — not just what you paid for it.

Example: You bought stock for $10,000 that is now worth $40,000. If you sell it, you owe capital gains tax on the $30,000 gain. If you donate it to a may have access to charity instead, you owe no capital gains tax and can deduct the full $40,000 as a charitable contribution (subject to income limits on how much you can deduct in a single year).

The charity must be a may have access to organization recognized by the IRS — typically a 501(c)(3) nonprofit. You cannot donate to a private individual or a political campaign and receive this benefit. You will need a written appraisal for donations over $5,000 and must file Form 8283 with your tax return.

Understand the step-up in basis rule for inherited assets

When you inherit an asset, its basis (the value used to calculate future gains) is reset to its market value on the date of the original owner's death. This is called a step-up in basis. If someone bought a house for $200,000 and it is worth $500,000 when they die, their heirs inherit it with a basis of $500,000. If the heirs sell it immediately for $500,000, they owe no capital gains tax.

This rule applies to most assets: stocks, bonds, real estate, and collectibles. It does not apply to certain retirement accounts like IRAs or 401(k)s, which have their own inheritance rules. The step-up happens automatically — heirs do not need to do anything to claim it, but they should keep documentation of the asset's value on the date of death for their records.

This is one reason some people hold appreciated assets until death rather than selling them during their lifetime. The original owner avoids paying capital gains tax, and the heirs inherit the asset with a clean slate.

Use installment sales to spread gains across multiple years

An installment sale is when you sell an asset but the buyer pays you over time in installments rather than all at once. You report the gain proportionally as you receive each payment, which can spread your taxable gain across multiple years and potentially keep you in a lower tax bracket each year.

Example: You sell rental property with a $100,000 gain for $500,000, with the buyer paying $100,000 down and $100,000 per year for four years. You report $20,000 of gain in the year of sale, then $20,000 in each of the next four years. This may keep your income lower in each individual year, resulting in a lower overall tax rate than if you reported the entire $100,000 gain in one year.

Installment sales are complex and have specific IRS rules. You must use Form 6252 to report them, and certain types of property (like publicly traded securities) do not may have access to. A tax professional can help you determine whether an installment sale makes sense for your situation.

Frequently Asked Questions

Can I avoid capital gains tax by not selling the asset?

Yes. As long as you own the asset, no capital gains tax is owed, even if it increases in value. Tax is only triggered when you sell or exchange it. You can hold an appreciated asset indefinitely and pay nothing, though you may owe property tax or other annual fees depending on the asset type.

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

You can deduct up to $3,000 of net losses against your ordinary income (wages, salary, interest) in a single year. Any losses beyond that carry forward to future years and can be used against future gains or future income, with no time limit.

Do I owe capital gains tax on inherited assets if I sell them right away?

Usually no. Inherited assets receive a step-up in basis to their market value on the date of death, so if you sell immediately at that same price, you have no gain and owe no tax. If the value changes between the date of death and your sale, you owe tax only on that change.

Can I use capital losses from my business to offset investment gains?

Yes. Capital losses from any source — business property, investments, real estate — can offset capital gains from any other source. If your business sold equipment at a loss and you sold stock at a gain in the same year, you can net them together.

What is the difference between capital gains tax and income tax?

Capital gains tax applies only to profit from selling an asset. Income tax applies to wages, salary, interest, and dividends. Long-term capital gains are taxed at preferential rates (0, 15, or 20 percent), while ordinary income can be taxed as high as 37 percent. Short-term capital gains are taxed as ordinary income.