Investment & Retirement Calculators

Tax-Loss Harvesting Calculator

Calculate how much federal tax you could save by realizing capital losses this year -- the $3,000/$1,500 ordinary-income offset limit, loss carryforward, and net short/long-term capital gain treatment, sourced directly from IRS Topic 409.

Updated Checked · 1 source

Enter Your Details

Adjust values to see instant results

$0$20,000,000
$0$10,000,000
$0$10,000,000

Additional Details

$0$10,000,000
$0$10,000,000
$0$10,000,000
015%

Net Capital Gain / (Loss) After Harvesting

$2,000.00

Estimated • Based on your inputs

Total Estimated Tax Savings From Harvesting

$3,600.00

Federal Tax Savings

$2,700.00

Detailed Breakdown

Ordinary Income Offset This Year (Up to $3,000)$0.00
Capital Loss Carried Over to Next Year$0.00
Estimated State Tax Savings$900.00
6%
Net Short-Term Gain / (Loss)-$3,000.00
20%
Net Long-Term Gain / (Loss)$5,000.00
33%
Federal Tax on Capital Gains Without Harvesting$3,000.00
20%
Federal Tax on Capital Gains After Harvesting$300.00
2%
Your Annual Ordinary-Income Offset Limit$3,000.00
20%

Disclaimer: This calculator provides estimates for informational purposes only. Results should not be considered financial, tax, or legal advice. Consult a qualified professional for your specific situation.

How This Calculator Works

Calculation methodology and assumptions

This calculator nets your short-term gains/losses against each other and your long-term gains/losses against each other, then combines the two -- the same order used on the IRS's own Schedule D. If the combined result is still a gain, whichever bucket started as a loss offsets the other bucket's gain first, so the surviving taxable gain keeps the character (and tax rate) of the larger net bucket. If the combined result is a loss, only $3,000 of it ($1,500 if married filing separately) can offset your other ordinary income this year, per IRC §1211(b) -- any excess isn't lost, it carries forward to next year's return with no expiration. The calculator then compares your federal tax on capital gains with vs. without the harvested losses to isolate the dollar savings the harvesting decision itself produces, using the same marginal-stacking method as this site's other capital-gains calculators. State tax savings apply your state's flat rate to the same net taxable amount, since most states start from federal AGI (which already reflects the $3,000/$1,500 cap).

Key State Information

This calculator applies a flat state tax rate you provide to the same net capital gain/loss amount recognized federally (capped at the $3,000/$1,500 offset in a loss year), because most states compute their own taxable income starting from federal AGI. A handful of states -- for example, Washington's separate standalone capital gains excise tax -- have their own structure not modeled here, and nine states have no income tax at all (enter 0%). Check your specific state's conformity if you're near a large loss.

Standard financial formulas Pre-filled with documented data Estimates only — not financial advice
Data Source
IRS Topic 409 "Capital Gains and Losses"; IRS Instructions for Schedule D (Form 1040) and Form 8949; Rev. Proc. 2025-32 (2026 capital gains brackets)
View Original Source | Source record reviewed | Review target: annually

How to Use This Investment & Retirement Calculator

  1. 1

    Fill in Filing Status, Other Taxable Income (Before Capital Gains/Losses) and Short-Term Capital Gains Already Realized This Year

    Filing Status opens on Single; Other Taxable Income (Before Capital Gains/Losses) starts at $120,000; Short-Term Capital Gains Already Realized This Year starts at $0. Replace each one with your own figure.

  2. 2

    Fill in Long-Term Capital Gains Already Realized This Year, Short-Term Losses You Plan to Harvest and Long-Term Losses You Plan to Harvest

    Long-Term Capital Gains Already Realized This Year starts at $20,000; Short-Term Losses You Plan to Harvest starts at $3,000; Long-Term Losses You Plan to Harvest starts at $15,000. Replace each one with your own figure.

  3. 3

    Fill in Capital Loss Carryover From Prior Years and Your State Income Tax Rate (%)

    Capital Loss Carryover From Prior Years starts at $0; Your State Income Tax Rate (%) starts at 5%. Replace each one with your own figure.

  4. 4

    Read the results

    The calculator leads with Net Capital Gain / (Loss) After Harvesting, Total Estimated Tax Savings From Harvesting and Federal Tax Savings, followed by 8 supporting figures.

Example Calculation

What the calculator above returns before you change anything: a single filer with $120,000 of other taxable income and $20,000 of long-term gains already taken, who sells positions to realize $15,000 of long-term and $3,000 of short-term losses, with a 5% state rate.

