Tax-Loss Harvesting and the Wash Sale Rule: How to Turn Investment Losses Into Tax Savings
Selling investments at a loss can offset gains and up to $3,000 of ordinary income a year. The wash sale rule can cancel the benefit. Here's how harvesting works, the 61-day window, and the IRA trap.
Key takeaways
- 01.Losses offset gains first—Then up to $3,000 a year of ordinary income ($1,500 if married filing separately).
- 02.Unused losses never expire—They carry forward indefinitely for individuals.
- 03.The wash sale window is 61 days—No buying a substantially identical investment 30 days before or after the sale.
- 04.Buying in your IRA can trigger it—And then the loss can be lost permanently.
Markets fall. When an investment in a taxable account is worth less than you paid, selling it lets you claim a capital loss that reduces your tax bill. Reinvesting the money right away keeps you in the market. That's tax-loss harvesting.
How losses reduce your taxes
- Losses offset gains. Short-term losses first offset short-term gains, long-term losses offset long-term gains, and then any net loss on one side offsets net gains on the other.
- Up to $3,000 of leftover loss offsets ordinary income each year ($1,500 if married filing separately).
- Anything left carries forward to future years, indefinitely, keeping its short- or long-term character.
Example (hypothetical)
You have a $5,000 long-term gain from selling one fund, and another fund that is down $12,000. You sell the losing fund:
- $5,000 of the loss cancels the gain.
- $3,000 offsets salary income this year.
- $4,000 carries forward to next year.
The wash sale rule
You can't sell at a loss and immediately buy the same thing back. Under the wash sale rule, a loss is disallowed if you buy a "substantially identical" security within 30 days before or after the sale, a 61-day window in total.
The loss isn't lost forever in a normal wash sale. It's added to the cost basis of the replacement shares, so you get the benefit later when you sell those. But it defeats the purpose of harvesting now.
Wash sales can be triggered by:
- buying shares in another taxable account (including a spouse's),
- automatic dividend reinvestment in the same fund within the window,
- buying call options on the same stock.
The IRA trap
If you sell at a loss in a taxable account and buy the same security in your IRA or Roth IRA within the window, the IRS treats it as a wash sale (Revenue Ruling 2008-5). And because basis in an IRA doesn't help you, the loss is effectively gone for good. Check what's scheduled in your retirement accounts before harvesting.
What counts as "substantially identical"?
The IRS hasn't drawn precise lines.
- Clearly identical: the same stock, or the same fund.
- Generally considered different: shares of two different companies; funds tracking different indexes (for example, an S&P 500 fund and a total U.S. market fund).
- Grey area: two funds tracking the same index from different providers. Many practitioners avoid this.
A common approach is to swap into a similar but not identical fund for at least 31 days, then switch back if you want to.
When harvesting makes sense, and when it doesn't
Most useful when:
- you have realised gains this year, or expect them,
- you're in a higher tax bracket now than you expect later,
- the loss is meaningful relative to trading costs.
Less useful or counterproductive when:
- you're in the 0% long-term capital gains bracket: there's no tax to save, and you lower your basis.
- the account is an IRA or 401(k): losses there aren't deductible.
- it makes you sell something you'd rather hold, or creates short-term gains elsewhere.
Remember that harvesting usually defers tax rather than eliminating it: the replacement has a lower basis, so the future gain is bigger. The deferral still has value, and if the shares are later donated or held until death (basis step-up), the tax may never be paid.
Record-keeping
Your broker reports wash sales within the same account on Form 1099-B, but not across different accounts or brokers. Keep your own log of sales and purchases in the 30 days around each harvest.
General information only. For larger portfolios or complex situations, ask a tax professional.
Sources
Not advice: this article is general information, not personal financial, tax or legal advice. Rules change and depend on your circumstances, so check with a qualified professional before acting.
Spotted an error? Email corrections@dailyinfo.tech. See our editorial standards.