What tax loss harvesting actually does

Tax loss harvesting is a strategy where you sell an investment at a loss, then use that loss to reduce the taxes you owe on investment gains or other income. You sell a security (stock, bond, mutual fund, or exchange-traded fund) that has dropped in value below what you paid for it, lock in that loss on paper, and report it to the IRS. The IRS lets you subtract that loss from gains you made elsewhere — or, if you have no gains, from up to $3,000 of ordinary income like wages or salary in a single year.

The mechanics are straightforward: you own an investment worth less than you paid. You sell it. You now have a realized loss instead of an unrealized one. That loss sits on your tax return and offsets other income. The tax savings come from paying a lower tax rate on the remaining gains, or from reducing the income bracket you fall into.

The catch is that you cannot simply buy back the same investment immediately. The IRS has a wash-sale rule that blocks you from claiming the loss if you buy the same or a substantially identical security within 30 days before or after the sale. Many people use this strategy by selling a losing position and buying a similar (but not identical) investment instead, so their portfolio stays invested while they capture the tax loss.

Key Takeaways

  • You sell an investment at a loss, report that loss on your tax return, and use it to reduce taxes owed on gains or income elsewhere.
  • The IRS wash-sale rule prevents you from buying back the same security within 30 days before or after the sale, or the loss is disallowed.
  • Losses can offset capital gains dollar-for-dollar, then up to $3,000 of ordinary income per year; unused losses carry forward to future years.
  • Tax loss harvesting only saves money if you have gains or income to offset; it does not create a tax refund on its own.
  • This strategy works best for taxable investment accounts; retirement accounts like 401(k)s and IRAs do not allow it because gains and losses are not taxed yearly.

How losses offset gains and income

The IRS treats capital losses in a specific order. First, losses offset capital gains. If you made $5,000 in gains from selling other investments and harvested a $2,000 loss, you now report only $3,000 in net gains and pay tax on that smaller amount.

If your losses exceed your gains — say you harvested $5,000 in losses but only made $2,000 in gains — the IRS lets you deduct up to $3,000 of the excess loss against ordinary income (wages, salary, interest, dividends) in that tax year. In this example, you would subtract $3,000 from your ordinary income, leaving $2,000 in unused losses.

Those unused losses do not disappear. They carry forward to the next tax year and the year after that, indefinitely, until you use them up. If you have a year with no gains and no income to offset, the $2,000 loss just sits there waiting for a future year when you have taxable income again.

The wash-sale rule and how to avoid it

The wash-sale rule is the main constraint on tax loss harvesting. If you sell a security at a loss and buy the same security (or one the IRS considers substantially identical) within 30 days before the sale or 30 days after the sale, the IRS disallows the loss. You cannot claim it on your tax return, and the loss is added to the cost basis of the new shares instead.

The 30-day window is strict: it runs from 30 days before the sale through 30 days after. If you sell on January 15, you cannot buy back the same security between December 16 and February 14. Many investors use this rule intentionally by selling a losing position and immediately buying a similar but different investment — for example, selling a broad U.S. stock index fund and buying a different U.S. stock index fund from another provider, or selling individual stocks and buying an ETF in the same sector.

The IRS does not define "substantially identical" with a precise formula. Mutual funds and ETFs tracking the same index are generally considered substantially identical. A stock and a call option on that stock are substantially identical. But a U.S. stock fund and an international stock fund are not. If you are uncertain, consult a tax professional before executing the trade.

When tax loss harvesting actually saves you money

Tax loss harvesting only produces tax savings if you have capital gains or ordinary income to offset. If you have no gains and no income in a given year, harvesting a loss does not create a refund — it just creates a loss carryforward that may be useful later.

The tax savings depend on your tax bracket. If you are in the 24% federal tax bracket and harvest a $10,000 loss, you save roughly $2,400 in federal income tax (24% of $10,000). If you are in the 32% bracket, the same loss saves $3,200. State and local taxes may add more savings depending on where you live.

The strategy works best for people who trade frequently, realize gains regularly, or have high income. Someone who buys and holds investments for decades and rarely sells may have few gains to offset, making tax loss harvesting less useful. Someone who is retired and living on a fixed income may also have limited gains or income to offset.

Tax loss harvesting in taxable versus retirement accounts

Tax loss harvesting only works in taxable brokerage accounts — regular investment accounts where you report gains and losses each year. In these accounts, you control when you sell, and you report the results to the IRS.

It does not work in retirement accounts like 401(k)s, traditional IRAs, or Roth IRAs. In these accounts, you do not report gains and losses yearly. Investments grow tax-deferred (or tax-free, in the case of Roth accounts), and you do not owe tax until you withdraw the money. Because there is no yearly tax bill, there is nothing to offset with a loss. Selling a losing investment inside a retirement account simply reduces your account balance with no tax benefit.

This is one reason financial advisors often recommend keeping long-term, buy-and-hold investments in retirement accounts and keeping more actively managed or higher-turnover investments in taxable accounts — the taxable account is where you can use losses strategically.

Common mistakes and timing issues

The most common mistake is forgetting the wash-sale rule and buying back the same investment too soon. If you sell Apple stock at a loss on December 20 and buy it back on January 10, the loss is disallowed even though you intended to harvest it. The loss gets added to your cost basis in the new shares, which delays the tax benefit until you eventually sell those shares at a loss (or never, if the stock recovers).

Another mistake is harvesting losses late in the year without checking your total gains and income. If you have already realized $50,000 in gains and are in a high tax bracket, harvesting a $5,000 loss saves you real money. But if you have no gains and your income is below $50,000, that same $5,000 loss only offsets $3,000 of ordinary income in the current year, and the remaining $2,000 carries forward — you get no immediate tax benefit.

Timing also matters for the wash-sale rule. If you are planning to harvest a loss, confirm the 30-day window before and after the sale date. Some investors use a calendar or spreadsheet to track wash-sale dates, especially if they harvest multiple positions in the same account.

Frequently Asked Questions

Can I harvest losses in a Roth IRA or 401(k)?

No. Retirement accounts do not generate yearly tax bills, so losses inside them have no tax benefit. You can sell a losing investment in a retirement account, but you cannot use that loss to reduce taxes. The account grows tax-deferred or tax-free regardless of gains or losses.

What happens if I accidentally trigger the wash-sale rule?

The IRS disallows the loss on your tax return. The loss amount is added to the cost basis of the new shares you bought. This delays the tax benefit until you sell those shares at a loss later, or you may never recover the benefit if the investment recovers in value.

Do I have to report tax loss harvesting to the IRS?

Yes. You report all capital gains and losses on Schedule D (Form 1040) when you file your tax return. Your brokerage sends you a Form 1099-B listing all sales during the year. The IRS matches your return to that form, so omitting losses or gains will likely trigger a notice.

Can I harvest losses from mutual funds and ETFs, or only stocks?

You can harvest losses from any security — stocks, bonds, mutual funds, ETFs, or other investments. The wash-sale rule applies to all of them. The key is that the security must have dropped below your purchase price and you must sell it to realize the loss.

What if my losses are bigger than my gains and income?

Losses offset gains first, then up to $3,000 of ordinary income per year. Any remaining losses carry forward to future tax years indefinitely. You can use them in any year you have gains or income, even decades later.