Tax Loss Harvesting Calculator

Author avatar

Created by: Natalie Reed

Last updated:

Calculate tax savings from harvesting capital losses to offset realized gains. See net capital gains after loss netting, estimated tax savings, unused loss carryforward, and the $3,000 ordinary income deduction — with a wash-sale rule reminder.

Tax Loss Harvesting Calculator

Finance

Calculate the tax savings from harvesting unrealized capital losses to offset realized gains, with netting rules and carryforward.

Realized Capital Gains

$

Assets held ≤ 1 year — taxed as ordinary income

$

Assets held > 1 year — taxed at preferential LTCG rates

Losses to Harvest

$

Unrealized losses from assets held ≤ 1 year

$

Unrealized losses from assets held > 1 year

Tax Rates

%

Your marginal ordinary income tax rate

%

Your applicable LTCG rate (0%, 15%, or 20%)

What Is a Tax Loss Harvesting Calculator?

A Tax Loss Harvesting Calculator quantifies the tax savings from selling investments with unrealized losses to offset realized capital gains.

By recognizing a loss for tax purposes, an investor reduces their net capital gains for the year — cutting or eliminating the capital gains tax owed — while maintaining portfolio exposure by purchasing a similar (but not substantially identical) replacement investment.

This calculator applies the IRS netting rules: short-term losses first offset short-term gains, long-term losses first offset long-term gains, and excess losses of one type can cross-offset gains of the other type.

If total losses exceed total gains, up to $3,000 of net losses can offset ordinary income annually, with the remainder carrying forward to future years — making harvested losses a multi-year tax asset, not just a one-year benefit.

The wash-sale rule is the key compliance constraint: if you buy a substantially identical security within 30 days before or after the sale, the loss is disallowed and added to the replacement's cost basis.

This calculator includes a prominent wash-sale reminder and models the opportunity cost of temporarily exiting a position, helping you make an informed decision about whether harvesting a specific holding is worthwhile beyond the headline tax savings.

How Tax Savings from Loss Harvesting Are Calculated

Net capital gains are calculated after applying IRS netting rules: short-term losses offset short-term gains first, then can cross-offset long-term gains if excess remains; long-term losses offset long-term gains first, then cross-offset short-term gains.

Tax before harvesting equals short-term gains × short-term rate + long-term gains × long-term rate.

Tax after harvesting applies the same formula to the net positions.

Tax savings is the difference.

Unused losses (those that exceed all current-year gains) generate up to $3,000 in ordinary income deduction; the remainder carries forward.

Tax Loss Harvesting Formulas

Tax before harvesting = (ST gains × ST rate) + (LT gains × LT rate)

Net ST position = ST gains − ST losses (excess ST losses offset LT gains)

Net LT position = LT gains − LT losses (excess LT losses offset ST gains)

Tax after harvesting = max(net ST, 0) × ST rate + max(net LT, 0) × LT rate

Tax savings = tax before − tax after

Carryforward = max(unused losses − $3,000 ordinary income deduction, 0)

Example Scenarios

Offsetting a Large Equity Gain

Realized LT gains: $25,000 (stock sale). LT rate: 15%. Tax without harvesting: $3,750. Unrealized LT losses available: $18,000 (in two underperforming positions). After harvesting: net LT gain = $25,000 − $18,000 = $7,000. Tax after harvesting: $7,000 × 15% = $1,050. Tax savings: $2,700. The investor replaces the sold positions with similar (non-identical) funds to maintain market exposure while saving $2,700 in federal taxes — subject to the 31-day wash-sale waiting period or immediate purchase of a different fund.

Losses Exceed Gains — Generating a Carryforward

Realized ST gains: $5,000. ST rate: 24%. LT gains: $0. ST losses to harvest: $12,000. After netting: net ST position = $5,000 − $12,000 = −$7,000. Tax on $5,000 ST gains before: $1,200. After harvesting: no tax on ST gains. Additionally, $3,000 of the remaining $7,000 net losses offsets ordinary income (saving $3,000 × 24% = $720 more). Total tax savings in Year 1: $1,920. Remaining $4,000 loss ($7,000 − $3,000) carries forward to Year 2.

How People Use This Calculator

  • Investors reviewing taxable portfolio positions in Q4 to identify harvesting opportunities before year-end.
  • Financial advisors systematically reviewing client accounts for loss harvesting candidates after market downturns.
  • High-income investors with significant capital gains evaluating the NIIT reduction benefit of loss harvesting.
  • Tax planners calculating the multi-year carryforward value of losses in a down year against a backdrop of planned future gains.
  • DIY investors confirming their loss harvesting plan complies with wash-sale rules before executing the trades.
  • Portfolio managers evaluating the tax alpha of active loss harvesting strategies versus a passive buy-and-hold approach.

