Wash Sale Rule Explained: 30-Day Windows, Crypto Exceptions, and Mutual Fund Swaps
The wash sale rule disallows losses when you buy substantially identical securities within 30 days before or after a sale. Understand the rules, exceptions, and reporting on Form 1099-B.
Selling a Loss You Cannot Use
Tax loss harvesting is a legitimate strategy. The IRS permits investors to sell securities at a loss and use that loss to offset capital gains and up to $3,000 of ordinary income per year. But the wash sale rule under IRC Section 1091 disallows the loss if the investor purchases a "substantially identical" security within 30 days before or after the sale. The window is not 30 days after — it is 61 days total (30 days before the sale, the sale date itself, and 30 days after). Investors who forget the pre-sale window and buy replacement shares shortly before harvesting a loss trigger the rule and lose the deduction, even though they sold first.
What the Rule Does — and Does Not — Eliminate
A wash sale does not permanently eliminate a loss. The disallowed loss is added to the cost basis of the replacement shares. When those replacement shares are eventually sold — in a non-wash-sale transaction — the adjusted basis produces the same economic loss at that later date. The rule defers the loss, it does not destroy it. However, in practice, investors who continue to hold replacement shares for years, sell them in a taxable gain year, or hold them at death (where basis steps up) may never realize the benefit of the deferred loss. Death wipes the wash sale out: shares held at death receive a stepped-up basis equal to fair market value, eliminating any deferred wash sale loss permanently.
| Scenario | Wash Sale Triggered? | What Happens to the Loss |
|---|---|---|
| Sell stock at loss; buy same stock 20 days later | Yes | Loss added to basis of replacement shares |
| Sell stock at loss; buy same stock 35 days later | No | Loss deductible in year of sale |
| Sell stock at loss; buy same stock 25 days before | Yes | Loss added to basis; holding period extends |
| Sell stock at loss; buy in IRA 20 days later | Yes — and loss is permanently lost | IRA purchase triggers wash sale; cannot recover basis in IRA |
| Sell stock at loss in taxable account; spouse buys same stock | Yes — household rule applies | Spousal purchase counts as taxpayer purchase |
The IRA Trap: A Permanent Loss
Buying replacement shares in an IRA within the wash sale window is uniquely dangerous. The wash sale is triggered just as in a taxable account — the loss is disallowed. But because the IRA basis rules do not permit adding the disallowed loss to the IRA's cost basis in the same way, the loss is permanently gone. The IRS has ruled that the basis cannot be tracked and recovered inside the IRA. This trap catches investors who harvest a loss in their taxable brokerage account and simultaneously have automatic investment contributions or dividend reinvestments in the same security inside an IRA. Monitoring across accounts — including spousal accounts and IRAs — is essential for clean tax loss harvesting.
- Automated dividend reinvestment plans (DRIPs) can inadvertently trigger wash sales if a security is sold at a loss while the DRIP continues to purchase shares.
- An automated investing platform that rebalances multiple accounts without wash sale coordination across the household is a common source of inadvertent wash sale violations.
- Investors can avoid the IRA trap by temporarily suspending automatic purchases of harvested securities in IRAs during the 30-day post-sale window.
Substantially Identical: A Gray Area
The IRS defines the standard as "substantially identical" securities — a deliberately vague phrase interpreted through revenue rulings and case law. Selling and buying the same stock in the same company is clearly a wash sale. Selling stock in Company A and buying stock in a competitor (Company B) in the same industry is clearly not. The gray area involves index funds and ETFs. Selling shares of Vanguard's S&P 500 index fund (VOO) and buying iShares' S&P 500 ETF (IVV) the next day: the IRS has not issued a definitive ruling, but most tax practitioners believe these are not substantially identical because they are issued by different companies with different legal structures, even if they track the same index. Selling a Fidelity S&P 500 fund and buying a Vanguard S&P 500 fund is a common tax-loss-harvesting workaround.
- Buying options on a substantially identical stock during the wash sale window can trigger the rule — options to buy a stock may be considered substantially identical to the stock itself.
- Selling a bond and buying another bond in the same issuer with a slightly different maturity date is generally not considered a wash sale.
- Mutual fund share classes (e.g., Investor vs. Admiral shares of the same Vanguard fund) may be substantially identical — avoid swapping between classes of the same fund to harvest losses.
Cryptocurrency: The Current Exception
Cryptocurrency currently falls outside the wash sale rule. IRC Section 1091 applies to "stock or securities" as defined under the tax code. The IRS classifies cryptocurrency as property, not as a security. As of 2024, selling Bitcoin at a loss and immediately rebuying Bitcoin does not trigger a wash sale — the loss is deductible without any waiting period. This is the most significant crypto tax advantage available to individual investors. Congress has considered extending the wash sale rule to digital assets through multiple legislative proposals; the Build Back Better Act included a crypto wash sale provision that passed the House but did not become law. The provision could be enacted in future legislation, potentially eliminating this planning opportunity with limited advance notice.
Form 1099-B and Reporting Mechanics
Brokers report wash sales on Form 1099-B, Box 1g (disallowed wash sale loss). The adjusted cost basis of replacement shares should reflect the wash sale add-back, though basis reporting by brokers is not always accurate — particularly in complex multi-account scenarios. Investors should reconcile their own records. Wash sales reported by different brokers in the same tax year for the same household may not be coordinated by either broker, requiring the taxpayer to track and report the aggregated wash sale treatment manually on Schedule D and Form 8949.
| Asset Class | Wash Sale Rule Applies? | Planning Note |
|---|---|---|
| Individual stocks | Yes | Wait 31 days or buy a different company in same sector |
| Mutual funds | Yes | Swap to different fund family tracking same index |
| ETFs tracking same index | Gray area (likely no if different issuers) | IRS has not ruled definitively; most practitioners treat as safe |
| Cryptocurrency | No (as of 2024) | Property, not security; no waiting period required |
| Options on substantially identical stock | Yes — can trigger wash sale on underlying stock loss | Avoid buying calls on harvested stock during window |
This article is for informational purposes only and does not constitute financial or tax advice.
Related Articles
investing
Asset Allocation by Age: The 110-Rule, Lifecycle Theory, and Modern Updates
How should your portfolio change as you age? From the classic 110-minus-age rule to modern lifecycle theory and research-backed alternatives, here is what the evidence says.
9 min read
investing
Capital Gains Tax: Short-Term vs. Long-Term Rates Explained
Selling an investment triggers capital gains tax — but the rate depends heavily on how long you held it. The difference between short-term and long-term can be enormous.
9 min read
investing
Commodities Trading: Markets, Contracts, and Strategies
Commodities markets trade oil, gold, wheat, and more through futures and spot contracts. Learn how commodity trading works, who participates, and how retail investors can gain exposure.
9 min read
investing
Direct Indexing: Tax Alpha, Minimums, and How It Works
How direct indexing differs from ETFs, how it generates tax alpha through systematic loss harvesting, $250K minimums, ESG customization, and key providers compared.
9 min read