The wash sale rule: how to harvest losses without voiding them
Sell at a loss, buy back too soon, and the IRS erases your deduction. The 61-day rule every investor eventually meets.
Selling losers to offset gains — tax-loss harvesting — is one of the few free lunches in a taxable account. The wash sale rule is the string attached: sell a security at a loss and buy it (or something 'substantially identical') back within 30 days on either side of the sale, and the loss is disallowed for now. The rule doesn't fine you; it just cancels the deduction you were harvesting.
The mechanics: a 61-day window
The window is 30 days before the sale, the sale date, and 30 days after — 61 days total. Buy substantially identical shares anywhere in that window and the loss is disallowed. It's not gone forever: the disallowed loss gets added to the cost basis of the replacement shares, so you recover it whenever you eventually sell those. The real damage is deferral — plus bookkeeping — not destruction. Unless the repurchase happens inside an IRA, where the loss is destroyed permanently.
- The 30 days BEFORE the sale counts — buying more, then selling the old lot at a loss a week later, is a wash sale.
- It applies across ALL your accounts: your taxable account, your IRA, your spouse's accounts. Selling in taxable while your IRA auto-invests in the same fund is a classic accidental wash.
- Automatic dividend reinvestment is the most common trigger of all — a $40 reinvested dividend can wash part of a deliberate harvest.
- It applies per lot: partial repurchases wash a proportional part of the loss.
- It only applies to losses. Selling at a gain and rebuying instantly is fine (that's tax-gain harvesting).
'Substantially identical' — the gray zone
The IRS has never precisely defined it. Clearly identical: the same stock, the same fund, options on the stock you sold. Clearly different: stocks of two different companies, or a total-market fund vs. a sector fund. The practical gray zone is index funds: two S&P 500 funds from different companies track the same index, and many professionals treat swapping between them as risky. The standard playbook is to swap between similar-but-not-identical indexes — S&P 500 to a total-market or large-cap index fund — which keeps your allocation intact while being defensibly different.
How to harvest cleanly
- Before selling, check for purchases of the same security in the last 30 days — including reinvested dividends — in every account you and your spouse own.
- Turn off dividend reinvestment in taxable accounts (take dividends as cash and invest them manually) to kill the most common accidental wash.
- Pick your replacement in advance: a similar-but-different fund (different index) so you're never out of the market.
- Either hold the replacement permanently, or wait 31+ days before switching back to the original.
- Check your 1099-B in January — brokers flag wash sales within one account, but only YOU can catch cross-account and spousal washes.
What a clean harvest is worth
Swap pairs that keep you invested
The practical heart of clean harvesting is having your replacement picked before you sell. The goal is a fund with near-identical behavior that tracks a DIFFERENT index: S&P 500 fund to a total-US-market fund (the two correlate at roughly 0.99), one total-international fund to another built on a different index, a Treasury fund to a similar-duration aggregate bond fund. What you should avoid is swapping a fund for another fund tracking the SAME index from a different provider — cheap identical exposure, but the least defensible position if 'substantially identical' is ever tested. And skip options-based cleverness entirely: buying calls on a stock you just sold at a loss is explicitly a wash sale under the rule's own text.
Worth internalizing once: the rule's cross-account reach includes retirement accounts you fund automatically. The classic self-inflicted wash is selling an index fund at a loss in taxable on the 10th while a 401(k) contribution buys the same fund on the 15th. Payroll contributions to a target-date fund are generally safe (a target-date fund isn't substantially identical to its components), which is one more quiet argument for target-date funds in workplace plans.
The bottom line
The wash sale rule says you can't claim a loss on something you never really stopped owning. Respect the 61-day window, remember it spans every account in the household, turn off automatic reinvestment in taxable accounts, and harvest into a similar-but-different fund the same day. Do that and tax-loss harvesting stays what it should be: a paperwork trick that turns market dips into real tax savings.
Check your understanding
1 of 3Not quite — try again.
Get smarter about money every week
One email, no spam — practical guides and Worth updates. Unsubscribe anytime.
Put this into practice
Worth tracks your accounts, budgets, and goals — so the concepts in this article aren't just theory.
Start free trial