The wash sale rule: a 30-day example across accounts and options
Lesson 5 · about 11 min
Education, not tax advice: rules, rates and thresholds change every year, so confirm anything you plan to act on with a qualified tax professional.
The wash sale rule is the single most misunderstood rule in trader taxation, and the one most likely to produce a surprise. It does not create tax out of nothing, but it can move a loss to a year when you cannot use it, and in one specific case it can destroy the loss entirely.
The rule
Under Section 1091, if you sell a security at a loss and buy a substantially identical security within 30 days before or 30 days after the sale, the loss is disallowed for now. The window is 61 days wide with the sale in the middle.
The disallowed loss is not gone. It is added to the basis of the replacement shares, and the holding period of the sold shares tacks on to the replacement. You recover the loss when you finally sell the replacement without buying again inside the window.
Three details do the damage:
- It applies to losses only. Gains are always recognized.
- "Buy" includes buying before the loss sale. A purchase on the 5th and a loss sale on the 20th of a larger position is a wash on the shares matched to that purchase.
- It looks across all your accounts, your spouse's accounts, and entities you control. Brokers only check within one account.
A worked 30-day example
| Date | Action | Notes |
|---|---|---|
| Jun 2 | Buy 100 shares at $50 | Basis $5,000 |
| Jun 18 | Sell 100 shares at $44 | Loss $600 realized (so far) |
| Jul 9 | Buy 100 shares at $46 | 21 days after the sale: inside the window |
The $600 loss is disallowed. The new lot's basis becomes $4,600 + $600 = $5,200, and its holding period is treated as starting Jun 2.
| Date | Action | Result |
|---|---|---|
| Sep 15 | Sell 100 shares at $53 | Proceeds $5,300 − basis $5,200 = $100 gain |
Economically the trader lost $600 and then made $700, net +$100, and that is exactly what is taxed. The rule changed when the loss counted, not whether. The problem arises when the replacement is still open on December 31 (next lesson), or when the replacement was bought somewhere the loss can never come back.
Across accounts, including the IRA
Sell at a loss in a taxable account and buy the same stock in your IRA within 30 days, and the loss is disallowed under Revenue Ruling 2008-5. Because an IRA has no tax basis to adjust, the loss is permanently lost. This is the one wash-sale case with no recovery. Automatic dividend reinvestment in an IRA holding the same stock or fund you are actively trading in a taxable account is a common, silent way to trigger it.
Spouse's accounts count the same way. Two brokers count. The broker's 1099-B will show nothing, and the obligation to report the wash is yours.
Options and "substantially identical"
The statute does not define "substantially identical", and the IRS has never published a precise test. What is reasonably settled:
- A call option on a stock is treated as substantially identical to the stock for wash-sale purposes. Sell the stock at a loss, buy a call within 30 days: wash.
- Closing an option at a loss and opening the same option (same underlying, strike and expiry) within the window: wash. Brokers apply this.
- Closing an option at a loss and opening a different strike or expiry on the same underlying: brokers generally do not flag this, but the IRS can argue it if the two contracts are economically equivalent. Deep in-the-money calls are the riskiest case.
- Selling a put is not the same as buying the stock for wash purposes, unless the put is so deep in the money that assignment is nearly certain.
- Two ETFs tracking different indexes are not substantially identical. Two ETFs tracking the same index from different sponsors are a grey area most professionals treat as substantially identical.
Option example. Buy 1 call for $400 on Mar 3. Sell it for $150 on Mar 20 (loss $250). Buy the same call for $180 on Apr 2. The $250 is disallowed and added to the new call's basis: $180 + $250 = $430. Sell the new call for $500 on Apr 20: gain $70. Again, the economics (−$250 + $320 = +$70) survive; only timing moved.
Loss on part of a position
If you sell 300 shares at a loss and buy back 100 within the window, only one third of the loss is washed. The rule matches replacement shares to sold shares one for one.
Key idea: Sell at a loss, buy the same or substantially identical thing within 30 days either side, and the loss moves into the replacement's basis instead of your return. Across all your accounts. If the replacement is in an IRA, the loss is gone for good.
What does not trigger it
- Selling at a gain; the rule never applies to gains.
- Waiting 31 days.
- Buying a genuinely different security (a different company, a fund tracking a different index).
- Section 1256 contracts (futures, broad index options) are exempt from wash sale rules. Lesson 3.
- Crypto, at the time of writing, because it is property rather than a security; proposals to change this have been introduced repeatedly. Module 4.
- Traders operating under a Section 475(f) election, for the securities covered by the election. Module 3.
Try it: Take one ticker you traded actively last year. List every loss sale and every purchase within 30 days on either side of each one, in every account you or your spouse hold. Count the matches. That count is roughly how many wash-sale adjustments your return needs that the broker may not have reported.
Recap
- Loss sale plus a substantially identical purchase within 30 days before or after = loss disallowed, added to the replacement's basis.
- The holding period tacks; the loss is deferred, not destroyed, unless the replacement is in an IRA.
- The rule spans all your accounts and your spouse's; brokers check only their own.
- Calls on the same stock and identical options are substantially identical; different strikes and different-index ETFs generally are not.
- Gains, 31-day waits, 1256 contracts, crypto (currently) and 475(f) traders are outside the rule.
See it drawn
Original diagrams for the ideas on this page. Illustrative, not real market data.