The wash sale rule (IRC §1091) disallows a tax loss when you sell a security at a loss and buy a substantially identical security within 30 days before or after the sale — a 61-day window. The disallowed loss is not forfeited; it increases the cost basis of your replacement shares, deferring the loss until you sell those shares. Understanding wash sales is critical for effective tax-loss harvesting.
Sale at a Loss
Replacement Share Purchases (within 61-day window)
61-Day Wash Sale Window
Purchase Lot Analysis
Wash Sale Summary
Disclaimer: This is an estimate based on 2025 wash sale rules (IRC §1091). It assumes the securities are substantially identical. Consult your brokerage's Form 1099-B and a tax professional for official reporting. Crypto wash sale rules may differ.
How to Use the Wash Sale Calculator
The wash sale rule is one of the most misunderstood — and frequently violated — tax rules for active investors. It prevents you from claiming a tax loss if you buy back the same (or substantially identical) security within a 61-day window surrounding your sale date. This wash sale calculator helps you determine whether a purchase triggers the rule, how much loss is disallowed, and what the adjusted cost basis of your replacement shares will be.
Step 1: Enter Your Sale at a Loss
Enter the date you sold shares at a loss, the total dollar loss (proceeds minus cost basis), and the number of shares sold. The loss per share is calculated automatically and used to allocate the disallowed loss to the replacement shares.
Step 2: Add All Purchases Within the 61-Day Window
Add each purchase of the same (or substantially identical) security that falls within 30 days before or after your sale date — the 61-day wash sale window. Include the purchase date and number of shares. The calculator shows whether each purchase falls inside the window and marks it accordingly. Add as many lots as needed.
How the Disallowed Loss Is Calculated
If total replacement shares in the window are equal to or greater than shares sold, the entire loss is disallowed. If replacement shares are fewer than shares sold, only the proportional portion of the loss is disallowed — the ratio of replacement shares to total shares sold. For example, if you sold 100 shares at a $1,000 loss and bought 40 replacement shares in the window, 40% of the loss ($400) is disallowed and added to the replacement shares' basis.
The Adjusted Basis Rule
The disallowed loss is not gone — it's added to the cost basis of your replacement shares. This higher basis reduces your eventual gain or increases your deductible loss when you sell those replacement shares. So the wash sale rule defers the loss, not eliminates it. To actually realize the loss, sell the replacement shares outside the 61-day window and don't immediately repurchase.
How to Avoid Wash Sales
Wait 31 days after your sale before repurchasing the same security. Alternatively, immediately purchase a similar but not substantially identical security to maintain market exposure — for example, swapping one S&P 500 ETF for a different provider's S&P 500 ETF (though this carries risk, as the IRS could deem them substantially identical). For tax-loss harvesting purposes, consult a tax professional about which alternative securities are safe substitutes.
Frequently Asked Questions
Is this wash sale calculator free?
Yes, completely free with no signup required. All calculations run locally in your browser — your data is never transmitted to any server.
What is the wash sale rule?
The wash sale rule (IRC §1091) disallows a tax loss when you sell a security at a loss and buy a 'substantially identical' security within 30 days before or after the sale date — a 61-day window in total. The disallowed loss is added to the cost basis of the replacement shares, preserving the loss for a future sale.
What is the 61-day wash sale window?
The wash sale window spans 30 days before the sale date, the sale date itself, and 30 days after — 61 days total. Any purchase of a substantially identical security within this window triggers the wash sale rule. For example, if you sell on March 15, purchases from February 13 through April 14 (inclusive) could trigger a wash sale.
What happens to a disallowed wash sale loss?
The disallowed loss is NOT permanently lost. It is added to the cost basis of the replacement shares you purchased. When you later sell those replacement shares (outside the wash sale window), the higher basis reduces your taxable gain or increases your deductible loss. The loss is deferred, not forfeited.
What counts as a substantially identical security?
Substantially identical securities include the exact same stock or fund, options on the same stock, and contracts that are economically equivalent. It does NOT include different ETFs tracking similar but different indexes, stocks of different companies in the same industry, or bonds vs. stocks. Mutual funds tracking the same index as an ETF may be considered substantially identical.
Do wash sale rules apply to crypto?
Currently, the IRS does not apply wash sale rules to cryptocurrency, because cryptocurrency is property (not a 'security') under current law. However, legislation has been proposed to extend wash sale rules to crypto. As of 2025, crypto investors can still harvest losses and immediately repurchase the same crypto — but this may change.
What if I have multiple purchases triggering the wash sale?
When multiple purchases fall within the wash sale window, the disallowed loss is allocated proportionally based on the number of shares involved. Only the portion of the loss attributable to replacement shares is disallowed. This calculator handles multiple lots.
Is this calculator accurate for tax filing?
This tool provides a solid estimate of wash sale rules based on dates you enter. Always consult a tax professional or use tax software for official reporting, as individual circumstances may vary and brokerage Form 1099-B reporting should be your authoritative source.