Wash Sale Loss Disallowed Calculator
Estimate how much loss is disallowed under IRS wash sale rules, how much remains deductible, and how replacement share basis may be adjusted.
How Is Wash Sale Loss Disallowed Calculated? A Practical Expert Guide
If you sell a stock, ETF, or other security at a loss and then buy a substantially identical security too soon, the IRS may block some or all of your loss deduction. This is called a wash sale, and it is one of the most misunderstood rules in retail investing. Knowing exactly how the disallowed amount is calculated can save you from tax surprises and help you structure trades more efficiently.
At a high level, the formula is straightforward: calculate the loss per share on the sale, then multiply by the number of replacement shares bought during the wash window (up to the number of shares sold at a loss). The result is the disallowed loss. The remaining loss may still be deductible, depending on your full tax picture.
Core wash sale rule in plain English
The wash sale window is 61 calendar days total:
- 30 days before the loss sale date
- The day of the loss sale
- 30 days after the loss sale date
If you acquire substantially identical securities in this window, the loss linked to those replacement shares is disallowed right now. In a taxable account, that disallowed loss is generally added to the basis of replacement shares, which defers the deduction until a future disposition. In an IRA scenario, the disallowed loss is usually permanently lost rather than added to basis.
Step-by-step formula for disallowed wash sale loss
- Compute realized loss per share: Original cost basis per share minus sale price per share (if this is negative or zero, there is no loss to disallow).
- Find replacement share count in the window: Count how many substantially identical shares were purchased in the 61-day window.
- Determine disallowed share count: Use the smaller of shares sold at loss and replacement shares purchased.
- Calculate disallowed loss: Loss per share multiplied by disallowed share count.
- Calculate allowed current loss: Total realized loss minus disallowed loss.
- Taxable account basis adjustment: Add disallowed loss to replacement shares basis (typically allocated across the replacement shares tied to the wash sale).
In compact form:
- Total realized loss = (Cost basis per share – Sale price per share) × Shares sold at loss
- Disallowed shares = min(Shares sold at loss, Replacement shares in window)
- Disallowed loss = Loss per share × Disallowed shares
- Currently allowed loss = Total realized loss – Disallowed loss
Example with partial disallowance
Suppose you sold 200 shares at a $12 per-share loss. Your total realized loss is $2,400. Then you bought 80 replacement shares within 30 days after the sale. Because only 80 of the 200 sold shares were replaced in the wash window, only part of the loss is disallowed:
- Disallowed shares: min(200, 80) = 80
- Disallowed loss: 80 × $12 = $960
- Currently allowed loss: $2,400 – $960 = $1,440
This example shows why many investors are confused: the entire trade is not always disallowed. Wash sale treatment can be partial.
Comparison table: common wash sale outcomes
| Scenario | Shares Sold at Loss | Loss per Share | Replacement Shares in Window | Disallowed Loss | Currently Allowed Loss |
|---|---|---|---|---|---|
| No replacement purchase | 100 | $10 | 0 | $0 | $1,000 |
| Partial replacement | 100 | $10 | 40 | $400 | $600 |
| Full replacement | 100 | $10 | 100 | $1,000 | $0 |
| Over-replacement | 100 | $10 | 150 | $1,000 | $0 |
What counts as “substantially identical”?
The tax code uses the phrase “substantially identical,” but does not give a perfect one-size-fits-all matrix for every ETF, option, and fund pair. Obvious examples include the exact same stock ticker sold and repurchased in the window. Less obvious cases can involve share classes, options, convertible instruments, or very closely tracking funds. For conservative compliance, investors often avoid re-entering the same ticker and use a broader diversification substitute for at least 31 days.
Why your broker 1099 may not tell the whole story
Brokers usually report many wash sale adjustments, but there are practical limitations. Different accounts, spouse accounts, IRA interactions, and transfers can create situations where your final return-level wash sale analysis differs from a single account statement. If you trade across multiple platforms or account types, keep your own transaction ledger and reconcile all relevant trades before filing.
Tax-rate context that makes wash sale planning important
Wash sale disallowance does not change your economic loss, but it changes timing. Timing matters because tax rates and offset opportunities vary. Short-term gains are taxed at ordinary income rates, while long-term gains use preferential capital gains rates. Deferring a loss from one tax year to another can alter your after-tax result.
| Federal Tax Metric (2024) | Rate or Threshold | Why It Matters for Wash Sale Planning |
|---|---|---|
| Long-term capital gains rates | 0%, 15%, 20% | Loss timing affects which gains you can offset at these rates. |
| Top ordinary income rate | 37% | Short-term gains can be expensive; loss timing can reduce high-rate gains. |
| Net Investment Income Tax (NIIT) | 3.8% | Applies above MAGI thresholds and can increase effective tax burden. |
| NIIT MAGI threshold (Single) | $200,000 | Deferral of losses can affect NIIT exposure year to year. |
| NIIT MAGI threshold (Married Filing Jointly) | $250,000 | Crossing thresholds can change effective marginal tax impact. |
Advanced details investors should understand
- Partial matching: Wash sale treatment is share-count based. If only part of your sold shares are replaced, only that matched part is disallowed.
- Basis increase in taxable accounts: The disallowed amount is generally not gone forever. It is embedded in replacement basis, potentially recognized later.
- IRA replacement risk: If replacement is in an IRA, the disallowed loss generally does not carry into IRA basis the way taxable replacements do. This can make the loss effectively permanent.
- Holding period interaction: Wash sale rules can also carry over holding period characteristics to replacement shares, affecting short-term vs long-term outcomes later.
- Multi-lot complexity: Real portfolios involve multiple purchase lots. Specific lot identification and chronology matter.
Practical process to avoid accidental disallowance
- Before tax-loss harvesting, scan prior 30 days of buys in all related accounts.
- After selling at a loss, block auto-reinvestment and avoid substantially identical purchases for 31 days.
- If you need market exposure, consider a not-substantially-identical substitute security.
- Track all lots with trade dates, quantities, and account type.
- Reconcile broker 1099-B adjustments with your own records and tax software inputs.
Common mistakes
- Thinking wash sales apply only when you repurchase after the sale. Purchases 30 days before can also trigger it.
- Assuming all losses are denied permanently. In taxable accounts, they are often deferred via basis adjustment.
- Ignoring IRA buys, spouse account buys, or dividend reinvestment purchases that can create unexpected matching shares.
- Believing one broker statement captures all wash sale events across your financial life.
Authoritative references
For legal and filing-level accuracy, review primary sources:
- IRS Publication 550 (Investment Income and Expenses)
- 26 U.S. Code § 1091 (Loss from wash sales of stock or securities) – Cornell Law School
- SEC Investor.gov wash sale glossary entry
Bottom line
To calculate wash sale disallowed loss correctly, focus on three numbers: your loss per share, shares sold at a loss, and replacement shares bought in the 61-day window. Multiply loss per share by matched replacement shares to get the disallowed amount. If replacement shares are in a taxable account, that loss is generally deferred into replacement basis. If replacement shares are in an IRA, the loss may be permanently disallowed. The calculator above gives a fast estimate, but final tax filing should account for lot-level details and all related accounts.