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 taxable gains you made elsewhere in your portfolio that same year. If your losses exceed your gains, you can deduct up to $3,000 of the excess loss against your ordinary income (like wages or salary). Any remaining loss carries forward to future tax years.

The goal is not to avoid investing or to time the market perfectly. It is to use losses that happen anyway—because markets move and some holdings decline—as a tax tool. You are not creating losses on purpose; you are capturing losses that already exist and putting them to work on your tax return.

Key Takeaways

  • You must sell a security at an actual loss to harvest that loss; straightforward holding a losing position does not create a tax deduction.
  • The loss offsets capital gains dollar-for-dollar, and any excess can reduce ordinary income by up to $3,000 per year.
  • The wash-sale rule prevents you from buying the same or substantially identical security within 30 days before or after the sale, or the loss is disallowed.
  • Tax loss harvesting works best when you have realized gains elsewhere in your portfolio or significant ordinary income to offset.
  • You must track the cost basis and sale price of every security you harvest, and report the loss on Schedule D of your tax return.

When you actually realize a loss

A loss only counts for tax purposes when you sell. If you own a mutual fund worth $8,000 that you paid $10,000 for, you have an unrealized loss of $2,000—but the IRS does not care yet. The moment you sell that fund for $8,000, you lock in a realized loss of $2,000, and that is when the tax code takes notice.

This is why tax loss harvesting requires action. You cannot straightforward wait for a recovery. You have to make a deliberate sale, accept the loss, and then decide what to do with the proceeds. Many people hesitate because selling feels like admitting defeat, but from a tax standpoint, a loss you harvest is a loss you use.

How losses offset gains on your tax return

When you file your return, you report all your realized capital gains and losses on Schedule D. The IRS nets them together. If you sold stocks for a $5,000 gain and harvested a $2,000 loss, your net capital gain is $3,000. You pay tax only on that $3,000, not the full $5,000.

If your losses exceed your gains—say you harvested $6,000 in losses but only had $2,000 in gains—you can deduct $3,000 of the excess loss against your ordinary income (wages, self-employment income, interest, etc.). The remaining $3,000 loss does not disappear. It carries forward to the next tax year, where it can offset gains or ordinary income again, and continues to carry forward until it is fully used.

This carryforward is valuable in years when you have little or no capital gains. A large harvested loss can shelter ordinary income for years to come.

The wash-sale rule: the trap most people hit

The wash-sale rule is the single most important constraint on tax loss harvesting. It says: if you sell a security at a loss, you cannot buy that same security or a substantially identical one within 30 days before the sale or 30 days after the sale. If you do, the IRS disallows the loss entirely, and your cost basis adjusts upward instead.

The 30-day window is strict. It runs from 30 days before the sale through 30 days after. If you sell on March 15, you cannot buy the same security from February 14 through April 14. Many people sell a losing position and when ready buy it back, thinking they will "get back in" at the lower price—and then discover their loss was disallowed.

Substantially identical is broader than exact. Buying the same stock is obviously a wash sale. Buying a mutual fund that tracks the same index as the one you sold is usually a wash sale too. Buying a different fund in the same sector is generally safe, but the IRS looks at the holdings and performance. When in doubt, wait 31 days or switch to a genuinely different investment.

Tracking cost basis and reporting the loss

To harvest a loss, you must know your cost basis—what you originally paid for the security, including any reinvested dividends or distributions. Your brokerage statement shows this, but you should verify it yourself, especially for older holdings or inherited securities.

When you sell, your brokerage reports the sale to the IRS on Form 1099-B. You receive a copy, and the IRS receives another. You then report the loss on Schedule D, listing the security name, the date acquired, the date sold, the proceeds (sale price), the cost basis, and the gain or loss. If you harvested multiple losses, you list each one separately.

If your cost basis is wrong, your reported loss will be wrong, and the IRS may adjust your return. Keep records of all purchases, reinvested distributions, and sales for at least three years after you file the return reporting the loss.

When tax loss harvesting makes sense

Tax loss harvesting is most useful in years when you have realized capital gains—from selling appreciated stocks, mutual funds, or other investments. The harvested loss directly reduces those gains, dollar-for-dollar, and lowers your tax bill.

It is also valuable if you have high ordinary income and can use the $3,000 annual deduction against wages or self-employment income. Over time, a series of harvested losses can shelter significant income.

Tax loss harvesting is less useful if you have no gains to offset and low ordinary income. A loss you cannot use this year carries forward, but you lose the when ready tax benefit. It is also less useful in tax-deferred accounts like 401(k)s or IRAs, because gains and losses inside those accounts do not trigger tax anyway.

Common mistakes that cost you the deduction

The most common mistake is the wash sale: selling a losing position and buying it back within 30 days. The loss vanishes, and your cost basis increases instead. The second mistake is poor record-keeping. If you cannot prove your cost basis, you cannot prove your loss, and the IRS will disallow it.

A third mistake is harvesting losses in a tax-deferred account. Losses inside a 401(k) or traditional IRA do not create tax deductions because the account itself is tax-deferred. You are wasting the loss. Harvest losses in taxable brokerage accounts only.

A fourth mistake is harvesting small losses and ignoring the tax cost of selling. If you sell a security with a small loss but trigger a commission or bid-ask spread, your net loss shrinks. Make sure the harvested loss is large enough to justify the transaction cost.

Frequently Asked Questions

Do I have to harvest losses in the same year I realize gains?

Yes, to use the loss against a gain on the same return. If you harvest a loss in December but had no gains that year, the loss carries forward to next year. You can use it then against future gains or ordinary income, but you lose the when ready tax benefit.

What if I buy a similar fund instead of the exact same one—is that a wash sale?

It depends on how similar. Buying a different S&P 500 index fund after selling one is usually a wash sale because the holdings are substantially identical. Buying a total market fund or a different asset class is generally safe. When uncertain, wait 31 days or consult a tax professional.

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

No. Losses inside tax-deferred accounts do not create tax deductions because the account itself is tax-deferred. Harvest losses only in taxable brokerage accounts where gains and losses are reported to the IRS.

What happens to my cost basis after a wash sale?

The disallowed loss is added to the cost basis of the new security you bought. If you sold at a $2,000 loss and bought back within 30 days, your new cost basis increases by $2,000. You do not lose the loss entirely; it just defers to a future sale of the replacement security.

Do I need to report harvested losses if my total gains are zero?

Yes. You report all realized gains and losses on Schedule D, even if they net to zero. The IRS uses this information to track your basis and carryforward losses. Failing to report a loss can trigger an audit if the brokerage also reports the sale on Form 1099-B.