Calculators·2026 tax year
Is my loss a wash sale?
If you sell a stock at a loss and buy it back within 30 days, before or after the sale, the IRS disallows the loss, which basically just means you can't deduct it this year. This shows how much of your loss still counts and where the rest goes.
Loss you can deduct for 2026
$0
- Loss on the sale
- Disallowed by the wash-sale rule
- Where that part goes
- The 61-day window
- First day a buyback is safe
| Purchase | Shares matched | Loss moved | New basis per share |
|---|
How the math works
A wash sale happens when you sell a stock or fund at a loss and, within 30 days before or after the sale, you buy the same thing or something substantially identical. Counting the day of the sale, that's a 61-day window. It only applies to losses. Selling at a gain and buying right back is fine as far as this rule goes.
If you bought fewer shares in the window than you sold, only part of the loss is disallowed. The IRS matches the shares you bought to the shares you sold in the order you bought them, earliest first, up to the number you sold. So the disallowed part is the loss per share times the matched shares, and the rest of the loss you can deduct now, under the normal rules: it cancels your gains first, then up to $3,000 of other income (the tax-loss harvesting estimator shows what that's worth). In the IRS's own example, you sell 100 shares at a $1,000 loss after buying 75 shares in the window: $750 is disallowed and you can still deduct $250.
When the new shares are in your own taxable account (or your spouse's), the loss isn't gone, it's postponed. It gets added to what the new shares cost you, so when you sell those, your gain is smaller or your loss is bigger by the same amount. The new shares also take on how long you held the old ones, which can make them long term sooner.
The ugly one is your IRA. If your IRA or Roth IRA buys the stock inside the window, the IRS ruled in 2008 that the loss is disallowed and doesn't get added to anything. You don't get it back later. It's just gone.
What this leaves out
It can't judge "substantially identical" for you. The same stock counts, and so do options or contracts to buy it. Two different companies' stocks generally don't. Two S&P 500 index funds from different fund companies are the gray area: the IRS has never said either way, which is why I'd treat that swap as a judgment call, not a sure thing.
Purchases you didn't click on still count. A dividend that gets reinvested or an automatic monthly buy inside the window is a purchase, including one in your IRA. And a December sale with a January buyback still loses the deduction on this year's return, because the window runs 30 days past the sale no matter what year it lands in.
Your broker probably won't catch all of this. Brokers only have to report a wash sale on your 1099-B when the sale and the buyback happen in the same account with the exact same security. A buyback in another account, your spouse's account or your IRA is on you to track.
It also leaves out short sales, selling options at a loss, more than one losing sale of the same stock in the window, and state taxes.
Watch
Sources: IRS Publication 550 (Wash Sales, the matching rule and holding period), 26 U.S.C. §1091, Treas. Reg. §1.1091-1 (the 61-day window and matching in order of purchase), Rev. Rul. 2008-5 (IRA and Roth IRA purchases) and the Instructions for Form 1099-B (what your broker has to report). Last checked against these sources on Nov 9, 2026.
An estimate for learning, not tax advice. I'm a CPA, but I'm not your CPA, so check with whoever does your taxes before you sell. Nothing you type leaves your browser. Full disclaimer.