The wash sale rule explained, with examples
The wash sale rule stops you from selling a share to claim a tax loss and buying it straight back. It catches far more traders by accident than on purpose.
The rule in one sentence
If you sell a share or other security at a loss and buy the same or a “substantially identical” one within 30 days before or after the sale, you cannot deduct that loss now.
Counting the day of the sale, that is a window of 61 days.
An example
| Date | What you do | Result |
|---|---|---|
| 1 March | Buy 100 shares at $50 | Cost $5,000 |
| 10 June | Sell 100 shares at $40 | Loss of $1,000 |
| 20 June | Buy 100 shares at $42 | Wash sale. The $1,000 loss is not deductible now |
| New cost basis | $42 + $10 = $52 per share |
The loss is not gone. It is added to the cost of the new shares, so you get it back when you finally sell them for good. The holding period of the old shares carries over too.
Where traders get caught
- Buying before the sale. The window runs 30 days backwards as well. Adding to a position and then selling the older shares at a loss can trigger it.
- Other accounts. The rule looks at all your accounts, and at your spouse’s. A purchase in a retirement account counts, and there the loss can be lost for good.
- Automatic purchases. Dividend reinvestment and regular savings plans buy shares for you inside the window.
- Options. Buying a call on the share you just sold at a loss can count as buying it back.
- Year end. A wash sale in December pushes the loss into next year, while this year’s gains are still taxed.
How to stay clear of it
- Wait 31 days before you buy the same share again.
- If you want to stay invested, buy something similar but not substantially identical – for example a different company in the same sector.
- Turn off dividend reinvestment for positions you plan to sell at a loss.
- Check the wash sale adjustments on your Form 1099-B. Your broker only tracks identical securities in the same account; the rest is your responsibility.
What it does not cover
The rule applies to losses, not gains. It does not apply to futures taxed under the 60/40 rule. At the time of writing it is written for stocks and securities; whether and how it applies to other assets has been the subject of proposals in Congress, so check the current position. See day trading taxes and taxes for traders.
More for US traders: Good faith violation · How to trade futures · MES futures · Day trading taxes
About this content: Our articles explain how trading works, with an emphasis on risk. They are general information and not personal investment advice.