What Is the Wash Sale Rule? The Tax-Loss Harvesting Trap to Avoid
Sell an investment at a loss to save on taxes, then buy it right back — and the IRS can disallow your deduction. Here's exactly how the wash sale rule works.
Tax-loss harvesting — selling a losing investment to offset taxable gains — is one of the easiest ways to lower your tax bill. But there's a trap: if you buy back the same or a 'substantially identical' investment too soon, the IRS disallows the loss entirely under the wash sale rule.
What Counts as a Wash Sale?
A wash sale happens when you sell a security at a loss and, within 30 days before or after the sale (a 61-day window total), buy the same security or one that's 'substantially identical' — including in a spouse's account or your IRA. The IRS then disallows the loss for that tax year.
What Happens to the Disallowed Loss?
The loss isn't gone forever — it's added to the cost basis of the new shares you bought. This defers the tax benefit until you eventually sell those replacement shares for good, rather than eliminating it. But if you needed the deduction this tax year, the wash sale rule blocks that timing.
Common Ways People Accidentally Trigger It
- Selling a stock at a loss in a taxable account, then buying it back in an IRA within 30 days — this still counts as a wash sale, and worse, the loss is permanently disallowed (not deferred) since the IRA has no cost basis to adjust.
- Automatic dividend reinvestment (DRIP) buying more shares of the same fund right after you sold it at a loss.
- A spouse buying the same security in their separate account.
- Selling an ETF at a loss and buying a near-identical ETF tracking the same index from a different provider — the IRS hasn't clearly defined 'substantially identical' for ETFs, so this is a gray area best avoided with very similar funds.
How to Harvest Losses Without Triggering It
If you want to stay invested in the same asset class, sell the losing position and immediately buy a similar-but-not-identical fund (e.g., swap one total-market index fund for a different provider's total-market fund) for 31+ days, then optionally swap back. Or simply wait the 31 days before repurchasing the exact same security.
💡 The wash sale rule only applies to losses — you can sell and immediately rebuy a winning investment with no penalty. It also only applies within a single taxpayer's combined accounts (including spouse and IRAs), not across unrelated people.
See how harvested losses affect your overall tax bill for the year.
Try Tax Bracket CalculatorSend Money Worldwide in Minutes
Transfer funds to 200+ countries with Western Union. Competitive rates, multiple payout options — bank account, cash pickup, or mobile wallet.
Send Money NowRelated Articles
Related tool:
Tax Bracket Calculator