Tips for Effective Tax Loss Harvesting

Monitor your portfolio systematically for harvesting opportunities throughout the year — not just in December.

Market volatility in any month can create meaningful unrealized losses, and waiting until year-end may mean some positions recover before you act.

Setting price alerts for individual positions or reviewing statements quarterly keeps harvesting opportunities on your radar.

Always confirm that your replacement investment is not substantially identical to the sold position before executing the trade to avoid inadvertently triggering a wash sale.

Selling one S&P 500 ETF and immediately buying a different S&P 500 ETF from a different provider is generally considered acceptable, but selling a fund and buying the exact same fund within 30 days (even in a different account) triggers the wash-sale rule across all your accounts.

Frequently Asked Questions

What is tax loss harvesting?

Tax loss harvesting is the practice of selling investments with unrealized (paper) losses to realize those losses for tax purposes, then using the recognized losses to offset realized capital gains — reducing or eliminating the capital gains tax owed in that tax year. After selling, the investor typically buys a similar (but not substantially identical) replacement investment to maintain their desired portfolio exposure. Done strategically throughout the year, tax loss harvesting can permanently reduce a portfolio's tax burden by deferring or eliminating capital gains taxes.

How do capital losses offset capital gains?

The IRS requires that capital losses first offset capital gains of the same type: short-term losses offset short-term gains (taxed as ordinary income), and long-term losses offset long-term gains (taxed at preferential rates). If you have excess losses of one type, they can then offset gains of the other type. If total losses exceed total gains, up to $3,000 of net losses can offset ordinary income (wages, salaries) per year, and any remaining net losses carry forward indefinitely to future tax years.

What is the wash-sale rule and how does it affect tax loss harvesting?

The wash-sale rule (IRS Section 1091) disallows a realized loss if, within 30 days before or after the sale, you buy a "substantially identical" security — stocks of the same company, the same fund, or options on the same stock. If you trigger a wash sale, the disallowed loss is added to your cost basis in the replacement security rather than being deductible in the current year. To harvest a loss validly, you must either wait 31 days before rebuying, or immediately buy a similar-but-not-identical replacement (for example, selling one S&P 500 index fund and buying a different S&P 500 fund from a different provider).

What is the "opportunity cost" of tax loss harvesting shown in this calculator?

Opportunity cost in tax loss harvesting refers to the potential gain you forfeit during the 30-day period you cannot hold the original position (to avoid the wash-sale rule). If the sold position rises significantly during that window, you re-enter at a higher price, permanently forgoing those gains. This calculator shows the net benefit of harvesting as tax savings minus an estimated opportunity cost, helping you weigh whether harvesting a specific position makes financial sense beyond the tax savings alone.

How much of unused capital losses can I deduct against ordinary income?

If your total capital losses exceed your total capital gains, you can deduct up to $3,000 of net capital losses ($1,500 if married filing separately) against ordinary income (wages, interest, etc.) in a given tax year. This is the IRS's annual loss deduction limit. Any losses above that $3,000 carry forward to future tax years indefinitely, where they can offset future capital gains or ordinary income at the same $3,000 per year rate. This carryforward feature means that large losses harvested in a bad market year continue to provide tax benefits for years afterward.

Does it matter whether I harvest short-term or long-term losses?

Yes — short-term losses and long-term losses have different tax values. A short-term loss directly offsets short-term gains, which are taxed as ordinary income at your highest marginal rate. A long-term loss directly offsets long-term gains, taxed at the lower capital gains rate. Because short-term losses offset income taxed at higher rates, they are generally more valuable per dollar than long-term losses. However, loss netting rules allow cross-offsetting, so long-term losses will eventually offset short-term gains if you have excess long-term losses after netting against long-term gains.

Is tax loss harvesting worth doing if my capital gains tax rate is 0%?

Generally no — if your current-year long-term capital gains tax rate is 0% (which applies to single filers with taxable income up to roughly $48,350 and married filers up to $96,700 in 2025), harvesting long-term losses provides no immediate benefit. However, harvesting short-term losses could still be valuable if you have short-term gains taxed at ordinary income rates. It may also be worth harvesting losses to generate a $3,000 deduction against ordinary income even without current-year gains.

Sources and References

  1. Internal Revenue Service. "Publication 550: Investment Income and Expenses" — capital loss deduction and carryover rules.
  2. Internal Revenue Service. "Publication 550: Wash Sales" (Section 1091).
  3. Vanguard Research. "Tax-loss harvesting: A strategy to help trim your tax bill."
Tax Loss Harvesting Calculator - Capital Loss Tax Savings | Complete Calculators | Complete Calculators