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.
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.
Frequently Asked Questions
What is the wash sale 61-day window?
The wash sale window spans 61 days: 30 days before the sale, the day of the sale, and 30 days after. If you buy a substantially identical security anywhere within this window, the loss on the sale is disallowed. For example, if you sell at a loss on March 15, the window runs from February 13 through April 14. The disallowed loss is added to your cost basis on the replacement shares.
Does the wash sale rule apply to cryptocurrency?
Starting in 2025, yes. The Infrastructure Investment and Jobs Act extended wash sale rules to digital assets. Previously, crypto was exempt, allowing investors to sell and immediately repurchase for tax-loss harvesting. Now, the same 61-day window applies to Bitcoin, Ethereum, and all other digital assets traded in taxable accounts.
What happens if I buy in my IRA within the wash sale window?
If you sell a security at a loss in a taxable account and buy the same security in your IRA (traditional or Roth) within the 61-day window, the loss is permanently disallowed. Unlike a regular wash sale, the disallowed loss cannot be added to the IRA basis because IRAs do not have a cost basis that is adjustable in the same way. This is one of the most costly wash sale mistakes.
Are dividend reinvestments subject to the wash sale rule?
Yes. If you sell shares at a loss and a dividend reinvestment plan (DRIP) automatically purchases shares of the same security within the 61-day window, those reinvested shares can trigger a wash sale. Even small DRIP purchases of a few dollars can disallow part of your loss. Consider pausing DRIP before planned tax-loss harvesting trades.
What does "substantially identical" mean for ETFs?
The IRS has not published a definitive standard for ETFs. Generally, two ETFs tracking the exact same index (e.g., two S&P 500 ETFs) are considered substantially identical. However, switching from an S&P 500 ETF to a total market ETF or a large-cap value ETF is generally considered safe. Consult a tax professional for borderline cases, as the IRS can challenge any transaction it deems abusive.
Is the disallowed loss permanently lost?
No. The disallowed loss is added to the cost basis of your replacement shares, effectively deferring — not eliminating — the tax benefit. When you eventually sell the replacement shares without triggering another wash sale, the higher basis will result in a smaller gain or larger deductible loss. The original holding period also carries over.