CCalcNest AI

Tax Loss Harvesting Calculator

What harvesting a loss actually saves — offsets, the $3K deduction, carryforward.

$500$500,000
$0$500,000
0 %23.8 %
10 %50 %
Enter values above — results appear instantly as you type.
AI Insight: Harvesting is mostly tax deferral wearing a tax-savings costume — selling at a loss and reinvesting lowers your cost basis, so you owe more when you eventually sell. The real profit hides in three places: the rate arbitrage when the $3K deduction offsets ordinary income at 32% but future gains pay 15%; the time value of deferred tax compounding; and the endgame, where basis step-up at death or charitable donation makes the deferred tax vanish entirely.
Reviewed by the CalcNest Editorial Team · Last reviewed: July 2026 · Methodology
Looking for a different calculator? Try our AI Finder — describe what you need in plain English. Try AI Finder →

Formula

savings = min(L,G) × cap rate + min(remainder, $3,000) × income rate

Example

$15K losses vs $6K gains at 15%/32% → $900 + $960 = $1,860 saved, $6K carries forward.

Embed this calculator on your site

Add this free calculator to your own website with one line of code. The embedded version is responsive, ad-free, and includes a small attribution link back to CalcNest AI.

<iframe src="https://calcnestai.com/embed/tax-loss-harvesting-calculator.html" width="100%" height="700" frameborder="0" style="border: 1px solid #e5e5e5; border-radius: 12px; max-width: 720px;" loading="lazy" title="Tax Loss Harvesting Calculator — Free Tool by CalcNest AI"></iframe>

Harvesting Losses Like You Mean It

The offset ladder

Losses apply in strict order: first against gains of the same character (short vs. short, long vs. long), then across characters, then up to $3,000 against ordinary income, with the rest carried forward indefinitely. The character rules create the strategy's best trade: short-term losses offsetting short-term gains neutralize income taxed at up to 37%, while long-term losses 'wasted' on long-term gains only save 15–20%. Harvest with an eye on which gains you're actually offsetting.

Wash sale: the 61-day tripwire

Buy the same or a 'substantially identical' security within 30 days before or after the loss sale and the loss is disallowed — deferred into the replacement's basis. The rule spans accounts, including your IRA (where the loss dies permanently rather than deferring) and your spouse's accounts. The standard workaround is a similar-but-not-identical fund: one S&P 500 fund for another tracking a different index survives scrutiny in common practice; swapping share classes of the same fund does not. Automatic dividend reinvestment is the classic accidental trigger.

When harvesting is a mistake

Three cases flip the math. In the 0% capital-gains bracket (taxable income under ~$48K single / $96.7K married in 2025), harvesting gains tax-free beats harvesting losses. Near-term planned sales make deferral pointless. And transaction-cost-free doesn't mean risk-free — being out of a position 31 days during a rally (the January 2019 problem) can cost more than the tax saved. Automated daily harvesting services solve timing but layer 0.25–0.40% fees on the whole portfolio to capture a benefit concentrated in volatile years.

Harvesting savings by scenario: a reference grid

The tax value of a harvested loss depends on what it offsets and your rates. This grid shows the first-year savings from harvesting $15,000 in losses under different gain and rate situations.

ScenarioOffsets gainsOffsets incomeYear-1 savings
$15K loss, no gains, 32% bracket$0$3,000~$960
$15K loss, $6K LT gains, 15%/32%$6,000$3,000~$1,860
$15K loss, $15K ST gains, 32%$15,000$0~$4,800
$15K loss, $6K gains, 0% cap bracketharvesting gains beats losses here

The short-term scenario shows the biggest win: losses first offset gains of the same character, so short-term losses neutralizing short-term gains (taxed up to 37%) save far more than long-term losses "wasted" on long-term gains. The last row is the trap — in the 0% capital-gains bracket, harvesting gains tax-free beats harvesting losses.

Common mistakes in tax-loss harvesting

  • Triggering a wash sale. Buying the same or "substantially identical" security within 30 days before or after the loss sale disallows the loss. Automatic dividend reinvestment is the classic accidental trigger.
  • Harvesting in the 0% bracket. If your capital gains rate is 0%, you're spending losses to save nothing on gains — harvest gains instead to reset basis tax-free.
  • Overpaying for automated harvesting. Services capturing this benefit often charge 0.25–0.40% on the whole portfolio for a benefit concentrated in volatile years — do the math on net value.
  • Forgetting it's mostly deferral. Selling low and reinvesting lowers your basis, raising future gains. The real profit is rate arbitrage and time value, not free money.

The wash sale rule and the 61-day window

The wash sale rule disallows a loss if you buy the same or a substantially identical security within 30 days before or after the sale — a 61-day window centered on the loss. The disallowed loss isn't gone; it's deferred into the replacement shares' basis. But the rule has teeth: it spans all your accounts, including your IRA (where the loss dies permanently rather than deferring) and your spouse's accounts. The standard workaround is buying a similar-but-not-identical fund — swapping one S&P 500 fund for another tracking a different index survives scrutiny in common practice, while swapping share classes of the same fund does not. And harvesting is mostly tax deferral wearing a tax-savings costume: selling at a loss and reinvesting lowers your cost basis, so you owe more when you eventually sell. The genuine profit hides in three places — rate arbitrage when the $3,000 income deduction offsets ordinary income at 32% while future gains pay 15%; the time value of deferred tax compounding; and the endgame, where basis step-up at death or a charitable donation makes the deferred tax vanish entirely.

When harvesting is actually a mistake

Three situations flip the usual math. In the 0% capital-gains bracket — taxable income under roughly $48,000 single or $96,700 married in 2025 — harvesting gains tax-free beats harvesting losses, because you can reset your cost basis higher without paying anything, saving future tax that losses would only defer. Near-term planned sales make deferral pointless, since you'll realize the gain soon anyway. And being out of a position during a rally can cost more than the tax saved: the classic trap is selling for a loss in a downturn, buying a replacement to avoid the wash-sale rule, and watching the original security you'd have preferred rebound faster. Automated daily-harvesting services solve the timing problem but layer 0.25–0.40% fees on the entire portfolio to capture a benefit that's concentrated in volatile years — do the arithmetic on whether the net value clears the fee. Harvesting is a genuinely useful tool, but it's not free money and it's not always the right move; knowing when to skip it is as valuable as knowing how to do it.

Frequently asked questions

Does tax-loss harvesting work in retirement accounts?

No — IRAs and 401(k)s have no capital gains taxation, so losses inside them are invisible to the IRS. Worse, buying a substantially identical security in your IRA within the wash-sale window kills a taxable-account loss permanently.

How long do carryforward losses last?

For individuals, indefinitely — they roll forward year after year, offsetting future gains plus $3,000 of income annually, until used or until death (unused losses die with you; they don't transfer to heirs, another argument against hoarding them).

Is December the right time to harvest?

December is when everyone remembers, not when it's optimal. Losses are harvestable all year, and volatility spikes (which create them) rarely schedule themselves for Q4. Opportunistic harvesting after drawdowns beats calendar-driven harvesting in most backtests.

Does tax-loss harvesting work in my retirement account?

No — IRAs and 401(k)s have no capital gains taxation, so losses inside them are invisible to the IRS. Worse, buying a substantially identical security in your IRA within the wash-sale window can permanently kill a loss you harvested in a taxable account. Keep harvesting to taxable accounts only.

How long can I carry forward unused losses?

Indefinitely for individuals — they roll forward year after year, offsetting future gains plus $3,000 of ordinary income annually, until used up. One caveat: unused losses die with you and don't transfer to heirs, which is an argument against hoarding a huge carryforward you may never fully use.