The Basic Rule
The IRS wash sale rule, codified in Section 1091, disallows a capital loss if you buy 'substantially identical' securities within 30 days before OR after the loss sale. The full window is 61 days (30 + day of sale + 30).
Concrete example: you sell 100 shares of AAPL at a $5,000 loss on March 15. If you buy AAPL between February 13 and April 14, the wash sale rule applies. The $5,000 loss is disallowed for current-year tax purposes, but adds to the basis of the replacement shares — deferring (not eliminating) the tax benefit.
Disallowed losses aren't lost forever in taxable accounts — they're embedded in the new shares' basis. When you eventually sell those new shares (and don't trigger another wash sale), the embedded loss surfaces. The wash sale rule defers the loss, doesn't kill it.
Disallowed losses ARE lost forever if the wash sale crosses into an IRA. When you sell in a taxable account at a loss and buy in an IRA within 30 days, the IRS disallows the loss permanently. The basis carryforward to IRA shares doesn't track in IRA bookkeeping — meaning the loss has nowhere to go.
What Counts as 'Substantially Identical'
Same security: definitely. Selling 100 AAPL and buying 100 AAPL = wash sale.
Same company different share class: usually yes. Berkshire Hathaway A and B shares are substantially identical (despite voting differences). Most class A/class B distinctions are wash sales.
Stock and options on the same stock: yes, options on a stock count as substantially identical to the stock itself for wash sale purposes.
Two different broad index funds tracking the same index: unsettled. VOO (Vanguard S&P 500) and IVV (iShares S&P 500) and SPY (SPDR S&P 500) all track the same index but are issued by different companies. The IRS hasn't issued definitive guidance, but tax practitioners generally treat them as NOT substantially identical (different issuers, different fund structures).
Total market index vs S&P 500 index: not substantially identical. VTI (Vanguard Total Market) and VOO (S&P 500) hold meaningfully different stocks despite high correlation.
Sector ETF vs broad market: not substantially identical. Selling QQQ (Nasdaq-100) and buying XLK (Tech Sector SPDR) wouldn't trigger wash sale despite tech-sector overlap.
Bonds: similar maturity, similar credit quality bonds may be substantially identical even with different issuers. Two 10-year AA corporate bonds from different companies might be considered identical despite different CUSIPs.
Cross-Account Wash Sales
Wash sales apply across all accounts you control. Selling AAPL in your taxable account and buying AAPL in your IRA within 30 days triggers wash sale — and worse, the disallowed loss is permanently lost.
Spousal accounts count too. If you sell at a loss in your taxable account and your spouse buys the same security within 30 days in their separate account, wash sale applies. Many couples don't realize this and accidentally trigger wash sales on jointly-held strategies.
Custodial accounts for children, trusts you're trustee of, accounts in your IRA, your 401(k) — all aggregate for wash sale purposes if you control them. The IRS calls these 'related' accounts.
401(k) wash sale: rare but possible. If you sell a 401(k)'s S&P 500 fund and buy a similar S&P 500 fund within 30 days as part of a rebalance, technically a wash sale could be argued. In practice, the IRS doesn't enforce this for 401(k) internal transactions, but be aware it's not 100% safe.
The 30-day window is calendar days, not trading days. Sale on March 15 means no purchase from February 13 to April 14 (30 days each side, plus the sale date itself).
How to Harvest Losses Without Triggering Wash Sales
Wait 31 days before repurchasing. Simple but exposes you to market movement during the window. If the market rises 5% in 31 days, the cost of avoiding wash sale exceeded the tax benefit.
Buy a similar but not 'substantially identical' replacement. Sell VOO at loss, buy IVV (same index, different issuer). Sell QQQ, buy XLK (similar sector exposure, different fund). Maintains market exposure during the 31-day window.
Buy a closely correlated but distinguishable security. Sell AAPL at loss, buy QQQ (heavy AAPL holding but diversified). Maintains tech exposure without triggering substantial identity.
Sell options instead of waiting for the underlying. Sell deep-in-the-money calls on the security you sold; lose minimal optionality but avoid wash sale on the underlying purchase.
Dollar-averaging strategy: sell partial position at loss, harvest that loss; let dividend reinvestments be your only repurchases (tiny amounts that minimize wash sale impact). Resume normal buying after 31 days.
Practical example: market down 15%, you have $50K of unrealized losses across 5 positions. Sell all 5, buy 5 different but similar securities (maintain market exposure). 32 days later, optionally swap back to your preferred holdings. Total round-trip 'cost' (transaction costs + tracking error) is typically 0.05-0.15% — vs. the 15-30% tax benefit on the harvested losses.
Year-End Wash Sale Considerations
December 31 is the deadline for realizing losses for the current tax year. But the 30-day window extends into the following year. If you sell at a loss on December 28 and repurchase on January 15, the wash sale rule still triggers — even though the sale and repurchase are in different tax years.
Strategic implication: if you want to repurchase the same security and claim the loss, sell by December 1 (giving 30+ days of buffer before year-end and ensuring no January repurchase triggers the rule).
Conversely, if you want to maintain position into the new year, plan replacement purchases. Sell VOO December 28, buy IVV December 29, swap back to VOO February 1. Loss claimed in Year 1, position maintained throughout.
Brokerage 1099-B reporting: brokerages now report wash sales to the IRS. If your brokerage flags a wash sale, the disallowed loss is automatically excluded from your 1099-B reported losses. You can't claim the loss on your tax return — the brokerage and IRS already adjusted for it.
Cross-broker wash sales: if you sell at a loss with Fidelity and repurchase with Schwab within 30 days, the brokerages don't share data. Fidelity might report the loss; Schwab won't know about the wash sale. You're still legally required to disallow the loss, but the IRS audit risk is minimal — typical audit detection focuses on within-broker wash sales.
Crypto: The Wash Sale Loophole
Cryptocurrency is currently exempt from wash sale rules. The wash sale statute applies to 'stocks or securities,' and crypto is treated as 'property' (not a security) under current IRS guidance.
This creates a powerful tax-loss harvesting opportunity. Sell BTC at a $20K loss, immediately repurchase BTC at the same lower price. You realize the $20K tax loss with no waiting period and no change to your underlying position.
Apply this aggressively in crypto downturns. Bitcoin's 2022 decline created harvest opportunities of 40-60% across the year. Investors who actively harvested captured tens of thousands in tax losses while maintaining identical positions.
Multiple legislative attempts have tried to extend wash sale rules to crypto. Build Back Better Act (2021), Lummis-Gillibrand bill, and others have proposed inclusion. None has passed. As of 2026, crypto remains exempt — but assume this could change in any tax year.
NFTs: also exempt from wash sale rules under current treatment. Same dynamics — sell at loss, immediately repurchase a similar (or even identical) NFT in the same collection.