Tax loss harvesting calculator
See how much you save by harvesting investment losses against gains and income.
What tax-loss harvesting does
Tax-loss harvesting turns a paper loss into a real tax saving. You sell a losing position to realize the loss, use it to cancel out capital gains (and a bit of ordinary income), and - if you want to stay invested - immediately buy a similar but not identical fund. Done well, you lower your tax bill without materially changing your portfolio. This calculator estimates the saving.
How the offsets stack
The IRS applies harvested losses in a fixed order:
- Against capital gains first, with no dollar limit. A long-term loss offsets a long-term gain, and so on.
- Against ordinary income, up to $3,000 per year of any excess loss.
- Carried forward - whatever is left rolls to future years indefinitely.
Worked example
You have $20,000 of realized capital gains and harvest $30,000 of losses, at a 15% capital gains rate and a 35% ordinary rate:
- Offsetting gains: $20,000 of the loss cancels the $20,000 gain
- Offsetting ordinary income: $3,000 of the remaining $10,000
- Carried forward: $7,000 to next year
- Tax saved this year: $20,000 × 15% + $3,000 × 35% = $4,050
The $7,000 carryforward is not lost - it waits to offset future gains or another $3,000 of income next year.
The wash sale rule
The one trap: if you buy back the same or a substantially identical security within 30 days before or after the sale, the loss is disallowed. To stay invested and compliant, swap into a similar but different fund - for example, sell one broad US index fund and buy another tracking a different index. After 31 days you can switch back if you wish.
When it is worth it
- High realized gains in a year make harvesting most valuable.
- High ordinary rate makes the $3,000 income offset worth more.
- It matters less in tax-advantaged accounts (IRAs, 401ks), where gains are not currently taxed anyway.
Common mistakes
- Triggering a wash sale by rebuying too soon.
- Harvesting in a retirement account, where it does nothing.
- Letting tax savings drive you out of a position you actually want to hold.
For the tax on the gains you are offsetting, see the capital gains tax calculator; to plan converting pre-tax savings in a low-income year, see the Roth conversion calculator.
Frequently asked questions
- What is tax-loss harvesting?
- It is selling an investment at a loss to offset realized capital gains, and up to $3,000 of ordinary income, lowering your tax bill. You can stay invested by buying a similar (not substantially identical) fund to avoid the wash sale rule.
- How much loss can I use in one year?
- Losses first offset your capital gains with no limit. Any excess loss can offset up to $3,000 of ordinary income per year, and the rest carries forward to future years indefinitely.
- What is the wash sale rule?
- If you buy the same or a substantially identical security within 30 days before or after the loss sale, the IRS disallows the loss. Wait 31 days or buy a similar-but-different fund to stay compliant.
Last reviewed January 2026. This calculator provides general educational estimates based on the inputs you enter and simplified assumptions. It is not financial, tax, legal or investment advice, and figures may differ from your actual liability. Verify with a licensed CPA or financial advisor before acting.