What tax loss harvesting does

Tax loss harvesting is a strategy where you sell an investment at a loss and use that loss to reduce the taxes you owe on investment gains elsewhere. When you sell a stock, bond, or fund for less than you paid for it, you have a capital loss. The IRS lets you use that loss to offset capital gains — profits from other investments you sold at a higher price. If your losses exceed your gains, you can deduct up to $3,000 of the excess loss against your regular income in a single year, and carry any remaining loss forward to future years.

The goal is not to make money from the loss itself. You are using a real loss to reduce your tax bill. The trade-off is that you sell a position you may have wanted to keep, and you have to follow specific rules about buying it back.

Key Takeaways

  • You sell an investment at a loss and use that loss to offset capital gains from other investments, reducing your tax bill for the year.
  • Losses that exceed gains can reduce your regular income by up to $3,000 per year, with any remainder carried forward to future years.
  • The wash-sale rule prevents you from buying back the same investment (or a substantially identical one) within 30 days before or after the sale, or the loss is disallowed.
  • Tax loss harvesting works best when you have significant capital gains, hold investments in taxable accounts, and can replace the sold position with a similar but not identical investment.

How the math works with capital gains

Suppose you sold a stock fund this year for a $5,000 gain. You also own an individual stock that has dropped $3,000 below what you paid. If you sell that stock now, you have a $3,000 loss. The loss offsets the gain: $5,000 gain minus $3,000 loss leaves you with $2,000 in taxable gains for the year instead of $5,000.

If your losses are larger than your gains, the excess loss can reduce your ordinary income. If you had $5,000 in losses and $2,000 in gains, you have $3,000 in excess loss. You can deduct $3,000 of that against your salary, business income, or other ordinary income, lowering your taxable income for the year. Any loss beyond $3,000 rolls forward to the next year, where you can use it again.

The tax savings depend on your tax bracket. If you are in the 24% federal bracket, a $3,000 deduction saves you $720 in federal tax. State income tax may add more savings. The higher your bracket, the more valuable the deduction.

The wash-sale rule and how to avoid it

The wash-sale rule is the main constraint on tax loss harvesting. It says you cannot buy back the same investment (or one that is substantially identical) within 30 days before you sell it or 30 days after. If you do, the IRS disallows the loss, and you lose the tax benefit entirely.

The 30-day window runs from 30 days before the sale through 30 days after. If you sell on January 15, you cannot buy back the same investment from December 16 through February 14. If you do buy back within that window, the loss disappears for tax purposes, though the loss amount gets added to the cost basis of the new purchase.

To harvest a loss and stay invested in the same asset class, you sell the position and buy a similar but not identical investment. If you own a total US stock market index fund and want to harvest a loss, you could sell it and buy a different total US stock market index fund from another provider. The two funds track the same market but are not substantially identical in the IRS's view. You stay exposed to the market while the wash-sale rule does not explore.

When tax loss harvesting makes sense

Tax loss harvesting is most useful when you have significant capital gains to offset. If you sold investments for large profits this year, or you have accumulated gains in a taxable account, harvesting losses can reduce what you owe. It is less useful if you have no gains to offset and your income is low enough that the $3,000 ordinary income deduction does not save much in taxes.

The strategy works only in taxable accounts. Retirement accounts like 401(k)s and IRAs do not generate capital gains taxes, so there is nothing to harvest against. Tax-advantaged accounts also prohibit the wash-sale rule from explore, but you cannot use losses to offset gains because the accounts do not generate taxable gains in the first place.

You also need to be willing to sell the position. If you believe an investment will recover and you want to hold it long-term, selling to harvest a loss means you miss the recovery — unless you buy back a similar investment. Even then, you are paying transaction costs and potentially missing a brief window of gains if the market rebounds quickly.

Tracking losses and gains across your accounts

To harvest losses effectively, you need to know which investments are underwater (worth less than you paid) and which have gains. Most brokerages show you the cost basis and current value of each holding. Some also calculate unrealized gains and losses automatically.

At tax time, your brokerage sends you a Form 1099-B listing all sales you made during the year, including the proceeds and cost basis. You report capital gains and losses on Schedule D of your tax return. If you harvested losses, you report them here, and they offset any gains you report.

If you harvest losses across multiple accounts or multiple years, tracking becomes more complex. A spreadsheet or your brokerage's tax reporting tools can help. Some people work with a tax professional or financial advisor to coordinate harvesting across accounts and may support they do not accidentally trigger the wash-sale rule.

Common mistakes to avoid

The most common mistake is buying back the same investment too soon. Even if you intend to buy a similar fund, if you accidentally repurchase the original investment within 30 days, the loss is disallowed. Check the fund name, ticker, and provider before you buy.

Another mistake is harvesting losses in a retirement account, where it provides no benefit. Losses in a 401(k) or IRA cannot be used to offset gains because the account does not generate taxable gains. You can only harvest losses in taxable brokerage accounts.

A third mistake is harvesting small losses when the tax savings do not justify the transaction costs and effort. If you sell a position with a $200 loss and pay a $10 commission, you net $190 in tax benefit (before considering your tax bracket). If your tax bracket is 22%, that $190 loss saves you about $42 in taxes. The math may not be worth the complexity.

Frequently Asked Questions

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

No. Retirement accounts do not generate taxable capital gains, so there is nothing to harvest against. The wash-sale rule also does not explore to retirement accounts, but that does not help because you cannot use losses to reduce taxes. Tax loss harvesting only works in taxable brokerage accounts.

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

The IRS disallows the loss, and you lose the tax deduction. However, the loss amount is added to the cost basis of the new shares you bought, so you are not losing the loss entirely — you are just deferring it. When you eventually sell those shares, your cost basis will be higher, which reduces the gain (or increases the loss) at that time.

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

You do not file a separate form for tax loss harvesting itself. You report all capital gains and losses on Schedule D of your tax return. Your brokerage sends you a Form 1099-B with the sales information, and you use that to fill out Schedule D. The IRS sees the losses when you report them.

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

Yes. You can deduct up to $3,000 of excess losses against your ordinary income in a single year. Any losses beyond $3,000 carry forward to future years, where you can use them to offset gains or reduce income again. This is useful if you expect to have gains in future years or straightforward want to reduce your taxable income now.

Does tax loss harvesting work if I own the same fund in a retirement account?

The wash-sale rule applies only to taxable accounts, so owning the same fund in an IRA does not trigger it. However, the IRS looks at all accounts together when determining if you bought a substantially identical investment. If you sell a fund in your taxable account at a loss and then buy the same fund in your IRA within 30 days, some tax professionals argue this violates the wash-sale rule. The IRS has not issued definitive guidance on this scenario, so consult a tax professional if you are concerned.