The Wash Sale Rule Explained for ETF Investors
Sell at a loss and buy it right back, and the IRS pretends the loss never happened. Here's exactly how the wash-sale rule works and how to harvest losses without tripping it.
Don't have time? Here's what you need to know:
- 1The wash-sale rule disallows a loss if you rebuy a substantially identical security within 30 days before or after the sale.
- 2The full danger zone is 61 days, and the rule spans all your accounts including a spouse's and your IRA.
- 3A disallowed loss usually moves into the replacement's basis — but inside an IRA it's lost permanently.
- 4Harvest cleanly by swapping to a fund with a different index and provider, or waiting at least 31 days to rebuy.
What the Wash-Sale Rule Actually Does
The wash-sale rule exists to stop investors from claiming a tax loss while staying in essentially the same position. If you sell a security at a loss and buy the same or a "substantially identical" security within 30 days before or after that sale, the IRS disallows the loss for the current year. You haven't lost the deduction forever, but you can't use it now — and that delay is the whole point of the rule.
The 30-day window runs in both directions around the sale, so the full danger zone is 61 days: 30 days before, the day of the sale, and 30 days after. Many investors only think about the days after they sell and forget that a purchase shortly before the loss sale can trip the rule just as easily. The rule applies to stocks, ETFs, mutual funds, and options on them.
The Loss Isn't Gone — It Moves
A disallowed wash-sale loss isn't forfeited; it gets added to the cost basis of the replacement shares and their holding period is extended to include the original holding period. In effect, the loss is deferred into the new position. When you eventually sell the replacement shares (outside any wash-sale window), the higher basis produces a smaller gain or a larger loss, so you recover the benefit then.
That mechanic softens the blow, but it can still hurt in specific situations. If the wash sale lands across a tax year — you sell at a loss in December and rebuy in early January — you lose the deduction in the year you wanted it and don't recover it until you sell the replacement, possibly far in the future. And if the wash sale occurs inside an IRA, the disallowed loss is gone permanently with no basis adjustment to recover it. That's the one truly punishing case.
Important: A wash sale triggered by a purchase in your IRA is the worst outcome: the loss is permanently disallowed with no basis recovery. Never rebuy a harvested security in an IRA within the 61-day window.
What 'Substantially Identical' Means for ETFs
The phrase "substantially identical" is the rule's gray area. The same stock or the same fund is obviously identical. Two ETFs tracking the exact same index are widely treated as risky. But two ETFs tracking different, if similar, indexes from different providers are generally considered not substantially identical — which is precisely what makes loss harvesting practical. You can sell one broad-market fund and buy another with overlapping holdings without triggering the rule.
The IRS has never issued a bright-line test for index funds, so the cautious standard most investors and advisors use is: different underlying index, and ideally a different fund provider. Swapping an S&P 500 ETF for a total-market ETF, or one provider's developed-international fund for another's, gives you nearly the same exposure on the right side of the line. When the funds are too close to call, the safe move is to wait the full 31 days instead.
| Action | Wash sale? | Why |
|---|---|---|
| Sell a fund, rebuy the same fund in 10 days | Yes | Identical security |
| Sell, rebuy in an IRA within 30 days | Yes (permanent) | No basis recovery |
| Sell S&P 500 ETF, buy total-market ETF | Generally no | Different index |
| Sell, wait 31+ days, rebuy original | No | Outside the window |
Want the full framework? This 2-hour ETF course teaches you exactly how to pick, buy, and hold profitable ETFs — from zero to confident investor. Under $15.
How to Harvest Losses and Stay Clean
Avoiding wash sales comes down to a few habits. Turn off automatic dividend reinvestment on any holding you might harvest, since a small reinvested purchase within the window can disallow part of your loss. Coordinate across every account you and your spouse control, including IRAs and 401(k) plans, because the rule spans all of them. And when you harvest, replace the holding with a similar-but-distinct fund rather than rebuying the same one.
If you'd rather not bother with a replacement at all, the simplest clean approach is to sell, sit in cash or a clearly different asset for 31 days, and rebuy the original. You accept some tracking risk during that month, but the loss is unambiguously allowed. As with all tax matters, the edges here are genuinely fuzzy, so check with a tax professional before building a repeatable harvesting routine.
Tip: Mark a calendar reminder for day 31 after any harvest. It's the simplest way to ensure you never accidentally rebuy a security one day too early and void the loss.
Frequently Asked Questions
What is the wash sale rule in simple terms?
If you sell an investment at a loss and buy the same or a substantially identical investment within 30 days before or after, the IRS won't let you deduct that loss now. The disallowed loss is added to the cost basis of the new shares, so you recover the benefit when you eventually sell those — except inside an IRA, where it's lost for good.
How long is the wash sale window?
61 days total: the 30 days before the loss sale, the day of the sale, and the 30 days after. A purchase of a substantially identical security anywhere in that window triggers the rule, which is why investors usually wait at least 31 days after selling before rebuying the original.
Can I avoid a wash sale by buying a similar ETF?
Usually yes. Buying an ETF that tracks a different (though similar) index from a different provider is generally not considered substantially identical, so the loss stays valid. For example, swapping an S&P 500 ETF for a total-market ETF gives near-identical exposure on the right side of the rule. When too close to call, wait 31 days instead.
Does the wash sale rule apply to my IRA?
Yes, and it's the most dangerous case. If you sell at a loss in a taxable account and buy a substantially identical security in your IRA within 30 days, the loss is permanently disallowed with no basis adjustment to recover it later. The rule also spans your spouse's accounts, so coordinate purchases carefully.
Further Reading
Free Tools
Alex Harrington
CFA Level II Candidate, Finance & Economics
Alex Harrington is an independent ETF researcher and personal finance writer with over 8 years of experience analyzing exchange-traded funds. A CFA Level II candidate with a background in economics, Alex has reviewed 800+ ETFs and helped thousands of beginners build their first investment portfolios through clear, jargon-free education.
This content is for educational purposes only and does not constitute financial advice. Past performance does not guarantee future results. Consult a licensed financial advisor before making investment decisions.