Wash Sale Rule Explained: Avoid Disallowed Tax Losses
How the 30-day wash sale rule works, which securities count as substantially identical, and how to harvest losses without triggering it.
The wash sale rule disallows a tax loss if you buy the same or a substantially identical security within 30 days before or after selling at a loss — the loss is not lost, but it is deferred into the new shares’ cost basis.
What you'll walk away with
Skim these first — then dig into the details below.
- 1Selling at a loss and repurchasing within 30 days creates a wash sale.
- 2The window is 61 days total — 30 before the sale, the sale day, and 30 after.
- 3The disallowed loss is added to the cost basis of the replacement shares.
- 4A purchase inside an IRA can void the loss permanently, not just defer it.
Reading helps. Calculating makes it real. Free tools — instant results, no signup.
Tax-loss harvesting is one of the few reliable ways to lower your tax bill without changing your investment strategy. The wash sale rule is the guardrail the IRS put around it, and it catches investors who sell a fund and buy it right back the next week.
Estimate what a harvested loss is worth at your bracket with the tax planning calculator, then read the full tax-loss harvesting guide.
How the 61-day window works
Most people remember the 30 days after the sale and forget the 30 days before. Both halves count, which means a routine automatic purchase can create a wash sale you never intended.
- The window runs 30 days before the sale through 30 days after it.
- It applies to purchases of the same or a substantially identical security.
- It applies across all your accounts, including your spouse’s and your IRA.
- Dividend reinvestment counts as a purchase and routinely triggers the rule.
- Automatic recurring contributions to the same fund count too.
What happens to the disallowed loss
In a normal taxable account, a wash sale defers the loss rather than destroying it. The disallowed amount is added to the basis of the shares you bought.
- Your replacement shares get a higher cost basis by the amount disallowed.
- The holding period of the original shares carries over to the new ones.
- You eventually claim the benefit when you sell the replacement shares.
- Brokers report wash sales on Form 1099-B, but only within a single account.
How to harvest losses cleanly
You can stay invested and still claim the loss by buying something similar but not substantially identical.
- 1
Sell the losing position and record the date.
- 2
Immediately buy a different fund tracking a different index — for example, swap an S&P 500 fund for a total market fund.
- 3
Pause dividend reinvestment and automatic purchases of the original fund for 31 days.
- 4
Check every account, including your spouse’s and any IRA, for conflicting purchases.
- 5
After 31 days, switch back if you prefer the original fund.
Mistakes that create accidental wash sales
Nearly every unintended wash sale comes from automation the investor forgot about.
- Dividend reinvestment quietly buying shares days after you harvested a loss.
- A 401(k) contribution buying the same index fund you just sold in a brokerage account.
- A spouse holding the same fund in a separate account.
- Selling in December and rebalancing into the same position in early January.
- Assuming your broker tracks wash sales across institutions — it does not.
Disclaimer: This page includes AI-assisted educational content reviewed for general accuracy. It is not personalized financial, tax, or legal advice. Verify numbers with a qualified professional and our editorial standards.
Continue reading
Related guides that deepen the same decision.
Tax-Loss Harvesting: Turn Market Losses into Tax Savings
Tax-loss harvesting means selling an investment that is down to lock in the loss, using it to cancel out capital gains and up to $3,000 of ordinary income, while staying invested in something similar.
ReadTaxesCapital Gains Tax Explained: Short-Term vs Long-Term Rates (2026)
Sell an asset within a year and the gain is taxed as ordinary income; hold at least a year and one day and it qualifies for lower long-term rates of 0%, 15%, or 20%.
ReadInvestingTaxable Brokerage Account: When & How to Use One
A taxable brokerage account is where you invest after maxing out tax-advantaged accounts — it has no contribution limits and no withdrawal restrictions, but you owe tax on dividends each year and on gains when you sell.
ReadReady to plug in your numbers?
Every guide pairs with free calculators — no signup.
Explore all calculators