Wash Sale Rule Calculator

Calculate how the IRS wash sale rule affects your stock or ETF trade. Enter your sale loss and repurchase details to see your disallowed loss, adjusted cost basis on the replacement shares, and the holding period impact. Based on IRS Publication 550 and IRC Section 1091. Free, private — all calculations run in your browser.

Ad Space

What Is the Wash Sale Rule?

The wash sale rule is an IRS regulation under Internal Revenue Code Section 1091 that prevents investors from claiming a tax deduction on a security sold at a loss if a "substantially identical" security is purchased within 30 days before or after the sale. The disallowed loss is not permanently lost — it is added to the cost basis of the replacement shares, deferring the tax benefit until those shares are eventually sold. This rule applies to stocks, bonds, mutual funds, ETFs, and options traded in taxable brokerage accounts. It does not apply to gains, only to losses. The 61-day wash sale window (30 days before + sale day + 30 days after) is the critical timeframe investors must track. Source: IRS Publication 550.

How Adjusted Cost Basis Works After a Wash Sale

When a wash sale occurs, the disallowed loss is added to the cost basis of the replacement shares. For example, if you sell 100 shares at a $500 loss and repurchase 100 shares at $45 each within 30 days, your adjusted basis becomes $45 + ($500 / 100) = $50 per share instead of $45. This higher basis means you will recognize a smaller gain (or larger loss) when you eventually sell the replacement shares. The holding period of the original shares also carries over to the replacement shares, which can affect whether gains qualify for long-term capital gains rates (held over one year). Brokers report wash sales on Form 1099-B with a "W" code in Box 1f, and the adjusted basis in Box 1e. Source: IRS Publication 550, Chapter 4.

Common Wash Sale Mistakes to Avoid

The most frequent wash sale errors include: buying the same security in an IRA within the 61-day window (the loss is permanently disallowed with no basis adjustment), reinvesting dividends that trigger a wash sale on recently sold shares, and purchasing "substantially identical" ETFs (for example, selling one S&P 500 ETF and buying another that tracks the same index). Note that the IRS has not published a definitive list of what constitutes "substantially identical" for ETFs and mutual funds — consult a tax professional for edge cases. Cryptocurrency was historically exempt from the wash sale rule, but starting in 2025, digital assets are subject to wash sale rules under the Infrastructure Investment and Jobs Act provisions. Source: IRS.

Wash Sale Rule vs Tax-Loss Harvesting

Tax-loss harvesting is the strategy of intentionally selling investments at a loss to offset capital gains, and the wash sale rule is the primary constraint on this strategy. To harvest losses without triggering a wash sale, investors typically wait 31 days before repurchasing the same security, or immediately purchase a similar-but-not-identical security (for example, selling a total US stock fund and buying a large-cap value fund). The annual capital loss deduction limit is $3,000 against ordinary income ($1,500 if married filing separately), with unused losses carrying forward indefinitely. Use our tax-loss harvesting calculator to model the full-year tax impact. Last updated May 2026.