Calculateus

Tax-Loss Harvesting Calculator

Calculate the tax savings from harvesting investment losses to offset capital gains and ordinary income.

Result

Total Estimated Tax Savings
$1,920.00
Offsets Capital Gains
$8,000.00
Offsets Ordinary Income (max $3,000/yr)
$3,000.00
Loss Carried Forward to Future Years
$1,000.00

Assumes a 15% long-term capital gains rate for the gains-offset portion. Losses first offset capital gains dollar-for-dollar, then up to $3,000 of any remaining loss can offset ordinary income each year, with any excess loss carried forward indefinitely to future tax years.

About the Tax-Loss Harvesting Calculator

The Tax-Loss Harvesting Calculator estimates the tax savings from selling investments at a loss to offset realized capital gains and, within limits, ordinary income. It splits a pool of harvested losses across gains first, then the annual ordinary-income offset, then whatever is left to carry forward. Investors weighing whether harvesting a specific loss is worth the transaction can use it to see the dollar impact rather than just the raw loss amount.

How It Works

Enter realized capital gains for the year, the total losses available to harvest, and a marginal ordinary tax rate. The calculator first applies losses against gains dollar for dollar, then routes up to 3,000 dollars of any leftover loss against ordinary income for the year, and carries any remainder beyond that forward to future years. Tax saved on the gains-offset portion assumes a flat 15% long-term capital gains rate, while tax saved on the ordinary-income portion uses the marginal rate entered.

gainsOffset = min(gains, losses). remainingLoss = losses - gainsOffset. ordinaryIncomeOffset = min(remainingLoss, 3000). carryforward = max(remainingLoss - 3000, 0). capGainsTaxSaved = gainsOffset x 0.15. ordinaryTaxSaved = ordinaryIncomeOffset x marginalRate. totalSaved = capGainsTaxSaved + ordinaryTaxSaved.

Formula & Methodology

Work through the loss pool in order of priority. First subtract whichever is smaller, gains or losses, from the loss pool to zero out capital gains. If losses remain, up to 3,000 dollars of that remainder reduces ordinary income for the year, valued at the marginal rate rather than the 15% capital gains rate since it is offsetting wage or other ordinary income. Any loss beyond the 3,000 dollar annual cap does not disappear; it carries forward and can be applied against gains or, again up to 3,000 dollars a year, ordinary income in future tax years until it is used up.

Examples

Losses exceed gains

With 8,000 dollars of realized gains and 12,000 dollars of harvested losses at a 24% marginal rate, 8,000 dollars of loss offsets the gains, 3,000 dollars of the remaining 4,000 dollars offsets ordinary income, and 1,000 dollars carries forward, for an estimated 1,920 dollars in combined tax savings.

Gains exceed losses

With 15,000 dollars of realized gains and only 5,000 dollars of harvested losses at a 22% marginal rate, all 5,000 dollars of losses absorb into the gains, leaving no ordinary-income offset or carryforward and an estimated 750 dollars in tax savings from the gains-offset portion alone.

Advantages

  • Shows how a loss pool splits automatically across the gains offset, the 3,000 dollar ordinary-income cap, and any carryforward, instead of requiring that sequence to be tracked by hand.
  • Separates the two different tax rates involved, the flat capital gains assumption on the gains-offset portion and the entered marginal rate on the ordinary-income portion, so the total savings figure reflects both correctly.
  • Surfaces the carryforward amount explicitly, which is easy to lose track of across tax years without a running total.

Common Mistakes

  • Assuming every dollar of harvested loss saves tax at the marginal ordinary rate, when only the amount up to the 3,000 dollar annual cap gets that treatment and the rest offsets gains at the capital gains rate instead.
  • Triggering a wash sale by repurchasing the same or a substantially identical security within 30 days, which disallows the loss the calculator assumed was usable.
  • Overlooking losses carried forward from a prior year that should be added to the current year's pool before running the calculation.

Edge Cases to Watch For

  • The 15% rate applied to the gains-offset portion is a flat assumption; actual long-term capital gains rates run 0%, 15%, or 20% depending on total taxable income, and short-term gains are taxed at ordinary rates instead.
  • The 3,000 dollar annual cap on offsetting ordinary income is fixed in the calculation and does not adjust for married filing separately, where the actual IRS limit is 1,500 dollars.
  • The calculator does not check for wash sales, the rule that disallows a loss if a substantially identical security is repurchased within 30 days before or after the sale.

Common Use Cases

  • Investors deciding near year-end whether selling a losing position is worth it purely for the tax benefit.
  • Anyone with a mix of gains and losses across a portfolio who wants to see the net effect of harvesting before placing trades.
  • Tax planners estimating how much of a client's loss carryforward will get used this year versus rolled to the next.
Written & fact-checked by the Calculateus TeamLast updated August 5, 2026How we verify our formulas

Frequently asked questions

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

The wash sale rule disallows claiming a loss if you buy the same or a "substantially identical" security within 30 days before or after the sale that generated the loss - this prevents simply selling a losing position to claim the tax loss and immediately buying it back, so investors typically wait out the 30-day window or purchase a similar (but not identical) replacement investment to stay invested in the same market segment.

Conclusion

Because losses are applied in a fixed order, gains first, then a capped amount of ordinary income, then carryforward, the tax benefit of harvesting a given loss depends heavily on how much of each category is already available. This calculator applies that order directly to the numbers entered so the estimated savings and carryforward are both visible at once.