The Big Idea
The wash sale rule is a US tax regulation that prevents you from claiming a tax loss on a security if you buy “substantially identical” securities within 30 days before or after the loss-generating sale. The rule exists to stop people from gaming the tax system by selling losing positions to claim losses while immediately rebuying. Without the rule, you could harvest tax losses while maintaining the same investment position. The rule prevents this. The disallowed loss isn’t gone forever — it gets added to the cost basis of the replacement security, which means you’ll eventually realize it when you finally sell that security. But for current-year tax planning, wash sales can disrupt your strategy in significant ways.
Think of the wash sale rule like a parking ticket rule that says you can’t move your car around the corner and claim you “moved” to avoid the time limit. If you sell stock A at a loss, immediately buy back stock A, and try to claim the loss on your taxes — the IRS sees through this and disallows the loss. You haven’t really exited the position. You’re just trying to capture a tax benefit while keeping the same investment. The 30-day window in both directions creates a 61-day total period (30 before + 30 after + the sale day) during which any “substantially identical” security purchase triggers the rule.
For active traders, the wash sale rule can become a significant tax complication. Frequent trading of the same securities can create chains of wash sales where losses keep getting deferred. By year end, you might find your reported gains are much higher than your actual economic gains because of disallowed losses. Understanding the rule helps you avoid accidentally triggering it, plan trades around it when needed, and accurately project your tax liability.
How the Wash Sale Rule Works
The 30-Day Window
If you sell a security at a loss, the wash sale rule applies if you (or your spouse, or a related entity) buy the same or “substantially identical” security within:
- 30 days BEFORE the loss sale, OR
- 30 days AFTER the loss sale
This creates a 61-day “danger zone” centered on the sale date. Any purchase within this window triggers the rule.
The Disallowed Loss
When a wash sale occurs:
- You cannot claim the loss on your current-year taxes
- The disallowed loss gets ADDED to the cost basis of the replacement shares
- The holding period of the original shares carries over to the new shares
The economic effect: you keep the same investment exposure, but your tax loss is deferred until you eventually sell the replacement shares without triggering another wash sale.
Example
December 1: You buy 100 shares of XYZ at $50 ($5,000 cost basis).
December 15: XYZ drops to $40. You sell for $4,000 — a $1,000 loss.
December 20: You buy back 100 shares at $42.
Result: This is a wash sale (replacement purchase within 30 days after).
- $1,000 loss is DISALLOWED for current-year taxes
- Your new 100 shares have cost basis of $42 + $10/share disallowed loss = $52 per share
- If you eventually sell those shares above $52, you’ll be taxed on actual gain
- If you sell below $52, you can claim that loss (assuming no further wash sale)
What Counts as “Substantially Identical”
The rule applies to “substantially identical” securities, which is broader than just the exact same stock.
Definitely Substantially Identical
- Same stock (selling AAPL, buying AAPL)
- Same options (selling AAPL Jan calls, buying AAPL Jan calls)
- Same ETF (selling SPY, buying SPY)
Generally Substantially Identical
- Stock and options on that stock (sometimes — depends on circumstances)
- Stock and convertible bonds of same company
- Different share classes with similar economic exposure (rare cases)
Generally NOT Substantially Identical
- Different stocks (selling Apple, buying Microsoft) — even in same sector
- Different ETFs tracking similar indexes (selling SPY, buying VOO — both S&P 500 trackers)
- Stock vs ETF (selling AAPL stock, buying QQQ which holds AAPL)
- Different bonds of same company (in most cases)
The Gray Area
“Substantially identical” isn’t precisely defined. The IRS provides general guidance but specific cases can be ambiguous. SPY and IVV both track the S&P 500 — are they substantially identical? Most tax professionals say no (different products from different issuers). But aggressive interpretations might disagree.
For safety, when tax-loss harvesting, swap to clearly different securities. Don’t try to game the substantially-identical question.
The 30-Day Window Details
The 30-day periods cause confusion. Let’s clarify:
Before the Loss Sale
If you bought XYZ on November 15 and sold for a loss on December 10, the November 15 purchase is within 30 days BEFORE the sale. The wash sale rule applies even though the purchase preceded the sale.
This is critical for accumulating positions. If you buy a stock multiple times then sell at a loss, the early purchases can trigger wash sales on later sales.
After the Loss Sale
The more commonly understood case. Sell at loss, then buy back within 30 days, wash sale applies.
The Combined Window
30 days before + sale date + 30 days after = 61 days total during which purchases trigger the rule.
Calendar Days vs Trading Days
The 30-day windows are calendar days, not trading days. Weekends and holidays count.
How Active Trading Triggers Wash Sales
Active traders face wash sale issues frequently due to high trade frequency.
Day Trading Same Stock Repeatedly
If you day trade AAPL multiple times per week, every losing trade potentially triggers wash sale because winning trades nearby create the “purchase” side. Year-end accounting can get complicated.
Multiple Round Trips Same Day
Buying and selling AAPL three times in a day, with one losing round trip and two winning ones — the losing round trip can be disallowed because the winning round trips’ purchases happened within 30 days.
Algo and Frequent Strategies
Algorithmic traders with hundreds of trades per week often have substantial wash sale activity. Most can sort out year-end through proper accounting, but it’s complex.
The “Phantom Income” Problem
Active traders sometimes face situations where their actual economic result for the year is roughly breakeven, but their reported taxable gains are substantial because of disallowed losses. They owe taxes on income that doesn’t really exist as cash. This is the worst-case scenario.
How Brokers Handle Wash Sales
Brokers track wash sales automatically and report them on your year-end Form 1099-B.
Automatic Tracking
Modern brokers track wash sales within their account systems. They flag affected trades, calculate disallowed losses, and adjust cost bases of replacement positions.
Limitations of Broker Tracking
Brokers only know about transactions in YOUR account at THEIR firm. They can’t track:
- Wash sales involving accounts at other brokers
- Wash sales involving your spouse’s account
- Wash sales involving IRA purchases (which still trigger the rule)
- Wash sales involving related entities
For traders with multiple accounts, wash sales might exist that no single broker reports. Your tax responsibility includes accounting for these even when not reported on 1099-B.
Year-End 1099-B
The form shows:
- Total proceeds from sales
- Total cost basis
- Wash sale loss disallowed (if any)
- Net gains/losses
The “wash sale loss disallowed” amount is added back to your reported gains, increasing your tax liability for the current year.
The IRA and 401(k) Twist
Buying the same stock in your IRA or 401(k) within 30 days of selling at a loss in your taxable account triggers a wash sale that’s particularly painful.
Why It’s Worse
Normal wash sales just defer the loss — you’ll eventually claim it when you sell the replacement shares. But IRA wash sales are different:
- The loss is disallowed in your taxable account
- The loss is NOT added to the IRA cost basis (IRAs use different basis rules)
- The loss is essentially LOST FOREVER
The Trap
If you contribute to your IRA and accidentally buy the same stock you just sold for a loss in your taxable account, you’ve permanently lost the tax benefit of that loss.
Avoidance
Coordinate between accounts. If you’re tax-loss harvesting in your taxable account, don’t buy the same security in your IRA for at least 31 days afterward.
Strategies to Avoid Wash Sales
1. Wait 31 Days
The simplest approach: sell at a loss, wait 31 calendar days, then rebuy. This avoids any wash sale concern. The downside: you’re out of the position for a month, missing potential moves.
2. Buy a Different (But Similar) Security
Sell SPY at a loss, buy VOO instead (both track S&P 500 but are clearly different ETFs from different issuers). You maintain similar exposure without triggering the rule.
Common substitutions:
- SPY ↔ IVV ↔ VOO (S&P 500 ETFs)
- QQQ ↔ XLK (tech-heavy ETFs)
- IWM ↔ VTWO (small-cap ETFs)
- AGG ↔ BND (total bond ETFs)
3. Time Your Trades Strategically
If you know you might want to sell at a loss for tax purposes, plan around purchases. Don’t buy more shares within 30 days before a planned sale.
4. Use Tax-Advantaged Accounts Differently
Don’t buy similar securities in different account types simultaneously. Coordinate your taxable and IRA holdings.
5. Year-End Tax Planning
December tax-loss harvesting is common but needs care. Selling for a loss and rebuying in early January can create wash sales spanning year-end.
6. Accept the Wash Sale
Sometimes triggering a wash sale is fine. The loss isn’t lost — it’s just deferred. If your overall trading strategy benefits from the trades, the deferred loss is acceptable.
Examples of Wash Sale Situations
Example 1 — Sarah’s Year-End Tax Loss Harvest
Sarah owns 200 shares of company XYZ at $50 average cost. The stock is now at $35. She has a $3,000 unrealized loss.
December 20: She sells the 200 shares for $7,000, realizing the $3,000 loss for tax purposes.
She wants to maintain similar exposure. Options:
- Wait until January 20 to rebuy XYZ (avoid wash sale)
- Buy a similar but different stock immediately
- Buy an ETF that holds XYZ as a small portion (different security)
She chooses option 1 — accepts being out of the stock for 31 days. The $3,000 loss is realized for current-year taxes, saving her perhaps $700-1,000 in taxes depending on her bracket.
Example 2 — Jake’s Day Trading Mess
Jake day trades AAPL frequently. Over December, he had:
- 20 winning round trips totaling $5,000 in gains
- 15 losing round trips totaling $3,000 in losses
His net economic result: $2,000 profit.
But many of those losing trades had nearby buys that trigger wash sales. His broker calculates $2,500 of those losses are disallowed and added to other positions’ cost basis.
His REPORTED taxable gain: $5,000 – $500 (only $500 of losses allowed) = $4,500.
He pays taxes on $4,500 even though he only made $2,000 economically. The $2,500 disallowed loss eventually becomes available as cost basis adjustment when he closes those wash-sale-affected positions, but for now it’s deferred.
Example 3 — Maya’s Avoidance Strategy
Maya wants to keep her sector exposure but harvest a tax loss in a tech ETF. She sells QQQ at a loss.
Instead of waiting 31 days or risking buying QQQ back, she immediately buys XLK (Technology Select Sector SPDR ETF). XLK has different holdings, different weighting, different issuer — clearly not “substantially identical” to QQQ.
She maintains tech exposure (mostly the same companies via XLK), claims the QQQ loss for taxes, and never violates the wash sale rule. After 31 days, she could swap back to QQQ if desired or just stay with XLK.
This is a legitimate, IRS-acceptable tax-loss harvesting strategy.
Common Mistakes
- Not knowing about the 30-day window before the sale. The rule applies to purchases within 30 days BEFORE, not just after.
- Buying back too soon. Re-purchasing within 30 days of a tax-loss sale.
- IRA wash sales. Permanently losing tax benefit due to cross-account purchases.
- Spouse’s account interactions. Spouse’s purchases in the danger zone trigger wash sales.
- Multiple broker tracking failures. Wash sales spanning brokers aren’t reported automatically.
- Year-end timing errors. December sales rebooked in January can be wash sales.
- Day trading complications. Frequent same-stock trading creates complex wash sale chains.
- Confusing similar but different securities. SPY vs VOO are not substantially identical, but ABC stock and ABC stock are.
- Forgetting holding period carryover. Wash sale replacement shares inherit original holding period.
- Tax surprise at year end. Not realizing reported gains exceed economic gains.
The Big Picture
The wash sale rule is a critical tax consideration for any active trader.
Here’s what to remember:
- The rule disallows tax losses when you buy substantially identical securities within 61-day window
- Window is 30 days before plus 30 days after the loss sale
- Disallowed loss adds to cost basis of replacement security
- IRA and 401(k) wash sales can permanently lose the tax benefit
- Brokers track within-account wash sales automatically
- Cross-broker, cross-account wash sales aren’t auto-tracked
- Year-end tax-loss harvesting requires careful planning
- “Substantially identical” is broader than identical but not all-encompassing
- 31-day wait or different security purchases avoid the rule
- Active traders can accumulate substantial deferred losses
The wash sale rule rewards thoughtful trade planning and punishes careless execution. Most violations happen by accident — traders not realizing the rule existed, or not paying attention to the timing of their purchases.
For long-term investors, wash sales are usually easy to manage. You typically don’t sell at losses often, and when you do, waiting 31 days is rarely a hardship. Year-end tax-loss harvesting is the main concern, and it’s straightforward to execute properly.
For active traders, wash sales become more complex. Frequent trading creates many opportunities to accidentally trigger wash sales. Year-end accounting can reveal substantial deferred losses. The economic result and the taxable result can differ meaningfully.
The most painful version is the IRA wash sale. Buying the same stock in your IRA within 30 days of a taxable account loss permanently loses the tax benefit — the loss isn’t deferred, it’s gone. This catches many traders who don’t realize their tax-advantaged account purchases interact with their taxable account losses.
Practical wash sale management includes:
- Calendar awareness: Know when 30-day windows end
- Account coordination: Watch interactions between accounts
- Substitute securities: Have planned alternatives for tax-loss harvesting
- Year-end review: Plan December trades to avoid year-spanning wash sales
- Accurate tax projections: Account for disallowed losses when estimating taxes
Tax-loss harvesting itself is a legitimate strategy that many investors should use. Realizing losses to offset gains reduces current-year taxes. The wash sale rule limits this practice but doesn’t eliminate it. Smart investors harvest losses while staying compliant.
Don’t let wash sale fear prevent legitimate tax planning. Just understand the rules and plan around them. The losses you can claim properly are real money — at typical tax brackets, $3,000 in losses saves $500-1,000 in taxes. Worth the planning effort.
For traders running complex strategies, consider working with a CPA or tax preparer who understands trader taxation. The rules are nuanced enough that professional help often pays for itself many times over.
The wash sale rule isn’t going away. It’s a permanent feature of US tax law. Plan around it rather than fighting it. Done correctly, you can capture legitimate losses while maintaining your investment positioning. Done carelessly, you’ll trigger unintended consequences and potentially permanent loss of tax benefits.
Related Terms
- What Are Tax Lots? — How basis affects taxes
- Margin vs Cash Accounts — Account types affect tax treatment
- What Is the PDT Rule? — Affects active trader taxation
- What Is Cost Basis? — Adjusted by wash sales
- What Is Capital Gains Tax? — What wash sale affects
← Back to the Complete Trading Terms Glossary
Focus on the process. Trust the stats. Stay consistent.