The wash sale rule is an IRS trap that can silently wipe out your tax deductions. Here is exactly what triggers it and how to legally avoid it while staying invested.
What the Wash Sale Rule Does
The wash sale rule (IRC Section 1091) disallows a capital loss if you buy a “substantially identical” security within 30 days before or after the sale that generated the loss. The disallowed loss is added to the cost basis of the newly purchased shares — deferring the loss until you sell the replacement shares.
The window is 61 days total: 30 days before the loss sale + the day of sale + 30 days after.
Wash Sale Timeline
| Day | Action | Result |
|---|---|---|
| Day −30 | Purchase replacement shares | Triggers wash sale — loss disallowed |
| Day −1 | Purchase replacement shares | Triggers wash sale — loss disallowed |
| Day 0 | Sell shares at a loss | The loss sale |
| Day +1 | Purchase replacement shares | Triggers wash sale — loss disallowed |
| Day +30 | Purchase replacement shares | Triggers wash sale — loss disallowed |
| Day +31 | Purchase replacement shares | Safe — no wash sale |
The Cost of Getting It Wrong: Worked Example
You own 100 shares of XYZ Corp. You bought them at $80; they are now worth $55. You sell them to harvest the $2,500 loss.
- Without wash sale: You claim a $2,500 capital loss. At a 22% tax rate, this saves you ~$550 in taxes.
- You buy back XYZ on Day 10: Wash sale triggered. Your $2,500 loss is disallowed.
- Cost basis adjustment: Your new shares’ cost basis becomes $55 (purchase price) + $25 (disallowed loss per share) = $80 per share. The loss is deferred, not permanently lost — but you’ve lost the timing benefit.
- IRA trap: If you bought back XYZ in an IRA instead of a taxable account, the $2,500 loss is permanently gone.
After-Tax Value of $2,500 Loss at Different Tax Rates
| Capital Gains Tax Rate | Tax Saved by $2,500 Loss | Lost if Wash Sale Triggered |
|---|---|---|
| 0% (income under ~$47K) | $0 | $0 |
| 15% | $375 | $375 |
| 20% | $500 | $500 |
| 23.8% (with NIIT) | $595 | $595 |
| Short-term (37%) | $925 | $925 |
What Counts as “Substantially Identical”
Definitely Triggers Wash Sale
| Action | Why It Triggers |
|---|---|
| Sell XYZ stock → buy XYZ stock 10 days later | Same security |
| Sell S&P 500 index fund → buy same fund in IRA | Same fund, different account |
| Sell XYZ → buy call options on XYZ immediately | Options on same underlying |
| Spouse sells XYZ → you buy XYZ in your account | Combined household applies |
| Sell XYZ → your traditional IRA auto-reinvests dividends into XYZ | Automatic reinvestment can trigger |
Does NOT Trigger Wash Sale (Generally Safe)
| Action | Why It’s Safe |
|---|---|
| Sell VTI (Vanguard Total Market) → buy ITOT (iShares Total Market) | Different fund, different issuer |
| Sell SPY (S&P 500) → buy VTI (Total Market) | Different index |
| Sell Apple → buy Microsoft | Different companies |
| Sell XYZ → wait 31 days → buy XYZ | Outside the 61-day window |
| Sell oil company A → buy oil company B | Same sector, different companies |
Note: The IRS has not definitively ruled on many of these scenarios. “Fund swapping” (buying a similar but not identical ETF) is widely used by tax professionals and is generally considered safe, but it carries a small amount of ambiguity.
Common Scenarios Where Investors Get Caught
Automatic Dividend Reinvestment
If your broker is set to automatically reinvest dividends (DRIP), and your fund pays a dividend within 30 days of your loss sale, those reinvested shares can trigger a wash sale. Solution: Temporarily disable DRIP before selling at a loss.
Multiple Accounts
Many investors forget they own the same stock in their 401(k) or IRA. If you sell an S&P 500 fund at a loss in your taxable account while your 401(k) is buying the same fund with payroll contributions, you have a wash sale problem.
Year-End Tax-Loss Harvesting
A December loss sale and a January repurchase are the most common wash sale triggers. If you sell on December 20 and rebuy on January 15 — that’s only 26 days, still within the 30-day window.
How to Harvest the Loss Without Triggering a Wash Sale
The ETF Swap Method
Sell your losing fund and immediately buy a similar but not identical fund:
| Sell | Buy Instead | Similarity |
|---|---|---|
| VTI (Vanguard Total Market) | ITOT (iShares Total Market) | ~99% overlapping holdings |
| SPY (S&P 500) | VOO (Vanguard S&P 500) | Same index — risky swap |
| IVV (iShares S&P 500) | SCHB (Schwab US Broad Market) | Different index |
| VXUS (Vanguard International) | IXUS (iShares International) | Similar international exposure |
| BND (Vanguard Total Bond) | AGG (iShares Core US Aggregate) | Similar bond exposure |
Warning: SPY, IVV, and VOO all track the exact same S&P 500 index. The IRS may treat them as substantially identical. Most tax professionals recommend swapping to a total market fund instead.
Wait 31 Days
If you don’t need to maintain exposure, sell and wait 31 days before repurchasing. Risk: the market may recover and you miss the rebound.
What Happens to the Disallowed Loss
The disallowed loss is NOT gone — it is added to the cost basis of the replacement shares:
| Without Wash Sale | With Wash Sale | |
|---|---|---|
| Sell XYZ at $55 (bought at $80) | Claim $25/share loss now | $25/share loss deferred |
| Rebuy XYZ at $55 | New basis = $55 | New basis = $55 + $25 = $80 |
| Later sell XYZ at $70 | $15/share gain | $10/share loss (higher basis) |
The deferred loss eventually reduces your gain — unless the wash sale involved an IRA.
Reporting Wash Sales on Your Tax Return
Wash sales are reported on Form 8949. Your broker will include wash sale adjustments in your 1099-B. Look for the code “W” in Box 1f. The disallowed amount appears in Column (g). Tax software handles the math automatically if you import your 1099-B.
The content on Wealthvieu is for informational purposes only and should not be considered financial, tax, or investment advice. Consult a qualified professional before making financial decisions. Full disclaimer · Editorial policy