Wash Sale Rule
An IRS rule under Section 1091 that disallows a claimed capital loss if the investor purchases a substantially identical security within 30 days before or after the sale that generated the loss.
The wash sale rule is designed to prevent investors from claiming a tax loss while maintaining an essentially unchanged economic position in a security. If you sell shares at a loss and then repurchase 'substantially identical' securities within the 61-day window — 30 days before the sale, the day of the sale, and 30 days after — the IRS disallows the loss for current-year tax purposes.
The disallowed loss is not permanently forfeited. Instead, it is added to the cost basis of the newly acquired shares, effectively deferring the tax benefit until those replacement shares are eventually sold in a non-wash-sale transaction. Additionally, the holding period of the original shares carries over to the replacement shares, which can affect whether a future gain is short-term or long-term.
The rule applies to purchases in any account you control, including IRAs and spousal accounts under certain interpretations, though the IRS guidance on spousal accounts is less definitive. Buying replacement shares in a traditional or Roth IRA is particularly dangerous because when a wash sale occurs with an IRA repurchase, the disallowed loss disappears permanently — it cannot be added to the IRA's basis since IRAs do not track cost basis in the same way taxable accounts do.
'Substantially identical' is not perfectly defined by statute, but the IRS and courts have generally held that shares of the same company are substantially identical. Options to acquire the same stock can also trigger the rule. Switching between two different companies in the same industry — for example, selling one bank stock and buying another — does not trigger a wash sale. Similarly, selling a mutual fund and buying a different fund with similar (but not identical) holdings is generally safe.
Brokers report wash sales on Form 1099-B by marking affected transactions in box 1g, though they are only required to track wash sales within the same account and for covered securities. Investors who use tax-loss harvesting across multiple accounts must monitor wash sales manually, often with the help of tax software or a financial advisor.
Cross-Account Rules: The wash sale rule applies to all accounts under the taxpayer's control — not just the account where the sale occurred. If you sell shares at a loss in a taxable brokerage account and then buy the same shares in your traditional IRA, Roth IRA, or a spouse's account within the wash sale window, the IRS treats this as a wash sale. The consequence is particularly harsh when the repurchase occurs in an IRA: because IRAs do not track cost basis, the disallowed loss cannot be added to the IRA shares and is permanently lost rather than deferred. Married investors who manage their accounts independently should coordinate before executing loss harvests near year-end to ensure neither spouse inadvertently repurchases the sold security. Consult a tax professional to understand how cross-account wash sale tracking applies to your specific household structure.
Common Pitfalls: Several behaviors regularly trigger unintended wash sales. Automatic dividend reinvestment in a taxable account can create a wash sale if dividends purchase shares of a security you recently sold at a loss — many investors forget that DRIP purchases count as repurchases under the rule. Systematic investment plans that purchase fixed-dollar amounts on a schedule can similarly generate wash sale issues if a loss position is harvested between scheduled purchase dates. Options are another trap: buying a call option on the same stock you just sold at a loss constitutes a purchase of a substantially identical security if the option provides the right to acquire the underlying shares within the window. Finally, some broad-market ETFs and mutual funds hold enough of the same underlying securities that selling one and buying another in the same category could, in rare cases, be challenged — though in practice the IRS has not broadly applied the rule to distinct index funds tracking different indexes.
Substantially Identical Securities: The 'substantially identical' standard is more nuanced than it appears. The IRS has never published a comprehensive list of substantially identical securities, but several principles are well-established. Shares of the same company — including shares purchased through a DRIP, option exercise, or employer stock plan — are clearly substantially identical. Call options on the same stock that provide the contractual right to acquire those shares are also covered. Convertible bonds or preferred stock that are convertible into the same common stock have been ruled substantially identical in some contexts. By contrast, the IRS has generally respected the boundary between different companies in the same industry: selling Visa and buying Mastercard does not trigger a wash sale. Selling a Vanguard S&P 500 ETF and buying a Fidelity S&P 500 index fund is more ambiguous — both track the same index — but in practice the IRS has not challenged such swaps between distinct legal fund entities, and tax professionals commonly recommend this approach for maintaining market exposure during the 30-day wash sale window.
ETF Workaround: The most widely used strategy for avoiding wash sales while maintaining continuous market exposure is the 'ETF swap' — selling a fund or stock at a loss and immediately purchasing a different fund that tracks a similar but not identical index. For example, selling the iShares Core S&P 500 ETF (IVV) at a loss and buying the Vanguard Total Stock Market ETF (VTI) maintains broad U.S. equity exposure without repurchasing the same security. Similarly, selling the Vanguard Total International Stock ETF (VXUS) and buying the iShares MSCI ACWI ex US ETF (ACWX) provides continued international exposure. The key requirement is that the replacement fund tracks a different index or benchmark so that the securities are not substantially identical. During the 31-day period following the sale, the investor holds the replacement security; afterward, they may switch back to the original holding if desired, resetting the clock for any future loss harvest.