Without the sales, the $20,000 gain costs $3,000 of federal tax. With them, long-term nets to $5,000 and short-term to −$3,000, so the year's net result is $2,000, taxed $300.

Result: Federal tax saved: $2,700; at the 5% state rate another $900, $3,600 in all. Buying the same or a substantially identical security from 30 days before to 30 days after a loss sale disallows that loss (26 U.S.C. 1091).

What Affects Your Results

Rate of Return

Even small differences compound massively over time. 7% vs. 8% over 30 years on $100K means a difference of $200K+. Asset allocation drives your expected return.

Time Horizon

Compounding accelerates exponentially. Most of your wealth is generated in the final years — a 30-year investment earns more in its last 5 years than its first 15.

Contribution Consistency

Regular monthly investments (dollar-cost averaging) smooth out market volatility and ensure you're always buying — including during dips when prices are low.

Fees & Expenses

A 1% annual fee vs. 0.1% fee on a $500K portfolio costs you $4,500/year extra. Over 30 years, high fees can consume 25–30% of potential returns. Use low-cost index funds.

Tips & Best Practices

  • Start early. Thanks to compounding, $200/month invested from age 25 to 65 at 8% returns grows to ~$700K. Waiting until 35 cuts that to ~$300K — a $400K penalty for the 10-year delay.
  • Don't try to time the market. Research consistently shows that time in the market beats timing the market. Missing the 10 best trading days over 20 years can halve your returns.
  • Consider tax-advantaged accounts first: 401(k) (especially with employer match), IRA, HSA. These reduce your tax drag — a 25% tax bracket investor keeps more in a tax-deferred account.
  • Rebalance annually. If stocks outperform and grow from 80% to 90% of your portfolio, rebalancing back to 80% locks in gains and manages risk.
  • Factor in your state's tax treatment of investment income. Some states exempt certain investment income or have lower rates on capital gains.
SC

StateCalc Team

Editorial Team

The StateCalc team builds financial calculators using data from official government sources including the IRS, U.S. Census Bureau, BLS, and state revenue departments. All formulas are validated by an automated test suite and cross-referenced against published data.

Our editorial standards

Frequently Asked Questions

How much can tax-loss harvesting save me?

Realized capital losses first offset capital gains dollar-for-dollar (at whatever rate those gains would have been taxed -- ordinary rates for short-term gains, the preferential 0%/15%/20% rates for long-term gains), and then up to $3,000 per year ($1,500 if married filing separately) of any remaining net loss can offset your ordinary income, per IRS Topic 409. Any loss beyond that limit is not lost -- it carries forward to future tax years indefinitely.

What is the wash-sale rule, and does it block my deduction?

The wash-sale rule (IRC §1091) disallows your loss deduction if you buy the same security -- or one the IRS considers "substantially identical" -- within 30 days before or after the sale that generated the loss (a 61-day window total), per the IRS Instructions for Form 8949 (code "W") and Pub. 550. If you want to stay invested in the same asset class, buying a similar-but-not-identical fund (a different index or fund family) instead of an identical replacement is a common way advisors avoid triggering the rule, though this calculator does not verify any specific replacement security for you.

Does the wash-sale rule apply to cryptocurrency the same way?

No -- under current law, the wash-sale rule applies only to "stock or securities." Because the IRS classifies virtual currency as property rather than a security (Notice 2014-21), it currently falls outside IRC §1091, meaning crypto investors can sell at a loss and immediately repurchase the same coin without the loss being disallowed. See this site's Crypto Tax Calculator for that vertical -- Congress has repeatedly proposed closing this distinction, so it could change.

Do short-term and long-term losses offset gains differently?

Short-term losses are netted against short-term gains first, and long-term losses against long-term gains first. Only if one bucket nets to a loss and the other to a gain does the loss then cross over to reduce the other bucket's gain. A short-term loss offsetting a long-term gain is especially valuable per dollar, since it effectively converts what would have been ordinary-rate short-term gain exposure into using up a loss against gain that would otherwise be taxed at the lower preferential rate -- while a long-term loss offsetting a short-term gain (taxed at your higher ordinary rate) produces the biggest dollar-for-dollar tax benefit of any pairing.

What happens to a capital loss carryover in future years?

It keeps its original short-term or long-term character and is entered on next year's Schedule D, where it's netted against that year's gains exactly like a current-year loss, plus is still eligible for that year's own $3,000/$1,500 ordinary-income offset if it exceeds all your gains. There is no expiration on how many years you can carry a capital loss forward.

People Also Calculate

Frequently used together with this calculator

Related Calculators

📈

More Investment & Retirement Calculators

View all Investment & Retirement Calculators

State Comparison Guides