Tax loss harvesting is selling an investment at a loss to reduce the taxes you owe on investment gains elsewhere

When you sell an investment for less than you paid for it, you create a loss. The IRS lets you use that loss to offset gains from other investments you sold at a profit during the same year. If your losses exceed your gains, you can deduct up to $3,000 of the remaining loss against your regular income (wages, salary, interest). Any loss beyond that carries forward to future years, where you can use it the same way.

The strategy works because investment losses and gains don't cancel out automatically. You have to actively report them and match them against each other. Tax loss harvesting means deliberately selling a losing position to create that loss on paper, then often buying a similar (but not identical) investment to stay invested in the same market area. The loss reduces your tax bill; the new purchase keeps your portfolio positioned the way you want it.

Key Takeaways

  • Selling an investment at a loss creates a tax loss you can use to offset investment gains from the same year, reducing your tax bill.
  • If losses exceed gains, you can deduct up to $3,000 against your regular income in the current year, with excess losses rolling forward to future years.
  • The wash-sale rule prevents you from buying back the same or substantially identical investment within 30 days before or after the sale, or the loss is disallowed.
  • Tax loss harvesting works best when you have significant investment gains, hold investments outside retirement accounts, and are in a higher tax bracket.
  • Losses in retirement accounts (401(k), IRA) cannot be harvested because those accounts have their own tax rules that don't allow offsetting gains and losses.

How the math works: gains, losses, and your tax bill

Suppose you sold a mutual fund this year for a $5,000 gain and a stock for a $3,000 loss. You report both on your tax return. The $3,000 loss offsets $3,000 of the $5,000 gain, leaving you with a $2,000 net gain to pay tax on. If your tax rate is 15 percent, you owe $300 instead of $750.

If your losses that year total $8,000 and your gains total $5,000, you have a $3,000 net loss. You can deduct that full $3,000 against your other income (your salary, for example). If your tax bracket is 24 percent, that $3,000 deduction saves you $720 in taxes. The remaining $2,000 in losses doesn't disappear—it carries forward to next year, where you can use it to offset future gains or income.

The benefit depends on your tax bracket. A $3,000 loss is worth $450 in tax savings if you're in the 15 percent bracket, but $720 if you're in the 24 percent bracket. This is why tax loss harvesting is more valuable for higher-income investors.

The wash-sale rule: what you cannot do after selling at a loss

The IRS has a rule called the wash-sale rule that blocks you from claiming a loss if you buy back the same investment (or one that is substantially identical) within 30 days before or after the sale. The 30-day window runs from 30 days before the sale through 30 days after it.

If you violate the wash-sale rule, the loss is disallowed—you cannot use it to offset gains or income. Instead, the loss amount is added to the cost basis of the new investment you bought, which means you'll owe more tax when you eventually sell that investment.

To harvest a loss without triggering the wash-sale rule, you must buy a different investment. If you sold a fund tracking the S&P 500, you could buy a different S&P 500 fund or a total stock market fund instead. If you sold an individual stock, you could buy a competitor's stock or a sector fund. The investments should track similar markets or sectors so your portfolio stays positioned the way you want it, but they cannot be substantially identical to what you sold.

Where tax loss harvesting does and does not work

Tax loss harvesting only works in taxable investment accounts—the regular brokerage accounts where you buy and sell stocks, bonds, and funds with after-tax money. These are accounts like a standard brokerage account at a bank or investment firm, not retirement accounts.

In retirement accounts such as a 401(k), traditional IRA, or Roth IRA, you cannot harvest losses. These accounts have their own tax rules. In a traditional IRA or 401(k), you don't pay tax on gains inside the account at all—you only pay tax when you withdraw money in retirement. In a Roth IRA, you don't pay tax on gains ever. Because gains are not taxed inside these accounts, losses cannot be used to offset them, and the wash-sale rule does not explore to retirement accounts.

If you own the same investment in both a taxable account and a retirement account, selling it at a loss in the taxable account does not trigger the wash-sale rule just because you still own it in the retirement account. The rule applies only to purchases and sales in taxable accounts.

