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.

The InfoNexus Editorial TeamMay 23, 20269 min read

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.

ScenarioWash Sale Triggered?What Happens to the Loss
Sell stock at loss; buy same stock 20 days laterYesLoss added to basis of replacement shares
Sell stock at loss; buy same stock 35 days laterNoLoss deductible in year of sale
Sell stock at loss; buy same stock 25 days beforeYesLoss added to basis; holding period extends
Sell stock at loss; buy in IRA 20 days laterYes — and loss is permanently lostIRA purchase triggers wash sale; cannot recover basis in IRA
Sell stock at loss in taxable account; spouse buys same stockYes — household rule appliesSpousal 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 ClassWash Sale Rule Applies?Planning Note
Individual stocksYesWait 31 days or buy a different company in same sector
Mutual fundsYesSwap to different fund family tracking same index
ETFs tracking same indexGray area (likely no if different issuers)IRS has not ruled definitively; most practitioners treat as safe
CryptocurrencyNo (as of 2024)Property, not security; no waiting period required
Options on substantially identical stockYes — can trigger wash sale on underlying stock lossAvoid buying calls on harvested stock during window

This article is for informational purposes only and does not constitute financial or tax advice.

wash saletax loss harvestingcapital gains

Related Articles