What Is the Wash Sale Rule? Plain-English Guide

What is the wash sale rule? It is a US tax rule that stops you claiming a loss on a sale of stock or other securities if you buy the same or a "substantially identical" security within 30 days before or after that sale. The loss isn't gone for good in most cases: it is added to the cost basis of the new shares and claimed later.
At a glance
- The window is 61 days: 30 days before the sale, the sale date and 30 days after.
- It only affects losses. Gains are taxed as normal.
- The disallowed loss is added to the cost basis of the replacement shares.
- Purchases in other accounts, including an IRA, can trigger it.
What does a wash sale mean?
A wash sale happens when you sell a security at a loss and, within 30 days either side, you buy it back (or buy something substantially identical). In tax terms, your position hasn't really changed: you still own the investment, so the IRS won't let you book the loss right now. The SEC's Investor.gov wash sale definition summarises it in the same way.
The rule exists to stop a simple trick: selling a losing stock in late December to cut your tax bill, then buying it straight back so you keep the investment. Without the rule, investors could create tax losses on paper whenever they liked.
You may also hear "it's a wash" in everyday speech. That simply means something broke even, with the gains and losses cancelling out. It is unrelated to the tax rule, apart from the shared idea that nothing really changed.
How does the wash sale rule work?
Three things happen when a wash sale is triggered:
- The loss is disallowed for the current tax year, either in full or in proportion to how many shares you bought back.
- The disallowed loss is added to the cost basis of the replacement shares, which raises their basis and reduces your taxable gain (or increases your loss) when you eventually sell them.
- The holding period carries over, so the time you held the original shares is added to the replacement shares when deciding whether a future gain is short-term or long-term.
A worked example
| Date | Action | Result |
|---|---|---|
| March | Buy 100 shares at $50 ($5,000) | Cost basis $5,000 |
| 10 November | Sell all 100 at $40 ($4,000) | $1,000 loss on paper |
| 25 November | Buy 100 shares again at $42 ($4,200) | Within 30 days, so a wash sale |
| Tax return | The $1,000 loss can't be claimed this year | New basis: $4,200 + $1,000 = $5,200 |
If you later sell the new shares for $5,500, your taxable gain is $300 rather than $1,300, so the earlier loss is recovered at that point. Your broker usually reports the adjustment as "wash sale loss disallowed" on Form 1099-B.
What counts as buying back?
The rule is broader than many investors expect. Buying any of the following within the 61-day window can trigger it:
- The same stock or fund, in the same account or a different one.
- The same shares bought in an IRA or other retirement account.
- Purchases by your spouse.
- Options or contracts to acquire the same stock, such as buying call options.
- Shares bought automatically, for example through dividend reinvestment.
The IRA case is the most painful: because the replacement shares sit in a retirement account, the basis adjustment generally doesn't help you, and the loss can be lost permanently. The window also looks backwards: buying more shares in the 30 days before a loss-making sale counts too.
"Substantially identical" has no precise definition. The same company's shares clearly count. Two funds tracking exactly the same index may be treated as identical, while funds tracking different indexes are generally viewed as different, but the IRS hasn't given firm guidance, so this is a grey area. Our explainer on what a stock market index is explains how index funds differ.
How do wash sales affect tax-loss harvesting?
Tax-loss harvesting means selling investments at a loss to offset taxable gains elsewhere. Losses first offset gains, and the IRS rules in Topic 409 on capital gains and losses explain how any excess can reduce other income, within limits. The wash sale rule is the main trap. Investors who want to stay invested commonly do one of the following:
- Wait 31 days before buying back the same security.
- Buy something similar but not identical in the meantime, accepting that it will perform slightly differently.
- Pause dividend reinvestment on the holding they plan to sell.
Selling for tax reasons should still fit your wider plan; our guide on when to sell a stock covers the other reasons to sell, and our guide on how to sell stock covers the mechanics.
Limitations and what to watch
- Brokers only see their own accounts. Your 1099-B reflects wash sales within one account at one firm; you are responsible for spotting those across accounts, brokers or a spouse's account.
- It applies only to taxable accounts. Selling at a loss inside an IRA has no tax effect anyway.
- Frequent traders can trigger many wash sales in a year, which makes records complicated.
- This is general information. Tax rules change and individual situations differ, so check IRS guidance or a tax professional before acting.
Common questions
Does the wash sale rule apply to gains?
No. It only disallows losses; if you sell at a gain and buy back immediately, the gain is taxed normally.
How long do I have to wait to avoid a wash sale?
You need to avoid buying the same or a substantially identical security for 30 days after the sale, and not to have bought it in the 30 days before.
Is a wash sale illegal?
No. A wash sale is not illegal; it simply means the loss can't be claimed yet and is added to the basis of the new shares instead.
Is a wash sale the same as a wash trade?
No. A wash trade is a form of market manipulation, where someone buys and sells to themselves to fake trading activity, while a wash sale is a tax term about claiming losses.
This article is general information, not personal financial, legal or religious advice. Trading leveraged products carries a high risk of losing money quickly.