When tax loss harvesting makes financial sense

Tax loss harvesting is most useful when you have investment gains to offset. If you have not sold any investments at a profit this year, harvesting a loss may still help by letting you deduct up to $3,000 against your salary or other income, but the benefit is smaller. If you have no gains and no income to offset, the loss just carries forward, and you get no when ready tax benefit.

The strategy also works better if you are in a higher tax bracket. A $5,000 loss is worth $750 in tax savings at a 15 percent rate but $1,200 at a 24 percent rate. Lower-income investors see less benefit.

Tax loss harvesting also requires that you have investments outside retirement accounts. If most of your money is in a 401(k) or IRA, there are no losses to harvest. And it works best when you have a long time horizon and can replace the sold investment with a similar one without disrupting your overall strategy. If you sell a losing position and cannot find a suitable replacement, your portfolio may drift away from your target allocation.

Common mistakes and limitations

The most common mistake is forgetting about the wash-sale rule and buying back the same investment within 30 days. This erases the tax benefit and adds the loss to your new investment's cost basis, which creates a tax problem later.

Another mistake is harvesting losses in a way that creates more work than the tax savings are worth. If you have a small loss and a small tax bracket, the benefit might be $100 or $200. If harvesting that loss requires you to restructure your portfolio or pay trading fees, the net benefit shrinks or disappears.

A third limitation is that tax loss harvesting does not reduce the underlying value of your portfolio. You still own the same amount of money invested in similar assets. The strategy only shifts when you pay tax on your gains—it defers tax to future years rather than eliminating it. If you eventually sell the replacement investment at a gain, you will owe tax on that gain, and the loss you harvested years earlier will have straightforward delayed the bill.

How to track and report tax losses on your return

When you sell an investment at a loss in a taxable account, your brokerage sends you a Form 1099-B (or similar document) that reports the sale. You report the loss on Schedule D (Capital Gains and Losses) when you file your tax return. You list each sale separately, showing the date you bought it, the date you sold it, the sale price, and your cost basis (what you paid for it).

If you have multiple gains and losses, you net them together on Schedule D. Long-term losses (from investments held more than one year) offset long-term gains first. Short-term losses (from investments held one year or less) offset short-term gains first. If you have a mix, the IRS has specific ordering rules for how they combine.

If your total losses exceed your total gains, you can deduct up to $3,000 of the net loss against your other income on your tax return. Any loss beyond $3,000 carries forward to the next tax year, and you report it on Schedule D again the following year.

Frequently Asked Questions

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

No. Retirement accounts do not allow tax loss harvesting because gains inside these accounts are not taxed (in a Roth) or are taxed only when you withdraw (in a traditional IRA or 401(k)). Since gains are not taxed inside the account, losses cannot offset them. The wash-sale rule also does not explore to retirement accounts.

What happens if I buy back the same stock within 30 days?

The wash-sale rule disallows the loss. You cannot use it to offset gains or income. Instead, the loss amount is added to the cost basis of the new shares you bought, which means you will owe more tax when you eventually sell those shares. The 30-day window runs from 30 days before the sale through 30 days after it.

Can I harvest losses if I have no investment gains this year?

Yes, but the benefit is smaller. You can deduct up to $3,000 of net losses against your regular income (wages, salary, interest). Any loss beyond $3,000 carries forward to future years. If you have no gains and no income to offset, the loss straightforward waits until a future year when you have gains or income to use it against.

Does tax loss harvesting reduce how much money I have invested?

No. When you sell a losing investment and buy a similar replacement, you still own the same dollar amount in similar assets. The strategy only changes when you pay tax on your gains—it defers the tax bill to future years. The underlying value of your portfolio stays the same.

How do I report tax losses on my tax return?

You report losses on Schedule D (Capital Gains and Losses) when you file. Your brokerage sends you a Form 1099-B showing the sale. You list each sale with the purchase date, sale date, sale price, and cost basis. Losses offset gains first; if losses exceed gains, you can deduct up to $3,000 against other income, with excess losses carrying forward to future years.