Guide
Wash sale rule explained
You sold a stock at a loss to offset gains — smart tax-loss harvesting. Two weeks later you bought the same ticker because the dip looked cheap. At tax time, the loss vanished. That is the wash sale rule: US tax law (IRC Section 1091) disallows a capital loss when you sell a security at a loss and, within a 30-day window before or after the sale, acquire a substantially identical replacement. The rule exists to stop investors from booking paper losses while keeping the same economic exposure. Understanding the 61-day calendar, what counts as “identical,” and how disallowed losses roll into basis — not disappear — is essential for anyone harvesting in taxable accounts.
The 30-day window in plain terms
The wash sale period is 30 days before and 30 days after the loss sale — 61 calendar days total, not 30 trading days. If you sell XYZ on June 15 at a loss, any purchase of a substantially identical XYZ position between May 16 and July 15 triggers the rule.
The sequence matters:
- Loss sale first, rebuy within 30 days — classic case; loss disallowed.
- Buy first, sell at loss within 30 days — also a wash sale; many investors forget purchases in the prior month.
- Multiple partial sales — each loss sale has its own window; overlapping buys can disallow several lots.
Dividend reinvestment plans (DRIPs) and automatic 401(k) contributions can silently trigger wash sales if they buy the same security or fund during your window. Check every account under your tax ID before harvesting.
What happens when a wash sale is triggered
A disallowed loss does not evaporate — it is deferred by adjusting the cost basis of the replacement shares. You add the disallowed loss amount to the basis of the new shares. When you eventually sell those replacement shares (without another wash sale), the embedded loss reduces your gain or increases your loss at that future sale.
Basis adjustment example
You bought 100 shares of Fund A at $50 ($5,000 basis). The price falls to $40; you sell for $4,000, realizing a $1,000 loss. Within 10 days you buy 100 shares of the same Fund A at $41 ($4,100 cost). The $1,000 loss is disallowed on this year’s return. Your new basis becomes $4,100 + $1,000 = $5,100 (or $51 per share). You did not get the immediate tax benefit you expected.
Holding period tacking
Wash sales also affect holding period. The replacement shares inherit the holding period of the shares you sold. If you sold long-term shares at a loss and rebought within the window, the new lot may not qualify for long-term rates until enough additional time passes — a subtle trap when you were trying to harvest short-term losses but tacked onto a long-term clock instead.
See our capital gains tax guide for how short-term vs long-term rates interact with harvested losses.
Substantially identical — the fuzzy line
Tax code does not define “substantially identical” with a bright-line test. IRS guidance and court cases suggest:
- Same ticker, same company — clearly identical. Selling Apple (AAPL) at a loss and rebuying AAPL within 30 days is a wash sale.
- Convertible bonds and common stock — often treated as substantially identical to the underlying equity.
- Options — selling stock at a loss while holding deep-in-the-money calls on the same underlying, or selling puts that force acquisition, can create wash-sale issues.
- Different share classes — GOOG vs GOOGL (Alphabet) may or may not be identical depending on facts; conservative investors treat them as identical.
- Correlated ETFs — generally not substantially identical if tracking different indexes, even with heavy overlap. Selling VTI (total US market) and buying ITOT (S&P total US) is a common harvest swap.
- Mutual fund share classes — Admiral vs Investor class of the same Vanguard fund are typically identical; swapping to a different fund family is safer.
Robo-advisors maintain paired substitute lists for this reason. Self-directed investors should pre-plan substitutes before the market drops — panic-selling without a replacement map is how wash sales happen accidentally.
Cross-account traps most people miss
Wash sales apply across all accounts sharing your taxpayer ID, not just the account where you sold:
- Spouse accounts — Married filing jointly? Your spouse’s purchase of the same security can disallow your loss.
- IRAs and Roth IRAs — Buying the same security in an IRA within the window disallows the loss in your taxable account. The disallowed loss is permanently lost for tax purposes — it does not adjust IRA basis because IRAs do not have taxable basis tracking. This is one of the harshest wash-sale penalties.
- 401(k) plans — Employer plan purchases of company stock or an S&P 500 fund can trigger wash sales against your brokerage harvest.
- DRIP and automatic investment — Monthly reinvestment of dividends in the same fund counts as a purchase.
- Gifted or inherited lots — Basis rules differ, but wash sales still apply to your dispositions.
Before year-end harvesting, pause DRIPs on positions you plan to sell, coordinate with your spouse, and check whether your IRA holds the same ETF you are about to harvest in taxable.
How to harvest without triggering a wash sale
The goal of tax-loss harvesting is to book losses while maintaining similar market exposure. Safe patterns:
Substitute security swap
Sell the losing fund or stock, immediately buy a correlated but non-identical alternative. Examples practitioners use (verify for your situation):
- VTI to ITOT, or VXUS to IXUS (US total market / international)
- Individual large-cap stock to a sector ETF with overlapping exposure
- Active mutual fund to passive index ETF tracking a different benchmark
Our ETF guide covers expense ratios and tracking error — pick substitutes with similar risk, not identical holdings.
Wait 31 days
Sell, hold cash or a money-market fund for 31 calendar days, then rebuy. You accept market-timing risk but avoid identity questions entirely. Pair with rebalancing discipline so the cash period does not drift your allocation beyond tolerance bands.
Harvest only lots you will not rebuy
Trimming a speculative position you no longer want avoids replacement complexity. Losses from abandoning a bad thesis are the cleanest harvests — no substitute needed if you never plan to re-enter.
Crypto and digital assets
Wash sale rules historically applied to “stocks and securities.” Many digital assets were treated as property, not securities, which created ambiguity about whether selling Bitcoin at a loss and rebuying hours later was a wash sale. Legislative proposals have repeatedly sought to extend wash sales to crypto; enforcement posture can change.
Conservative approach: treat crypto like equities — wait 31 days or swap to a different asset with similar beta (e.g., ETH to BTC is not identical, but selling SOL and immediately rebuying SOL is risky). Every crypto-to-crypto trade is already a taxable disposition; layering wash-sale uncertainty on top makes sloppy record-keeping expensive.
Reporting on your tax return
US taxpayers report capital gains and losses on Schedule D and Form 8949. Brokerages issue 1099-B summaries, but wash-sale adjustments are not always correct — especially for options, multiple accounts, or crypto.
- Disallowed losses appear with a code W on Form 8949 in many software packages.
- Track adjusted basis manually if your broker does not roll disallowed losses into cost basis on replacement lots.
- Carryforward losses from prior years are unaffected by new wash sales — but new disallowed losses delay current-year offsets.
- State tax treatment generally follows federal wash-sale rules; some states have quirks.
This guide is educational, not tax advice. Rules change; consult a qualified preparer for your facts.
Year-end planning scenarios
Scenario A — ETF drawdown harvest. Your US equity ETF is down 12% for the year. You sell $20,000 at a $2,400 loss and buy a substitute total-market ETF the same day. No wash sale; loss offsets rebalancing gains from September.
Scenario B — accidental IRA wash. You harvest $5,000 loss on Fund X in taxable on December 1. Your Roth IRA auto-invests $500 into Fund X on December 15. Loss disallowed; basis adjustment in taxable, but the IRA portion is lost forever. Pause IRA contributions before harvesting.
Scenario C — DCA collision. You harvest a tech stock loss on November 20. Your monthly $500 buy on December 1 rebuys the same ticker. Wash sale triggered. Suspend DCA on that ticker for 31 days after the harvest sale.
Production checklist
- Map every account under your tax ID — taxable, IRA, Roth, 401(k), spouse.
- List open purchases in the 30 days before any planned loss sale.
- Pre-select substitute ETFs or plan a 31-day cash wait.
- Disable DRIPs and auto-invest on tickers you will harvest.
- Confirm no IRA purchase of the same security during the 61-day window.
- Execute harvests early enough for settlement before December 31.
- Reconcile 1099-B against your lot records; fix wash-sale basis adjustments.
- Document substitute rationale in case of audit (index tracked, expense ratio).
- Review crypto repurchases under conservative wash-sale assumptions.
- Coordinate with your preparer before filing if cross-account trades were complex.
Key takeaways
- 61-day window — 30 days before and after the loss sale, not just after.
- Substantially identical — same security yes; correlated ETFs usually no.
- Cross-account — IRA purchases can permanently destroy disallowed losses.
- Basis adjustment — disallowed losses defer to replacement shares, not zero out.
- Plan substitutes first — harvest without a replacement map invites surprises.
Related reading
- Tax-loss harvesting explained — realizing losses to offset gains, crypto traps, and portfolio strategy
- Capital gains tax explained — short-term vs long-term rates, cost basis methods, and netting rules
- Portfolio rebalancing explained — threshold bands, tax-aware trimming, and when to harvest during rebalances
- ETFs explained — index tracking, tax efficiency, and substitute fund selection