Tax-loss harvesting calculator
Estimate how realizing a loss could offset your capital gains — plus up to $3,000 of ordinary income — and how much loss carries forward. Then check whether a buy around the sale date could make it a wash sale.
Wash-sale rule: if you buy the same or a "substantially identical" security within 30 days before or after the sale, the IRS disallows the loss. Check your buys below.
This estimate uses the flat rates you type. For the tax through the 2026 brackets — with short/long-term netting and carryover — use the capital gains tax calculator.
Wash-sale check
Enter the sale at a loss and every buy of the same or a possibly substantially identical security around it — in any of your accounts, your spouse’s, and dividend reinvestments. The check flags buys within 30 days before or after the sale.
The sale at a loss
Buys around the sale
Don’t enter the shares you sold. Example data below — replace with your own.
A flag, not a ruling. The check treats every buy you enter as substantially identical — it never decides that for you — and it cannot see accounts you don’t enter. Not covered: options and contracts to buy, short sales, losses and gains on the same day, and a replacement that is itself later sold at a loss. Rules: IRS Pub. 550 “Wash Sales”, last verified Oct 15, 2026. Educational, not tax advice; your figures stay in your browser.
How tax-loss harvesting works
Harvesting means selling a position at a loss on purpose, so that realized loss can reduce your tax bill. Under US rules, a realized capital loss first offsets your realized capital gains. If losses remain, up to $3,000 can offset ordinary income in the year ($1,500 if married filing separately). Anything left carries forward to future years indefinitely.
This estimate applies your loss to gains first (saving tax at your capital-gains rate), then up to $3,000 against ordinary income (at your ordinary rate), and carries the rest forward. It ignores short- vs long-term netting order, state taxes, and your full situation.
How the wash-sale check works
IRS Pub. 550: if within 30 days before or after a loss sale you buy substantially identical stock — including for your IRA or Roth IRA, or your spouse buys it — the loss is disallowed to that extent. When you buy back fewer shares than you sold, the shares bought are matched to the shares sold in the order you bought them, and only the matched shares’ loss is disallowed; the rest stays deductible. The disallowed loss is added to the basis of the replacement shares (so it is deferred, not lost) — except for shares bought in an IRA or Roth IRA, which get no such adjustment.
Pub. 550’s own example: you sell 100 shares at a $1,000 loss after buying 50 and then 25 substantially identical shares in the previous 30 days. You can’t deduct $750 (75 shares’ worth); the other $250 is deductible, and the $750 is split over the two new lots’ basis — $500 and $250.
Illustrative estimate for US federal rules — not tax advice. Rules and limits change and depend on your circumstances; consult a licensed tax professional. Your figures never leave the page — the calculation runs entirely in your browser. The page loads standard pageview analytics, which never sees your numbers.
Wash-sale and harvesting FAQ
What is the wash-sale window, exactly?
IRS Pub. 550: buying substantially identical stock within 30 days before or after the day you sell at a loss makes the loss (or part of it) a wash sale. Counting the sale date itself, that is a 61-day span (our arithmetic: 30 + 1 + 30).
Does buying in my IRA or Roth IRA count?
Yes. Pub. 550 lists acquiring substantially identical stock for your IRA or Roth IRA as a wash sale. Normally the disallowed loss is added to the cost of the replacement shares, but Pub. 550 makes an exception for IRA and Roth IRA purchases: that part of the loss is not added to any basis, so there is no later sale in your taxable account that would bring it back.
What if my spouse buys the stock, or my dividends reinvest?
A purchase by your spouse counts (Pub. 550). Pub. 550’s wash-sale section does not mention dividend reinvestment; our reading is that reinvested shares are bought on the reinvestment date like any other purchase, so the check lets you enter them as a buy — confirm with a tax professional. When fewer shares are bought back than were sold, Pub. 550 disallows only the loss on the shares matched, in the order they were bought.
Will this tool tell me if a fund or ETF is “substantially identical”?
No. Pub. 550 says that depends on all the facts and circumstances, and there is no IRS list. The check treats every buy you enter as substantially identical, so only enter buys you think might be. It also cannot see accounts you do not enter — other brokers, your IRA, your spouse’s account.
Why doesn’t my broker’s 1099-B show the wash sale?
Brokers report a disallowed wash-sale loss (box 1g) only for covered securities bought back in the same account with the same CUSIP. Buys at another broker, in an IRA or by a spouse are yours to track and adjust.
This math stops at what you typed in.
Tradune runs it continuously on your real holdings — with your money-weighted return next to a buy-and-hold SPY twin, and SEC insider filings flagged on the stocks you own.
Educational analytics — not investment advice.