Investor reviewing tax paperwork with a calculator to check a wash sale rule mistake on a tax-loss harvest

The Wash Sale Rule: How a $3,100 Tax Deduction Shrank to $403 (Case Study)

A $3,100 capital loss should be worth up to $720 off your federal tax bill. For the investor in today’s case study, it ended up being worth about $97 — because 13 days after selling, she bought most of the position back. That’s the wash sale rule at work, and it’s the single most common way do-it-yourself investors sabotage a tax-loss harvest. In this post you’ll see exactly how the deduction evaporated, the math behind what a disallowed loss actually costs, and five steps to harvest losses without handing the deduction back to the IRS.

This article is part of our Tax Strategy Guide — a comprehensive overview of the topic with related deep dives.

The case study: a routine tax-loss harvest goes sideways

The scenario below is a composite, but every mechanic in it is real and shows up constantly in brokerage accounts.

Maya holds a total-market index fund in a taxable brokerage account. During an April drawdown, she decides to harvest the loss: on April 14 she sells 200 shares at $45.00 that she originally bought at $60.50 — a realized loss of $15.50 per share, or $3,100. So far, textbook. If you’re wondering whether a harvest this size is even worth the effort, we ran that exact math in our breakdown of tax loss harvesting for small portfolios — a $3,100 loss clears the bar comfortably.

Then two things happen inside the next 30 days:

First, the market keeps sliding, and on April 27 Maya can’t resist buying the dip. She repurchases 160 shares of the same fund in the same taxable account at $43.10.

Second — and this is the one almost everyone misses — her Roth IRA has an automatic investment plan pointed at the same fund. It buys 7 shares on April 20 and 7 more on May 4, both inside the window. She never touched anything; the automation did it for her.

Total replacement shares purchased within 30 days of the sale: 174. Under the wash sale rule, the loss on 174 of her 200 sold shares is disallowed. The deductible loss on her 2026 return drops from $3,100 to 26 × $15.50 = $403.

What the wash sale rule actually says

The wash sale rule, laid out in IRS Publication 550, disallows a loss deduction when you sell a security at a loss and buy the same or a “substantially identical” security within 30 days before or after the sale — a 61-day window counting the sale date itself. Three details do most of the damage in practice:

It looks backward, not just forward. Shares you bought in the 30 days before a loss sale can trigger a wash sale too, including shares purchased through automatic dividend reinvestment.

It spans all your accounts. The rule isn’t applied account by account. Repurchasing in a second brokerage account, a spouse’s account, or — per IRS Revenue Ruling 2008-5 — a traditional or Roth IRA still triggers it. The IRA version is the nastiest, as we’ll see below.

Disallowed usually means deferred, not destroyed. When the replacement shares sit in a taxable account, the disallowed loss is added to the cost basis of those new shares, and the old holding period carries over. You get the loss back when you eventually sell the replacements. That’s a real consolation prize — but a deferred deduction is worth less than one you can use this year, and in one specific case it’s worth nothing at all.

I harvest losses in my own taxable index-fund portfolio, and my closest call didn’t come from a trade — it came from automation I’d set up years earlier and stopped thinking about. As a software engineer I’m generally pro-automating your finances, but tax-loss harvesting is the one workflow where every auto-purchase is a landmine with a 61-day fuse. Now the first thing I do before selling anything at a loss is grep every account for standing orders on that fund. It takes five minutes and it has saved me twice.

The math: where the $3,100 went

Here’s the full accounting of Maya’s harvest:

Item Shares Loss amount Tax treatment
Total realized loss (200 sh × $15.50) 200 $3,100
Matched to taxable repurchase (Apr 27) 160 $2,480 Disallowed now; added to basis of new shares (deferred)
Matched to Roth IRA auto-purchases 14 $217 Disallowed permanently (Rev. Rul. 2008-5 — no basis adjustment in an IRA)
Allowed loss on 2026 return 26 $403 Deductible

What was the deduction supposed to be worth? Under IRS Topic 409, net capital losses can offset up to $3,000 of ordinary income per year ($1,500 married filing separately), with the excess carried forward. Assuming Maya has no capital gains this year and sits in the 24% bracket, the intended harvest was worth 24% × $3,000 = $720 this year, with $100 carrying forward. After the wash sales, the usable loss is $403, worth about $97.

