Stoia

The Wash Sale Rule: 61 Days That Decide Whether Your Loss Counts

By the Stoia team · August 16, 2026 · 5 min read

You sell a losing stock to capture the tax loss, then buy it back a week later because you still believe in it. On paper you changed nothing: same shares, same portfolio. The IRS agrees, and that is precisely the problem. The wash sale rule erases the deduction when a sale and a repurchase cancel each other out, and it catches far more careful people than reckless ones.

The window runs both directions

The rule disallows a loss if you buy the same or a substantially identical security within 30 days before or 30 days after the losing sale. Count the sale day itself and you get a 61-day danger zone with the sale in the middle. The "before" half is the one that surprises people: buying shares on the 1st and selling older shares at a loss on the 15th washes the loss just as surely as rebuying afterward. Automatic purchases count too, which is where most accidental wash sales come from: dividend reinvestment, a recurring monthly buy, or a retirement plan contribution can each land inside the window without you touching anything.

The rule also reaches across accounts. A repurchase in your IRA, or in a spouse's account, washes a loss taken in your taxable account. The IRA version is the worst case: the disallowed loss normally survives inside the replacement shares, but shares inside an IRA have no usable basis, so there the loss dies permanently.

"Substantially identical," in plain words

The same ticker is always identical, and so are contracts or options on it. Two funds from different sponsors tracking the same index sit in a gray zone the IRS has never precisely resolved, close enough that many people treat them as identical to stay safe. A fund tracking a meaningfully different index (a total-market fund versus a large-cap-only fund, or a different sector) is generally treated as not identical, even though the two move together most days. Different companies in the same industry are clearly fine. The test is the security, not the storyline: selling one airline and buying another is not a wash sale, however similar the bet.

The loss is not destroyed, it moves

A wash sale does not fine you; it relocates the loss. The disallowed amount is added to the cost basis of the replacement shares, and the old holding period tacks on. Worked through with numbers:

  1. You buy 100 shares at $50, a $5,000 position, and later sell all 100 at $38. That is $3,800 back and a $1,200 loss.
  2. Twelve days later you rebuy 100 shares at $40, spending $4,000. The repurchase sits inside the window, so the $1,200 loss is disallowed for this year's return.
  3. The loss moves into the new shares: your basis becomes $4,000 plus $1,200, or $5,200, instead of $4,000.
  4. Sell later at $55 and the taxable capital gain is $300 ($5,500 minus $5,200) rather than the $1,500 a fresh buyer would owe. The benefit arrived late, not never.

If you rebuy fewer shares than you sold, only that portion washes: rebuy 40 of the 100 and 40% of the loss is disallowed while the rest still counts. And because the deferred loss changes future gains, it changes future tax: the capital gains tax calculator shows what a $300 gain versus a $1,500 gain actually costs at your income.

Staying invested without triggering it

  • Wait out the window. Sit in cash for 31 days after the sale. Simple, but you are out of the market and a rebound can cost more than the deduction was worth.
  • Swap into a similar, not identical, fund. Sell the large-cap index fund at a loss and hold a total-market fund for a month (or permanently). You keep market exposure while the loss stands. Compare costs before you swap: if the replacement charges a higher expense ratio, the investment fee calculator will show whether a permanent fee difference quietly outgrows the one-time tax benefit.
  • Silence the robots first. Turn off dividend reinvestment and pause recurring buys for that security, in every account you and your spouse hold, before selling for the loss.

Why December is wash sale season

Most deliberate loss-taking happens in December, when people clean up portfolios before the tax year closes. Three traps cluster there. First, the window crosses the calendar boundary: sell at a loss on December 20 and a repurchase on January 10 still voids the deduction on the return you are about to file. Second, many funds pay their annual distributions in December, and automatic reinvestment of that distribution is a purchase inside the window. Third, the "before" side catches anyone who bought the dip in late November and harvests the older, more expensive shares a few weeks later. The fix is boring and effective: check the last 30 days of activity before selling, and hold the replacement plan for 31 days after.

The rule is a speed bump, not a wall

Nothing about the wash sale rule stops you from taking losses; it only insists the sale be a real change in position rather than a paper shuffle. Know the window, pick your replacement in advance, and the deduction survives. It helps to see every account in one place while you do it, since the rule spans all of them: a single view of your accounts makes the 30-day lookback a glance instead of a spreadsheet hunt.

This article is for educational purposes only and is not financial, legal, or tax advice. Figures and third-party prices were checked at publication and may have changed. See our disclaimer.

See your whole financial picture, calmly

Stoia brings everything you own and owe into one clear view. Launching in 2026 on iOS, Android, and the web.

Coming soon