Tax-Loss Harvesting Calculator
Work out the tax a harvested loss saves in 2026, how much offsets ordinary income, what carries forward, and whether the wash-sale rule would disallow it.
How to use this calculator
- 1Enter the unrealised loss on the position you are thinking of selling.
- 2Enter your realised gains for the year, split between short-term and long-term — offsetting short-term gains is worth the most.
- 3Enter your ordinary rate and taxable income, which sets the long-term rate applied.
- 4Check the wash-sale box honestly: if you intend to rebuy within 30 days, the loss is disallowed and the exercise is pointless.
How the calculation works
Losses offset short-term gains, then long-term gains, then up to $3,000 of ordinary income. Anything left carries forward indefinitely- $3,000
- The annual cap on net capital losses deductible against ordinary income
- wash sale
- Repurchasing the same or substantially identical security within 30 days either side disallows the loss
The netting order is set by statute and it favours the taxpayer: short-term losses offset short-term gains first, which are taxed at ordinary rates, so the most valuable offset happens automatically.
The $3,000 ordinary income limit has not been raised since 1978. Adjusted for inflation it would be over $14,000 today, which is why a large harvested loss can take decades to use if there are no future gains against it.
A disallowed wash-sale loss is not destroyed — it is added to the basis of the replacement shares. The benefit is deferred rather than lost, but deferral defeats the purpose of harvesting.
Worked example
A $25,000 loss against $13,000 of gains
- 1.$8,000 offsets short-term gains at 32%, saving $2,560.
- 2.$5,000 offsets long-term gains at 15%, saving $750.
- 3.$3,000 offsets ordinary income at 32%, saving $960.
- 4.The remaining $9,000 carries forward, so $4,270 is saved this year.
Result: $4,270 saved now, $9,000 carried forward
The same harvest with a repurchase inside 30 days
- 1.Buying back the same security within 30 days triggers the wash-sale rule.
- 2.The entire loss is disallowed for this year.
- 3.It is added to the cost basis of the replacement shares instead.
- 4.The benefit is deferred to a future sale rather than realised now.
Result: Nothing saved — the loss is disallowed
How a harvested loss is actually used
Tax-loss harvesting means selling a position at a loss deliberately, to use that loss against gains elsewhere. The loss is real, but so is the tax saving, and the shares can usually be replaced with something similar so the market exposure barely changes.
The netting order is fixed by statute and works in the taxpayer's favour. Short-term losses offset short-term gains first — those are taxed at ordinary income rates, up to 37%, so this is the most valuable offset available. Long-term losses then offset long-term gains, taxed at 0%, 15% or 20%. Anything left over crosses between the two categories.
Only after all that can a net loss offset ordinary income, and there the cap is $3,000 a year. Whatever remains carries forward indefinitely, to be used the same way in future years.
The $3,000 limit, and why big losses are worth less than they look
The $3,000 annual limit on offsetting ordinary income was set in 1978 and has never been indexed. In today's money it would be over $14,000.
The consequence is that a very large harvested loss can be worth far less than its face value. Someone who realises a $100,000 loss with no gains to offset it can only use $3,000 a year — more than three decades to absorb it, with the benefit eroded by inflation the whole way. The loss carries forward indefinitely, so nothing is lost outright, but the present value is a fraction of the headline number.
That is why harvesting is most effective when there are gains to offset in the same year. Against gains, a loss is used immediately and in full. Against ordinary income alone, it trickles.
The wash-sale rule, and how people trip it by accident
Selling at a loss and immediately buying the same thing back would let anyone harvest losses at will without changing their position. The wash-sale rule prevents it: if you acquire the same or a substantially identical security within 30 days before *or* after the sale, the loss is disallowed.
That is a 61-day window in total, and the "before" half surprises people — buying more of a stock and then selling an older lot at a loss within 30 days triggers it just as surely as buying back afterwards.
Most accidental wash sales come from automation. Dividend reinvestment buying a few shares inside the window will disallow a proportionate part of the loss. So will a purchase in an IRA — the rule applies across all your accounts, including retirement accounts, and a wash sale triggered inside an IRA is worse than usual because the basis adjustment is lost entirely.
The workarounds are straightforward. Wait 31 days before repurchasing, or buy something similar but not substantially identical — a different index fund tracking a related but distinct index, for instance. "Substantially identical" is not precisely defined for funds, which is why swapping between two different providers' S&P 500 trackers is generally considered risky while moving from an S&P 500 fund to a total-market fund is widely accepted.
What this assumes, and where it stops
Assumptions
- A US taxable brokerage account — harvesting has no effect inside an IRA or 401(k).
- Gains entered are already realised for the year.
- The 2026 long-term capital gains schedule applies to the taxable income entered.
- A single ordinary rate applies to short-term gains and to the ordinary income offset.
Limitations
- The 3.8% Net Investment Income Tax is not added separately; include it in your rates if it applies.
- State capital gains tax is excluded and can materially change the value of a harvest.
- Whether two funds are "substantially identical" is a judgement call the calculator cannot make for you.
- A large harvest can move you between long-term capital gains brackets, which this does not model.
Common questions
How much can I deduct from a capital loss?
Losses first offset capital gains without limit — short-term against short-term, then long-term against long-term, then across. Only a net loss beyond that can offset ordinary income, and there the cap is $3,000 a year. Anything remaining carries forward indefinitely. The $3,000 limit has not been raised since 1978, which is why a large loss with no gains to offset can take decades to use.
What is the wash-sale rule?
If you buy the same or a substantially identical security within 30 days before or after selling at a loss, the loss is disallowed for that year. It is a 61-day window in total, and the "before" half catches people who bought more shares recently. The loss is not destroyed — it is added to the basis of the replacement shares — but the benefit is deferred, which defeats the point of harvesting.
Can dividend reinvestment cause a wash sale?
Yes, and it is one of the most common ways people trigger one accidentally. If automatic reinvestment buys shares of the same fund inside the 30-day window, a proportionate part of the loss is disallowed. Purchases in an IRA count too, since the rule applies across all your accounts — and a wash sale triggered inside an IRA is worse, because the basis adjustment that normally preserves the benefit is lost.
Is tax-loss harvesting worth doing?
It is most valuable when you have realised gains in the same year, particularly short-term ones taxed at ordinary rates — the loss is then used immediately and in full. It is worth much less if you have no gains, since only $3,000 a year can offset ordinary income. Remember also that harvesting lowers your cost basis, so it defers tax rather than eliminating it, unless the shares are eventually inherited with a stepped-up basis.
Sources
- Topic no. 409, Capital gains and losses — US Internal Revenue Service
- Publication 550: Investment Income and Expenses — Wash Sales — US Internal Revenue Service
Formula and content last reviewed on .
Results are estimates for information only, not professional advice.
Related calculators
Tools people commonly use alongside the tax-loss harvesting calculator.