The stakes scale with your bracket because harvested losses first offset gains — and short-term gains are taxed at ordinary rates of up to 37%, versus 0%, 15%, or 20% for long-term gains. That asymmetry is a big part of why Vanguard’s research on the strategy estimates that systematic tax-loss harvesting has historically added on the order of 1% a year in after-tax value for investors who can fully use the losses, with wide variation across market environments. A wash sale doesn’t just delay that value — in the IRA case, it deletes it.

Five steps to harvest losses without tripping the wash sale rule

1. Inventory every account that can touch the fund. Before selling, list each account — yours, your spouse’s, and every IRA — that holds or automatically buys the security. Cross-account purchases are the failure mode brokers won’t catch for you.

2. Pause automation for the full 61-day window. Turn off dividend reinvestment for that fund in taxable accounts and suspend any automatic investment plans (including IRA auto-invest) pointed at it. A single reinvested dividend creates a wash sale on the shares it buys.

3. Check the 30 days behind you before you sell. If a dividend reinvested or an auto-purchase executed in the past month, those shares are already replacement shares. Either sell them too or accept a partial disallowance.

4. Swap, don’t sit — but swap into something not substantially identical. You don’t have to sit in cash for 31 days and risk missing a rebound. Moving from a total-market fund to an S&P 500 fund (or vice versa) keeps you invested in a similar exposure while avoiding the “substantially identical” trap. The IRS has never precisely defined the term, so different share classes of the same fund are clearly out, while funds tracking different indexes are the widely accepted safe harbor. The fund-structure details matter here — our piece on ETF vs mutual fund taxes covers why the vehicle you swap into changes your future distributions too.

5. Verify on your 1099-B — but don’t rely on it. Brokers report disallowed wash sale losses in box 1g of Form 1099-B, but they’re only required to flag wash sales on identical securities within the same account. Purchases in your IRA or at another broker won’t appear there; tracking those is entirely on you.

When a wash sale is a delay — and when it’s forever

It’s worth being precise about the two outcomes, because one is annoying and the other is expensive.

Maya’s 160-share taxable repurchase is the annoying kind. Her disallowed $2,480 gets added to the new shares’ cost basis ($43.10 + $15.50 = $58.60 per share), so when she eventually sells them, the loss resurfaces. She’s lost timing and flexibility, not the dollars — though if she’d planned to use losses this year to offset a Roth conversion, the sequencing damage is real. (Deciding which lever to pull first is its own problem — see our guide to tax loss harvesting vs Roth conversion.)

The 14 IRA shares are the expensive kind. Revenue Ruling 2008-5 says the loss is disallowed and there’s no basis adjustment inside the IRA — that $217 of loss is simply gone, forever. Small here; not small when the auto-invest is $1,000 a paycheck.

And notice what actually caused the mess: not the tax code, but the itch to buy back a falling fund she’d just sold. That impulse — treating the shares you just sold as special — is a cousin of the disposition effect, and it’s why the cleanest harvests are the ones where the replacement fund is chosen before the sell order is placed.

Key takeaways

  • The wash sale rule disallows a loss if you buy the same or a substantially identical security within 30 days before or after the sale — a 61-day window, across all your accounts.
  • Dividend reinvestment and automatic investment plans are the most common accidental triggers. Pause them before harvesting.
  • A wash sale in a taxable account defers the loss via a basis adjustment; a repurchase in an IRA destroys it permanently (Rev. Rul. 2008-5).
  • Swap into a similar-but-not-identical fund (e.g., total market → S&P 500) to stay invested without triggering the rule.
  • Your broker’s 1099-B only flags same-account wash sales — cross-account tracking is your job.

Photo by Kelly Sikkema on
Unsplash

Chris Steve

Written by Chris Steve

Chris Steve is a software engineer with a deep interest in personal finance, behavioral economics, and AI. He started Money & Planet to share clear, research-backed money guides — the kind that explain the math instead of pushing products. His writing focuses on long-term wealth building, the psychology behind spending and investing decisions, and the practical tools regular people can use to make smarter financial choices.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *