Short answer: tax-loss harvesting means selling an investment in a taxable account for less than you paid, using the loss to offset capital gains and up to $3,000 a year of other income, and buying something similar but not substantially identical so you stay invested. It can lower this year’s tax bill. But it also lowers the cost basis of what you hold, so much of the benefit is a deferral, repaid as a larger gain when you sell later. The wash-sale rule cancels the loss if you, your spouse or your IRA buys a substantially identical investment within 30 days before or after the sale.
US federal rules only. Harvesting does nothing inside IRAs and 401(k)s, where gains and losses aren’t taxed year by year. This is general education, not tax advice.
How the loss is used
- Against capital gains. Losses first offset gains you realized in the same year.
- Against other income, up to a limit. If losses exceed gains, you can deduct the lesser of $3,000 ($1,500 if married filing separately) or your net loss against other income (IRS Topic 409).
- Carried forward. Any net loss above that limit carries forward to later years.
The holding period sets the type of gain or loss: an asset held more than one year produces a long-term gain or loss; one year or less, short-term. Net short-term gains are taxed as ordinary income, while long-term gains get the lower capital gain rates (IRS Topic 409).
The wash-sale rule
Under IRS Publication 550, a wash sale happens when you sell stock or securities at a loss and, within 30 days before or after the sale, you buy substantially identical stock or securities, acquire them in a fully taxable trade, acquire a contract or option to buy them, or acquire them for your IRA or Roth IRA. It also applies if your spouse, or a corporation you control, buys substantially identical stock. You can’t deduct a loss from a wash sale.
| How the repurchase happens | What happens to the loss |
|---|---|
| You buy it back in the same taxable account within 30 days | Disallowed now, but added to the cost basis of the new shares, so you recover it when you sell them. The new shares’ holding period includes the old shares’. |
| You, or an automatic investment, buy it in your IRA or Roth IRA within 30 days | Disallowed, and Publication 550 excludes this case from the basis adjustment, so the loss isn’t added back. |
| Your spouse buys it within 30 days | Also a wash sale. |
What counts as “substantially identical”? The IRS doesn’t publish a list. Publication 550 says to consider all the facts and circumstances, and that stock of one corporation is ordinarily not substantially identical to stock of another. Two index funds from different companies that track different indexes are a common replacement choice, but whether a particular pair is safe is a judgment, and a tax professional can help with it. Watch for automatic purchases too: a reinvested dividend or a scheduled contribution into the same fund inside the window can create a small wash sale.
A worked example: why it’s mostly a deferral
Hypothetical. Jordan, single, bought $50,000 of a stock index fund in a taxable account. It falls to $42,000. Jordan sells, realizing an $8,000 loss, and the same day buys $42,000 of a different index fund that isn’t substantially identical. Jordan has no other gains this year and is in the 22% bracket (2026 taxable income over $50,400).
| Step | Effect |
|---|---|
| Years 1 to 3 | $3,000 + $3,000 + $2,000 deducted against ordinary income at 22%: about $1,760 less tax. |
| New cost basis | $42,000 instead of $50,000, so a later sale shows $8,000 more gain. |
| Later sale, 15% long-term rate | About $1,200 more tax then. Net saving about $560, plus the use of the money in between. |
| Later sale, 0% long-term rate | No extra tax. The deferral becomes a permanent saving of about $1,760. |
That last row is why harvesting can matter for early retirees: years with little income can fall in the 0% bracket for long-term gains. If you would never sell, or will leave the shares to heirs, the picture changes again. Either way, the result depends on your tax rates now and later, which nobody knows in advance. Claims that harvesting reliably adds a fixed percentage to returns every year don’t fit how the rules work.
When it’s usually not worth it
- The account is an IRA, Roth IRA or 401(k): losses there don’t reduce your tax.
- The loss is small and trading costs, a fund’s short-term redemption fee or the hassle outweigh it.
- You have no suitable replacement and would sit in cash for 31 days instead.
- You expect your tax rate on future gains to be higher than the rate the deduction saves now.
Sources
- IRS, Publication 550 (2025), Investment Income and Expenses: wash sales, substantially identical securities, holding period.
- IRS, Topic no. 409, Capital gains and losses (last reviewed September 24, 2026).
- IRS, IR-2025-103, tax year 2026 inflation adjustments.
Related reading: the three-fund portfolio for what you might hold in a taxable account, and the Roth conversion ladder for another way early retirees use low-income years.