of the loss the wash sale rule disallows
IRC §1091 · 30-Day Window · Form 8949 Code W · TY 2025 & 2026
See how much of a stock loss the wash sale rule disallows when you buy back substantially identical shares within 30 days. The tool applies IRC §1091, prorates a partial wash by share count, adds the disallowed loss to the replacement shares' basis, and flags the IRA trap where the loss is lost for good.
The hardest part of a wash sale is deciding what counts as "substantially identical" and spotting the IRA and spouse traps before you trade. The companion guide walks through every edge case in plain English.
Read the Wash Sale Rule Guide →The wash sale rule (IRC §1091) disallows your loss if you buy substantially identical stock or securities within 30 days before or 30 days after the loss sale. In a taxable account the disallowed loss is not gone: it is added to the basis of the replacement shares under §1091(d) and recovered when you sell them, with the old holding period tacked on. If you buy fewer replacement shares than you sold, only that fraction of the loss is disallowed. The one place the loss really disappears is an IRA or Roth IRA repurchase, where Rev. Rul. 2008-5 disallows it with no basis restoration. None of this changed for 2025 or 2026.
| Item | Tax Year 2026 | Tax Year 2025 |
|---|---|---|
| Window before the sale | 30 calendar days | 30 calendar days |
| Window after the sale | 30 calendar days | 30 calendar days |
| Total span (with sale day) | 61 days | 61 days |
| Disallowed loss treatment (taxable) | Added to replacement basis (§1091(d)) | Added to replacement basis (§1091(d)) |
| Holding period of replacement | Tacks on the old shares (§1223(3)) | Tacks on the old shares (§1223(3)) |
| Replacement bought in an IRA | Loss permanently lost (Rev. Rul. 2008-5) | Loss permanently lost (Rev. Rul. 2008-5) |
| Applies to gains | No (losses only) | No (losses only) |
| Reporting | Form 8949 code W + Schedule D | Form 8949 code W + Schedule D |
The 30-day window each side, the basis and holding-period adjustments in §1091(d) and §1223(3), and the Rev. Rul. 2008-5 IRA treatment are the same for both years. The One Big Beautiful Bill Act (P.L. 119-21) made no change to the wash sale rule; the last substantive amendment to §1091 was in 2002. Sources: IRC §1091, IRS Publication 550, and Rev. Rul. 2008-5.
The tool follows IRC §1091 and the regulations under it: find the loss, test whether replacement shares fall in the window, prorate by share count, then move the disallowed loss into the replacement basis or, for an IRA, write it off entirely. For the "substantially identical" test and the trap list, see the Wash Sale Rule Guide.
The loss is the cost basis of the shares sold minus the sale proceeds. If the proceeds are equal to or above the basis there is a gain, and the wash sale rule does not apply, because §1091 disallows losses only.
Only substantially identical shares (or options or contracts to buy them) purchased within 30 days before through 30 days after the sale are replacement shares under §1091(a). The number that matches is the smaller of the shares sold and the replacement shares bought. Whether a security is substantially identical is your call; this calculator assumes the replacement you enter qualifies.
If the replacement quantity is smaller than the shares sold, only the matched fraction of the loss is disallowed (§1091(b)). Disallowed loss equals the total loss times matched shares divided by shares sold. The rest of the loss is deductible this year on Schedule D, subject to the separate $3,000 net capital loss limit.
In a taxable account the disallowed loss is added to the cost of the replacement shares under §1091(d), and the old shares' holding period tacks on under §1223(3), so the loss returns when you sell the replacement. If the replacement was bought in an IRA or Roth IRA, Rev. Rul. 2008-5 gives no basis increase, so the disallowed loss is permanently lost.
The tool multiplies the deductible loss by the marginal rate you choose to estimate this year's tax value, and separately shows the disallowed loss that is either deferred into basis (taxable) or forfeited (IRA). The deferred amount is recovered later; the forfeited amount is not.
The wash sale most people miss is the one their own dividend reinvestment causes. If a fund or stock you just sold at a loss reinvests a dividend back into the same security inside the 30-day window, that small purchase is a replacement and washes part of the loss. We tell clients to turn off automatic reinvestment in any position they plan to harvest, because a $40 reinvested dividend can disallow a slice of a $4,000 loss and create a messy basis adjustment on a handful of shares.
The IRA trap is the one we cannot fix after the fact. A normal wash sale just defers the loss, so a client who rebought in a taxable account still gets the deduction eventually. But under Rev. Rul. 2008-5 a repurchase in an IRA or Roth IRA erases the loss with no basis to recover it, and there is no amended return that brings it back. We check whether a client runs a model portfolio across both their brokerage and their IRA before they harvest, because the rule does not care that the two accounts feel separate.
Brokers report wash sales only within one account for one CUSIP. They do not see your spouse's account, your IRA, or a near-identical fund at another firm. So the 1099-B is a floor, not a ceiling: the real wash sale exposure can be larger than the broker flagged. When a client harvests aggressively across accounts, we rebuild the wash sale analysis by hand rather than trusting the consolidated 1099 to have caught everything.
The clean way to keep market exposure while harvesting is to swap into something correlated but not substantially identical, hold it past the 31st day, then swap back if you want the original. A large-cap index fund and a different provider's large-cap fund tracking a different index are the usual pair. We document the swap because the substantially identical line on two index funds is unsettled, and a contemporaneous note on why the funds differ is worth a great deal if the position is ever questioned.
Before you sell, decide whether you want to stay in the market. If you do, line up a non-identical replacement and a calendar that clears 30 days, then read the Wash Sale Rule Guide for the substantially identical line and the IRA and spouse traps.
A deductible net capital loss is capped at $3,000 a year against ordinary income, with the rest carried forward. Run the Capital Loss Carryover Calculator to see how much you can use this year and how much rolls forward.
Losses that clear the wash sale rule offset gains without the $3,000 limit. Check the rate on those gains with the Qualified Dividends & Capital Gains Tax Calculator before timing a sale.
Net investment income above the threshold carries a 3.8 percent surtax, so a harvested loss is worth more. Confirm your exposure with the Net Investment Income Tax Calculator.