Tax Loss Harvesting Calculator
See how selling investments at a loss can offset your capital gains, reduce your taxable income, and carry unused losses forward to future tax years.
Tax Savings
$2,70016.89% → 16.79% effective rate
Losses Used Against Gains
$15,000ST: $5,000 + LT: $10,000
Ordinary Income Offset
$0Up to $3,000 cap
Loss Carryforward
$0Applied in future years
| Offset Type | Amount |
|---|---|
| ST Losses → ST Gains | $5,000 |
| LT Losses → LT Gains | $10,000 |
| Cross-type offset | $0 |
| Ordinary income offset | $0 |
| Carryforward | $0 |
| Tax Before Harvesting | $32,084 |
| Tax After Harvesting | $29,384 |
| Tax Savings | $2,700 |
Wash Sale Rule Warning
The IRS wash sale rule disallows a loss deduction if you buy the same or a "substantially identical" security within 30 days before or after the sale. To preserve your harvested losses, avoid repurchasing the same holding for at least 31 days. Consider buying a similar (but not identical) ETF or fund in the meantime to maintain your market exposure.
How tax-loss harvesting works
Selling a losing investment turns a paper loss into a realized one that the IRS lets you use. The netting follows a fixed order: losses first cancel capital gains of the same character (short-term against short-term, long-term against long-term), then net against the other character. Whatever remains can offset up to $3,000 of ordinary income a year ($1,500 married filing separately), and anything left over carries forward indefinitely.
The benefit is the loss multiplied by the rate it offsets. A loss that cancels a short-term gain taxed at 37% is worth far more than one applied against a 15% long-term gain — which is why the character of what you are offsetting matters as much as the size of the loss.
Worked example
$20,000 realized gain, $30,000 harvested loss, 32% bracket
- $20,000 of loss cancels the $20,000 gain — tax on the gain becomes $0.
- $3,000 of the remaining $10,000 loss offsets ordinary income, saving $3,000 × 32% = $960.
- The final $7,000 carries forward to next year — no benefit is lost.
- This year's saving: the avoided gains tax plus $960.
The wash sale rule in detail
The wash sale rule is the main trap. If you buy a substantially identical security within 30 days before or after the loss sale — a 61-day window — the loss is disallowed and instead added to the basis of the replacement shares. Critically, the rule reaches across all your accounts: a repurchase in your spouse's account or in your IRA also triggers it, and a loss washed by an IRA purchase is permanently lost (IRS Rev. Rul. 2008-5), because an IRA has no basis to absorb it.
To stay invested without washing the loss, switch to a similar-but-not-identical holding — a different provider's index fund, or a different index entirely. Map the exact window with the wash sale calculator.
Where harvesting works best
Offset short-term gains first
Short-term gains are taxed at ordinary rates up to 37%, so directing losses against them yields the biggest saving per dollar of loss.
Crypto has no wash sale rule
Because crypto is property, you can harvest a crypto loss and rebuy instantly. See the crypto tax calculator.
Mind the NIIT threshold
Harvesting that lowers net investment income can also keep you under the 3.8% NIIT thresholds ($200k single / $250k joint).
Don't harvest in the 0% bracket
If your long-term gains already fall in the 0% rate, a harvested loss wastes a deduction you didn't need — consider gain harvesting instead.
Frequently asked questions
What is tax loss harvesting?
Tax loss harvesting is selling investments at a loss to offset capital gains and reduce tax. Realized losses first offset gains of the same type (short-term against short-term, long-term against long-term), then net against the other type. Any remaining net loss offsets up to $3,000 of ordinary income per year, and unused losses carry forward indefinitely.
What is the wash sale rule?
It disallows a loss if you buy a substantially identical security within 30 days before or after the sale that created the loss — a 61-day window in total. The disallowed loss is not lost; it is added to the cost basis of the replacement shares, deferring the benefit until you sell those. It applies to stocks, bonds, mutual funds, ETFs, and options.
How much can capital losses offset ordinary income?
After offsetting all capital gains, net losses reduce ordinary income by up to $3,000 per year ($1,500 if married filing separately). Excess losses carry forward indefinitely and can offset future gains in full, plus another $3,000 of ordinary income each year.
How does short-term vs long-term netting work?
Losses net against gains of the same character first: short-term losses against short-term gains, long-term against long-term. Short-term gains are taxed at ordinary rates (up to 37%) while long-term gains get 0/15/20% rates, so a short-term loss that cancels a short-term gain usually saves more tax than one applied to a long-term gain.
Does the wash sale rule apply across my IRA or my spouse's account?
Yes. Buying the substantially identical security in your IRA triggers a wash sale and the disallowed loss is permanently lost (it cannot be added to an IRA's basis) — per IRS Rev. Rul. 2008-5. Purchases by your spouse or a company you control also count. The rule looks across all your accounts, not just the one you sold from.
What counts as a 'substantially identical' security?
The same stock or fund is clearly identical. Two different companies are not. The grey area is index funds: switching from one S&P 500 fund to a different provider's S&P 500 fund is widely used to stay invested while harvesting, though the IRS has never fully defined the line. Switching to a different index (e.g. S&P 500 to a total-market fund) is safer.
Does the wash sale rule apply to crypto?
Not currently. Crypto is treated as property rather than a security, so the wash sale rule does not apply — you can sell crypto at a loss and rebuy immediately. Legislation to change this has been proposed but not enacted as of 2026. See the crypto tax calculator for details.
When should I harvest losses?
Any time during the year, not just December. Good triggers: you have realized gains to offset, a position has dropped meaningfully, or you expect a higher bracket later. Acting earlier in the year leaves more room to reinvest without tripping the 30-day wash sale window.
Sources
Related insights
Use these guides for rule explanations, planning context, and follow-up questions beyond the calculator result.
Related Calculators
Capital Gains Tax Calculator
LTCG 0/15/20% rates + 3.8% NIIT based on income brackets
NIIT Calculator
Net Investment Income Tax 3.8%, thresholds $200k / $250k MFJ
Federal Income Tax Calculator
10–37% brackets, $15,750 standard deduction, progressive calculation
Wash-Sale Calculator
Disallowed loss, 30-day rule, basis adjustment tracking
Dividend Tax Calculator
Qualified 0/15/20% rates vs ordinary income + 3.8% NIIT
Crypto Tax Calculator
STCG ordinary rates, LTCG 0/15/20%, mining/staking income