
Wash Sale Rule Complete Guide: The 61-Day Trap Across All Accounts
Master the IRS wash sale rule: the 61-day window, substantially identical test, basis adjustment, and the permanent-loss IRA trap to avoid.
Wash Sale Rule Complete Guide — Master the IRS wash sale rule: the 61-day window, substantially identical test, basis adjustment, and the permanent-loss IRA trap to avoid.
Tax-loss harvesting is worthless if the IRS disallows the loss. The wash sale rule is the trap, and it spans all your accounts — including your spouse's and your IRA.
The Rule
If you sell a security at a loss and buy a "substantially identical" security within 30 days before or 30 days after the sale (a 61-day window), the loss is disallowed in the current year.
The disallowed loss is not gone — it is added to the basis of the replacement shares and recovered when those shares are sold. The holding period of the original also carries over.
What Counts as "Substantially Identical"
- Same company stock in two accounts → identical.
- Different companies in the same sector → not identical (e.g., sell JPM, buy BAC).
- An ETF and another ETF tracking a different index → generally not identical.
- Two ETFs tracking the same index (e.g., SPY and IVV) → treat as high-risk; many practitioners say avoid the pairing.
- Stock and options on that stock → identical at exercise; call options bought within the window can trigger the rule.
The IRA Trap (Permanent Loss)
Under Revenue Ruling 2008-5, if you sell a stock at a loss in your taxable account and buy it back in your IRA within the 61-day window, the loss is disallowed and not added to any basis — it disappears forever. This is the most expensive version of the rule.
Cross-Account Tracking
Brokers only flag wash sales within their own platform. Losses triggered by a repurchase at a different broker, or by an automatic dividend reinvestment in an IRA, will not show on your 1099-B but are still your responsibility to report correctly.
Practical Example
- Jan 1: Buy 100 XYZ at $80.
- Mar 1: Sell at $50 → $3,000 loss.
- Mar 10: Buy 100 XYZ at $52 (inside window).
- Result: $3,000 loss disallowed now; new basis = $52 + $3,000 = $3,052 per the lot adjusted (i.e., $5,200 + $3,000 = $8,200 total).
Safe Harvesting Substitutes
Instead of repurchasing the same security:
- Swap to a similar-but-not-identical fund (VTI → ITOT, or SPY → VOO is risky; better XLK → FTEC).
- Wait 31 days before repurchasing.
- Buy the replacement first, wait 31 days, then sell the loser (double up).
Action Points
- Turn off automatic dividend reinvestment in taxable accounts during November–December.
- Keep a single spreadsheet of every loss sale and its 31-day safe zone.
- Coordinate across spouses — the IRS applies the rule per taxpayer, but spouses are treated as one taxpayer for this purpose.
- Never harvest a loss into an IRA.
References
Live Chart
Open full chart →Related market data, powered by TradingView.
My Notes
Log in to save notes on this article and share them with the community.
Read next
US SEC, CFTC, and NFA Regulatory Framework for Traders
Map the US trading regulator landscape: SEC for securities and options, CFTC for futures and forex, and NFA as the self-regulatory body enforcing rules.
Read more →Smart Recommendations