Intermediate4 min read

Wash Sales

A loss is disallowed if a substantially identical security is bought within a window around the sale. The loss is not lost; it moves into the basis of the replacement.

MadStockAlerts Research · Updated August 29, 2026

What to take away

  • The window is 30 days before and 30 days after the sale, 61 days in total.
  • The rule catches purchases in any of your accounts, including retirement accounts.
  • A disallowed loss is added to the basis of the replacement shares.
  • Automatic dividend reinvestment is a purchase and can trigger it.
  • Substantially identical is a defined concept and is narrower than similar.

MAD Academy Training Video · 0:45

The Loss That Does Not Count Yet

Selling at a loss and repurchasing a substantially identical security within a window defers the loss rather than allowing it.

This lesson is part of a Stock Alerts + Tools plan.

See the library

The rule

If a security is sold at a loss and a substantially identical security is acquired within thirty days before or thirty days after that sale, the loss is disallowed for that year. The window is sixty-one days including the day of sale.

The loss is not permanently lost. It is added to the cost basis of the replacement shares, which reduces the eventual gain or increases the eventual loss when they are sold. The holding period of the disposed shares is also added to the replacement's.

This describes how the rules are structured and is not tax advice. Tax rules change, they interact, and the treatment of any particular situation depends on circumstances that only a qualified professional can assess.

The sixty-one day window
30 days beforeA purchase here disallows a loss realised later
The sale
30 days afterIncluding automatic reinvestments and purchases in other accounts
-30 days+30 days
A purchase of a substantially identical security anywhere in this window disallows the loss. The loss is not lost: it moves into the basis of the replacement.

What triggers it unintentionally

  • Automatic dividend reinvestment, which buys shares without any instruction at the time.
  • A purchase in a different account you own, including a retirement account, which your broker cannot see.
  • A purchase by a spouse's account, which the rule also reaches.
  • An automatic contribution or rebalancing programme that buys the same fund.
  • Selling one lot at a loss while a recent purchase of another lot sits inside the window.

The second item carries a consequence beyond deferral. Where the replacement is bought inside a retirement account, the basis adjustment cannot be used, and the loss can be permanently unavailable rather than merely deferred.

Substantially identical

The phrase is a defined concept and it is narrower than similar. Shares of the same issuer are substantially identical to each other; shares of two different companies in the same industry are not.

CaseGenerally treated as
The same company's common stockSubstantially identical
Common stock and an option on itCan be caught, depending on the facts
Two different index funds tracking the same indexUncertain, and a longstanding grey area
Two companies in the same sectorNot substantially identical
Common and preferred stock of one issuerGenerally not, though it depends on the terms

The third row is the one most argued about and the one with the least authoritative guidance. It is exactly the kind of question that a professional's judgement on a specific fact pattern is worth more than any general statement about.

How brokers report it

Brokers apply the rule to covered securities within the accounts they hold and report the adjustments on the year-end form. That reporting is real and it is partial.

A broker sees only its own accounts. Purchases at another firm, in a spouse's account, or in a retirement account elsewhere are invisible to it, and the obligation to account for those sits with the taxpayer regardless of what any form shows.

This is a description of how the reporting works rather than a statement about anyone's obligations. This describes how the rules are structured and is not tax advice. Tax rules change, they interact, and the treatment of any particular situation depends on circumstances that only a qualified professional can assess.

What the rule does not cover

The rule disallows losses, and several situations sit outside it in ways that are worth knowing precisely because they are so frequently assumed to be inside it.

SituationTreatment
Selling at a gain and rebuying immediatelyNot affected. The rule applies only to losses
Selling at a loss in a retirement accountNo loss to disallow, since none was deductible
A loss on a security and a purchase of a different issuerNot substantially identical, so not caught
Selling at a loss more than 30 days after the last purchaseOutside the window, if nothing is bought in the following 30 either
A loss realised by a fund inside its own portfolioThe fund's own accounting, not the holder's

The first row is a genuinely useful asymmetry. There is no equivalent restriction on realising a gain and immediately re-establishing the position, which is what makes the rule one-directional.

This describes how the rules are structured and is not tax advice. Tax rules change, they interact, and the treatment of any particular situation depends on circumstances that only a qualified professional can assess.

Educational content only. MadStockAlerts provides market commentary, research, and educational content. It is not personalized investment advice, and nothing here is a recommendation to buy or sell any security. Trading and investing involve substantial risk, including loss of capital. See the Risk Disclosure and Customer Agreement.