What the Rule Actually Says
The wash sale rule is the trap that quietly cancels tax losses people think they've banked. It's short, it's strict, and it's broader than almost anyone assumes. If you do any tax-loss harvesting — or you just sold a stock at a loss and bought it back because you still believe in it — you need to know exactly how this works.
Here's the rule, IRC Section 1091, in one sentence: if you sell a security at a loss and buy a substantially identical security within 30 days before or after the sale, you can't deduct the loss. The IRS treats it as if you never really left the position — so it won't let you claim the tax benefit of a loss you didn't economically take.
§ 01The 61-Day Window
The window is bigger than the "30 days" everyone quotes. It's 61 days total: 30 days before the sale, the day of the sale itself, and 30 days after.
The "before" half is the part that ambushes people. You don't have to repurchase after selling to trigger it. If you bought more shares of the same stock three weeks ago and then sold your original lot at a loss today, that earlier purchase can wash the loss just as effectively. Any acquisition of a substantially identical security anywhere in that 61-day band counts.
Dollar-cost averaging and automatic investing make this easy to trip. A recurring buy that lands two weeks before you harvest a loss is a purchase inside the window.
§ 02What Happens to the Loss (the Math)
In a taxable account, a wash sale doesn't destroy the loss — it defers it. The disallowed loss gets added to the cost basis of the replacement shares, and the holding period of the old shares tacks on too. You'll get the benefit eventually, when you sell the replacements.
A worked example. You bought 100 shares at $50 ($5,000). You sell them at $30 ($3,000), a $2,000 loss. But eight days later you rebuy 100 shares at $32. Wash sale. That $2,000 loss is disallowed this year — and instead it's added to your new shares' basis: they cost $3,200 but your tax basis becomes $3,200 + $2,000 = $5,200. So when you eventually sell those, you'll recover the $2,000 through a smaller gain or bigger loss.
So a wash sale in a regular brokerage account is an inconvenience — a timing problem — not a catastrophe. The catastrophe is the IRA version.
§ 03The IRA Trap: Loss Gone Forever
Here's the one that actually destroys money. Sell a stock at a loss in your taxable account, then buy the same stock in your IRA or Roth IRA within 30 days, and the loss is permanently disallowed. It's not deferred. It's not added to basis anywhere — because the IRS said in Rev. Rul. 2008-5 that there's no basis adjustment for the IRA shares. The loss simply ceases to exist.
Think about how easy this is to do by accident. You harvest a loss in your brokerage account, then your IRA's automatic investing or a rebalance buys the same fund a week later. You've just thrown away a real tax deduction with no recourse. This is the single most expensive wash-sale mistake, and it's entirely avoidable once you know to watch for it.
§ 04Every Way It Gets Triggered
The rule reaches further than one account and one buy order. It's triggered by:
- Repurchase in any of your accounts — taxable, IRA, Roth, 401(k)-style accounts.
- Your spouse's accounts. A purchase by your spouse inside the window counts as yours.
- A company you control. Buying through a business entity you control can trigger it.
- Dividend reinvestment (DRIP). Automatic reinvested dividends are purchases. A few reinvested shares during the window can wash part of your loss. Turn DRIP off on a position you plan to harvest.
- Buying options or contracts to acquire substantially identical stock — including some call options — can trigger it.
§ 05What "Substantially Identical" Means
The whole rule hinges on this phrase, and the IRS has never given a bright-line definition. What we know:
- The same stock is obviously substantially identical to itself.
- Two different companies' stocks are not — selling Ford at a loss and buying GM is fine.
- Two index funds tracking the same exact index from different providers is a gray area most practitioners treat as risky.
- Two funds tracking different indexes with similar exposure (say, an S&P 500 fund and a total-market fund) are generally not substantially identical — which is exactly what makes loss harvesting practical.
Bonds and preferred shares with materially different terms generally aren't substantially identical to the common stock either. When in doubt, change the issuer and the index.
§ 06The Crypto Carve-Out
Section 1091 applies to "stock or securities." The IRS classifies cryptocurrency as property, not a security — so as of 2026, crypto isn't covered by the wash sale rule. You can sell Bitcoin at a loss and rebuy it the same minute, claim the full loss, and never give up your position.
It's a genuine advantage for volatile assets, and it's perfectly legal today. But treat it as temporary: closing this gap has appeared in multiple budget proposals and keeps resurfacing. The carve-out covers crypto only — it does not extend to crypto-related stocks or ETFs, which are securities and fully subject to the rule.
§ 07How to Stay Clear
Avoiding a wash sale is mostly discipline:
- Wait 31 days before rebuying the identical security — the clean, simple path.
- Or swap into a similar-but-not-identical fund immediately, so you stay invested without triggering the rule. (That's the core mechanic of tax-loss harvesting — the strategy this rule governs.)
- Turn off automatic reinvestment on positions you're harvesting.
- Coordinate across the household — your accounts, your spouse's, and your IRAs.
- Watch your 1099-B. Brokers flag wash sales within a single account, but they generally don't see across institutions, your spouse's accounts, or your IRA. Those are on you to track.
§ 08Key Takeaways
A wash sale is selling at a loss and buying a substantially identical security within 61 days (30 before, 30 after) — and it disallows the loss.
In a taxable account the loss is deferred into the replacement's basis; in an IRA it's destroyed permanently.
It spans your spouse's accounts, DRIP buys, and some options — and your broker's 1099-B won't catch all of it.
Crypto is exempt in 2026 — but only the coins themselves, not crypto stocks, and maybe not for long.
This rule is the guardrail around tax-loss harvesting; for how the gains you offset are taxed, see the 2026 capital gains guide and the calculator.
Sources: IRC §1091 (wash sales); IRS Publication 550 (Investment Income and Expenses); Rev. Rul. 2008-5 (wash sales involving IRAs). General information, not tax advice.