
A wash sale happens when you sell a stock or other security at a loss and then buy a substantially identical one within 30 days before or after the sale. When that happens, the IRS disallows the tax loss under the wash sale rule. You don’t lose the loss forever, it’s added to the cost basis of the replacement shares, but you can’t use it to offset this year’s gains the way you planned.
The 61-day window
The rule, found in Section 1091 of the tax code, looks at a 61-day window: the 30 days before you sell, the day of the sale itself, and the 30 days after. If you buy a substantially identical security anywhere inside that window, the loss on the sale is disallowed for tax purposes. It doesn’t matter whether the repurchase happens in the same brokerage account. The IRS looks across all of your accounts, including accounts at different brokers.
The disallowed loss isn’t destroyed. It’s added to the cost basis of the replacement shares, which means you’ll eventually get the benefit when you sell those shares for good, assuming you don’t trigger the rule again. But the whole point of tax-loss harvesting is timing: capturing the loss in a specific tax year. A wash sale defeats that timing.
A worked example
Say you bought 100 shares of a stock at $50, for $5,000 total, and it falls to $30. You sell everything for $3,000, realizing a $2,000 loss you plan to use against your other gains. Two weeks later, convinced the stock will rebound, you buy 100 shares back at $32.
That’s a wash sale. The $2,000 loss is disallowed this year. Instead, it’s added to the basis of your new shares: your cost basis becomes $3,200 plus the $2,000 disallowed loss, or $5,200 for 100 shares. If you later sell those shares at $60 for $6,000, your taxable gain is only $800 instead of $2,800. The loss is preserved, just deferred.
The IRA trap
Here’s the version that actually hurts. In 2008, the IRS ruled that if you sell a security at a loss in your taxable account and repurchase it inside your IRA within the window, the loss is disallowed and the basis adjustment is permanently lost, because IRA basis doesn’t matter for tax purposes. The loss doesn’t get deferred. It vanishes. This is the one wash sale mistake that can cost you real money, so be especially careful with repurchases across account types.
What “substantially identical” means
The tax code never precisely defines “substantially identical,” which is where the judgment calls live. Selling one company’s stock and buying a different company’s stock is clearly fine. Selling shares of a mutual fund and buying a different fund that tracks the same index is a gray area many tax professionals treat cautiously. Selling an ETF and buying a different ETF that tracks a different index is generally viewed as safe, since the holdings differ. When in doubt, the conservative move is to wait out the full 31 days.
One trap people miss: automatic dividend reinvestment. If your broker automatically reinvests dividends, those small purchases count as repurchases and can trigger the rule on a position you thought you’d cleanly exited. Turn off dividend reinvestment on any holding you’re harvesting losses from, at least until the window closes.
How to avoid a wash sale
The simplest approach is patience: sell at a loss and wait at least 31 days before repurchasing the same security. If you want to stay invested in the meantime, buy something similar but not substantially identical, like swapping one broad-market ETF for another that tracks a different index, so your portfolio’s exposure barely changes while the loss stays clean.
None of this is tax advice, and the rules have edge cases that depend on your situation. But the core idea is simple enough to remember: the IRS won’t let you manufacture a tax loss on a position you never really gave up. For a deeper playbook on legally minimizing what you owe, Mark Quann’s strategies, reviewed in Be Smart Pay Zero Taxes, are worth a read.











You must be logged in to post a comment.