Wash Sale Rule
The wash sale rule is a US tax rule that blocks deducting a loss on a security if you buy the same or a substantially identical one within 30 days before or after the sale. The loss is not lost forever: it is added to the cost basis of the new shares.
Selling a losing position to cut your tax bill and buying it straight back sounds clever — and the US tax authority thought of it long ago. The wash sale rule stops you claiming a loss when you have not really changed your position. This entry explains the 61-day window, what counts as a repurchase, how the disallowed loss moves into your new cost basis, and how traders avoid tripping it. The rule is American; other countries have their own versions or none at all.
- Category
- Trading Basics
- Reading time
- 5 min
- Also called
- Wash sale, Wash sales, 30-day rule
- Updated
The wash sale rule in plain words
A wash sale happens when you sell stock or securities at a loss and, within 30 days before or after the sale, buy substantially identical stock or securities, or an option or contract to buy them.1
US tax rules do not allow you to deduct a loss from a wash sale.2
Instead, the disallowed loss is added to the cost basis of the new shares, so you recover it later when you sell them.1
How the wash sale rule works, step by step
You sell at a loss
A realised loss you would normally deduct. See Capital Gains Tax.
Check the 61-day window
30 days before the sale, the sale day and 30 days after.
Look for a repurchase
The same or a substantially identical security, or an option to buy it.
Loss is disallowed
You cannot deduct it this year.
Basis is adjusted
The disallowed loss is added to the new shares' cost. See Cost Basis.
Holding period carries over
The new shares inherit the old shares' holding period.
Worked examples
Example 1 — A classic wash sale
Loss deferred, not lostYou buy 100 shares for $1,000, sell them for $750, and buy 100 again within 30 days for $800.
| Loss on the sale | $1,000 − $750 = $250 |
| Deductible now | $0 (disallowed) |
| New cost basis | $800 + $250 = $1,050 |
The disallowed loss is added to the cost of the new stock, raising its basis.1
Example 2 — Recovering the loss later
$50 taxable gainContinuing Example 1, you later sell the new shares for $1,100.
| Sale price | $1,100 |
| Adjusted basis | $1,050 |
| Taxable gain | $1,100 − $1,050 = $50 |
Without the adjustment the gain would have been $300; the higher basis is how the earlier loss eventually counts.1
Example 3 — Waiting out the window
Loss allowedYou sell at a $400 loss on 1 March and buy the same stock again on 5 April — 35 days later.
| Days after the sale | 35 (more than 30) |
| Loss deductible | $400 |
Only purchases within 30 days before or after the sale create a wash sale.1 The cost is being out of the stock for a month.
What triggers a wash sale (US)
| Aspect | Triggers it | Does not |
|---|---|---|
| Same stock within 30 days | Yes | — |
| Call option on the same stock | Yes | — |
| Purchase in your IRA | Yes | — |
| Commodity futures or currencies | — | Not covered |
Where the rule matters
Tax-loss harvesting
Selling losers for tax without breaking the rule. See Tax-Loss Harvesting.
Active trading
Frequent in-and-out trades in one stock can defer many losses. See Day Trading.
Dividend reinvestment
An automatic reinvestment within 30 days can count as a repurchase.
Year-end planning
December losses with January buybacks still fall inside the window.
Advantages and disadvantages
Advantages
- Losses are deferred, not destroyed.
- Holding period carries over to the new shares.
- Clear 30-day window is easy to track.
Disadvantages
- Easy to trigger by accident with reinvestments or other accounts.
- "Substantially identical" is not precisely defined.
- A repurchase in an IRA can make the loss permanently unusable.
Going deeper
Read as far as you need. Each level builds on the one before it.
The 61-day window
Beginner
The window runs from 30 days before the sale to 30 days after, so buying first and selling the older lot at a loss also counts.1
Other accounts and people
Intermediate
A wash sale also arises if you buy the shares in a traditional or Roth IRA, and a purchase by your spouse or a corporation you control can count too.1 Brokers only track wash sales within one account, so the investor has to watch the rest.
What it does not cover
Advanced
The rules cover stock, securities and options or contracts to buy them, but not commodity futures or foreign currencies.1 Whether crypto falls under the rule depends on current law, so check the latest guidance. See Crypto Tax.
Common mistakes
Forgetting the 30 days before
Buying more shortly before selling the loss lot also counts.
Automatic reinvestment
Dividend reinvestment plans can quietly trigger it.
Buying in an IRA
That loss may never be recovered.
Assuming other countries work the same
This is a US rule; local tax law differs. See Taxable Event.
Check your understanding
Test yourself before moving on. Each answer comes with an explanation.
Key points to remember
- A wash sale is a loss sale with a repurchase within 30 days either side.
- The loss cannot be deducted at that time.
- It is added to the new shares' cost basis instead.
- IRA, spouse and option purchases can also count.
- It is a US rule — check your own country's tax law.
Frequently asked questions
Is a wash sale illegal?
Can I buy a similar but different fund?
Does the rule apply outside the US?
Further learning
- Tax-Loss Harvesting
The strategy this rule polices.
- Cost Basis
Where the disallowed loss ends up.
- Capital Gains Tax
How gains and losses are taxed.
Sources
This article is written in our own words. The sources below support the specific facts, rules and figures marked with a number in the text. Links open the original publisher’s page.
- Internal Revenue Service. Publication 550, Investment Income and Expenses (opens in a new tab) Checked .
- Investor.gov (SEC). Wash Sales (glossary) (opens in a new tab) Checked .
Educational content, not financial advice. Examples use hypothetical prices and simplified costs; actual fees, margin rules and regulations vary by broker, market and country. We are not affiliated with any publisher linked above. Last reviewed . Report an error or request a source credit.