Tax Loss Harvesting Calculator
Calculate tax savings from harvesting investment losses to offset capital gains and ordinary income.
Important Financial Disclaimer
This calculator provides estimates based on standard financial formulas from verified references. Results are for informational and educational purposes only and should not be considered as professional financial, investment, or tax advice.
For important financial decisions such as loans, investments, mortgages, retirement planning, or tax matters, please consult with qualified financial advisors, certified financial planners, or licensed tax professionals who can review your specific situation.
Calculations may not account for all variables specific to your circumstances, local regulations, or current market conditions. Always verify results and consult professionals before making financial commitments.
Not a substitute for professional financial advice
Investment Details
Tax Situation
Total Tax Savings
$400
Small loss - Consider transaction costs
Loss Utilization
Tax Savings Breakdown
at 20.0% rate
at 29.0% rate (max $3K)
Wash Sale Rule: Wait 30 days before repurchasing the same or substantially identical security to avoid disallowing the loss.
What Is Tax Loss Harvesting?
Tax loss harvesting is an investment strategy that involves selling a security that has declined in value below its purchase price (cost basis) to realize a capital loss. That realized loss can then be used to offset capital gains you have already recognized elsewhere in your portfolio — reducing the taxable gain dollar for dollar. Any loss that exceeds your capital gains can further reduce ordinary income by up to $3,000 per year, and leftover losses carry forward indefinitely into future tax years.
The strategy does not eliminate taxes permanently; it defers them. When you sell at a loss and later repurchase a similar (but not identical) security, your new cost basis is lower than your original one. A future gain on that new position will eventually be taxed — but you have enjoyed the time-value benefit of keeping those dollars invested in the interim. In a long portfolio lifetime, systematic harvesting can meaningfully improve after-tax compound returns.
Tax loss harvesting applies to unrealized losses — positions currently worth less than what you paid for them. The loss only becomes "harvestable" when you sell. The IRS requires that you actually complete the sale before December 31 of the tax year in which you want to claim the deduction.
The wash sale rule is the key constraint: if you sell a security at a loss and buy the same or a "substantially identical" security within 30 days before or after the sale, the IRS disallows the loss. The 61-day window (30 days before + sale day + 30 days after) prevents investors from maintaining continuous market exposure while claiming the tax benefit on paper. To harvest a loss validly, either wait 31 days to repurchase, or immediately buy a similar-but-not-identical replacement (e.g., switch from one S&P 500 ETF to a different one tracking the same index).
This tax loss harvesting calculator models the exact IRS mechanics: offsetting capital gains first, then offsetting up to $3,000 of ordinary income, and calculating any carryforward — giving you a clear dollar figure for your potential tax savings this year.
How the Tax Loss Harvesting Calculator Works
This calculator uses the same step-by-step logic the IRS prescribes for applying capital losses on Schedule D. Enter your investment's current market value and original cost basis to determine the harvestable loss. Then provide your tax situation — other capital gains, federal tax bracket, state rate, and holding period — and the calculator applies the loss in the correct order.
Step 1 — Compute the loss: The harvestable loss equals cost basis minus current market value. If the result is zero or negative, your position has a gain, and there is nothing to harvest.
Step 2 — Offset capital gains: The loss first cancels out any existing capital gains (up to the full loss amount). The tax saved equals the offset amount multiplied by the combined capital gains rate (federal + state). For long-term positions held more than one year, the calculator uses the most common 15% federal long-term rate. For short-term positions held one year or less, it applies your federal ordinary income bracket.
Step 3 — Offset ordinary income: If any loss remains after the capital gains offset, up to $3,000 can reduce ordinary income. Tax saved here equals that offset multiplied by the combined ordinary income rate (federal bracket + state rate).
Step 4 — Carryforward: Any remaining loss beyond the $3,000 ordinary income cap carries forward to future tax years with no expiration. The calculator estimates future value by applying your current combined capital gains rate to the carryforward amount.
Effective loss reduction expresses total immediate tax savings as a percentage of the original unrealized loss, showing how much of your paper loss is "recovered" through the tax system this year.
Tax Loss Harvesting Formulas
Where:
- Loss= Harvestable unrealized loss (cost basis minus current value)
- CostBasis= Original purchase price of the investment
- CurrentValue= Current market value of the investment
- GainsOffset= Portion of loss applied against capital gains
- CapitalGains= Other realized capital gains in the same tax year
- CGRate= Federal capital gains rate (15% long-term; federal bracket short-term)
- StateRate= State income tax rate (applied to both capital gains and ordinary income)
- FederalRate= Federal ordinary income tax bracket rate
- OrdinaryOffset= Portion of remaining loss applied to ordinary income (max $3,000)
- Carryforward= Unused loss carried into future tax years
- TotalTaxSavings= Combined tax saved from gains offset plus ordinary income offset
- EffectiveLossReduction= Percentage of the unrealized loss recovered through tax savings
Short-Term vs Long-Term: Why Holding Period Matters
The federal tax rate on a capital loss offset depends heavily on whether the position was held for more than one year (long-term) or one year or less (short-term). This distinction changes the dollar value of the same loss by a wide margin.
Long-term capital losses first offset long-term capital gains, which are taxed at preferential rates of 0%, 15%, or 20% depending on your income. This calculator uses 15% as the most common long-term rate. If you have no long-term gains, long-term losses can then offset short-term gains (taxed at ordinary rates), but the calculator simplifies to the single combined capital gains rate you specify.
Short-term capital losses offset short-term capital gains first, and those gains are taxed at ordinary income rates — identical to your wage and salary bracket. For a taxpayer in the 32% federal bracket with 8% state tax, a short-term loss is worth 40 cents per dollar of offset versus 23 cents for the same loss on a long-term position. This means harvesting a short-term loss is generally more valuable per dollar of loss.
From a strategy perspective, it is often wise to let winners run long-term while harvesting short-term losers early. The combination maximizes after-tax return: losses are eliminated at high ordinary rates, gains are eventually realized at low long-term rates.
The IRS netting rules on Schedule D require you to net all short-term gains and losses together, and all long-term gains and losses together, before any cross-netting. This calculator provides a simplified model that applies a single capital gains rate to the gains offset, which is accurate for the most common scenario where the loss and gains are the same holding period class.
Loss Carryforward: Multi-Year Tax Value
When your harvested loss exceeds both your capital gains and the $3,000 ordinary income cap in a single year, the unused portion does not disappear — it carries forward indefinitely under IRC Section 1212. There is no time limit, no expiration, and the carryforward retains its original character (long-term or short-term).
In practice, a large unrealized loss — say $20,000 on a concentrated stock position — could generate meaningful tax savings across several future years. The year of harvest, you might save $1,800 from a $5,000 gains offset (at 36% combined rate) plus $1,080 from the $3,000 ordinary income deduction. The remaining $12,000 carryforward is available in Year 2 and beyond, where it will offset future gains or income using that year's tax rates.
This calculator estimates the potential future tax savings from the carryforward by multiplying the carried amount by your current combined capital gains rate. This is an approximation — your actual rate in future years may differ — but it gives you a reasonable lower-bound sense of the long-term value sitting in unused losses.
For investors who realize gains regularly (e.g., rebalancing, selling appreciated real estate, exercising stock options), a large carryforward is extremely valuable. It can shield substantial future income from tax at zero cost, since the loss was already "paid for" by the investment decline. Tracking your carryforward on Form 8949 and Schedule D each year ensures you never leave this deduction unused.
Estate planning note: capital loss carryforwards do NOT transfer to heirs. If you hold a carryforward at death, it dies with you (or stays with a surviving spouse in a joint return scenario). This adds urgency to using carryforwards while alive and in a high tax bracket.
The Wash Sale Rule and Practical Harvesting Strategies
The wash sale rule (IRC Section 1091) is the single most important compliance requirement in tax loss harvesting. If you sell a security at a loss and acquire the same or a "substantially identical" security within 30 days before or after the sale, the IRS disallows the loss. The disallowed loss is not permanently lost — it is added to the cost basis of the replacement security — but you forfeit the current-year timing benefit.
"Substantially identical" is broadly interpreted but not infinitely broad. Individual stocks in the same industry are generally not substantially identical. However, two ETFs tracking the exact same index (e.g., two different S&P 500 index funds from different issuers) may be considered substantially identical by the IRS, though there is no definitive ruling on ETF pairs. The safest approach is to replace with a fund tracking a different but correlated index — for example, swapping a Russell 1000 ETF for an S&P 500 ETF or a total market ETF.
Common tax loss harvesting strategies:
- Fund-pair harvesting: Maintain two lists of similar ETFs. When one falls, sell it and buy the counterpart. After 31 days, optionally swap back.
- Year-end harvesting sweep: Review the portfolio in November/December for any positions with unrealized losses exceeding transaction costs. This aligns with the December 31 deadline for current-year deductions.
- Continuous (automated) harvesting: Robo-advisors monitor portfolios daily and harvest whenever a position falls a threshold amount (e.g., 2%). This captures volatility-driven losses that might reverse before year-end.
- Specific lot identification: When you own multiple lots of the same security at different prices, you can choose to sell the highest-cost lots first (highest-cost, first-out / HIFO) to maximize the loss or minimize the gain on any given sale.
Transaction costs matter. For small losses (under $500), brokerage commissions, bid-ask spreads, and the inconvenience of tracking wash-sale windows may exceed the tax benefit. This calculator's "Small loss — Consider transaction costs" assessment flags positions where the math may not justify the effort.
Limitations, Common Mistakes, and When Not to Harvest
Tax loss harvesting is not universally beneficial. Several situations argue against harvesting even when an unrealized loss exists:
Low tax bracket now, high bracket later: If you expect to be in a higher tax bracket in retirement or in coming years, deferring the loss (letting the position recover) means a future gain is taxed at a lower rate. Harvesting now at a 12% bracket to save $240 on a $2,000 loss, only to face a future gain taxed at 24%, may net negative after the embedded gain in the replacement position is realized.
Transaction costs and complexity: In taxable accounts with small balances, the administrative burden of tracking wash-sale windows, adjusted cost bases, and carryforward schedules may not be worth the tax savings. Automated platforms handle this seamlessly; manual investors should weigh the time cost.
State tax differences: Some states (e.g., California) do not conform to the federal $3,000 ordinary income deduction cap, or have different carryforward rules. Always verify your state's treatment separately.
AMT (Alternative Minimum Tax): Under the AMT, capital losses may be treated differently. Investors subject to AMT should consult a tax advisor before aggressive harvesting.
Retirement accounts: Tax loss harvesting only applies to taxable brokerage accounts. Losses inside an IRA, 401(k), or other tax-advantaged account have no tax impact and cannot be harvested.
This calculator is for educational estimation only. The actual tax impact depends on your full tax picture, lot-level holding periods, state-specific rules, AMT exposure, and other factors. Consult a qualified tax professional before executing a harvesting strategy.
Worked Examples
Basic Long-Term Loss Offsetting Capital Gains
Problem:
You bought a stock for $10,000 (cost basis). It is now worth $8,000. You have $5,000 in other capital gains this year, a 24% federal bracket, 5% state rate, and the position is long-term (held over 1 year).
Solution Steps:
- 1Compute the harvestable loss: $10,000 − $8,000 = $2,000
- 2Long-term combined capital gains rate: 15% federal + 5% state = 20%
- 3Gains offset: min($2,000, $5,000) = $2,000 — the full loss cancels $2,000 of capital gains
- 4Tax saved from gains offset: $2,000 × 20% = $400
- 5Remaining loss after gains offset: $2,000 − $2,000 = $0 — no ordinary income offset and no carryforward
- 6Total tax savings this year: $400
Result:
Total tax savings: $400. Effective loss reduction: ($400 / $2,000) × 100 = 20%. This is the default scenario shown by the calculator on load.
Short-Term Loss Fully Offsetting Short-Term Gains
Problem:
You purchased shares for $12,000 and they are now worth $6,000 — a $6,000 unrealized loss held less than one year (short-term). You have $8,000 in other capital gains this year. Federal bracket is 32%, state rate is 8%.
Solution Steps:
- 1Harvestable loss: $12,000 − $6,000 = $6,000
- 2Short-term: capital gains rate equals the federal bracket — 32%. Combined rate: 32% + 8% = 40%
- 3Gains offset: min($6,000, $8,000) = $6,000 — the entire loss offsets $6,000 of capital gains
- 4Tax saved from gains offset: $6,000 × 40% = $2,400
- 5Remaining loss: $6,000 − $6,000 = $0 — no further offset needed
- 6Total tax savings: $2,400
Result:
Total tax savings: $2,400. Effective loss reduction: ($2,400 / $6,000) × 100 = 40%. Short-term harvesting is much more valuable per dollar of loss because the offset rate equals your ordinary income bracket.
Large Loss with Ordinary Income Offset and Carryforward
Problem:
You hold a long-term position with cost basis $25,000, now worth $15,000 — a $10,000 loss. You have $3,000 in other capital gains, a 22% federal bracket, and a 6% state rate.
Solution Steps:
- 1Harvestable loss: $25,000 − $15,000 = $10,000
- 2Long-term combined capital gains rate: 15% + 6% = 21%
- 3Combined ordinary income rate: 22% + 6% = 28%
- 4Gains offset: min($10,000, $3,000) = $3,000
- 5Tax saved from gains offset: $3,000 × 21% = $630
- 6Remaining loss after gains offset: $10,000 − $3,000 = $7,000
- 7Ordinary income offset: min($7,000, $3,000) = $3,000 (IRS cap)
- 8Tax saved from ordinary income offset: $3,000 × 28% = $840
- 9Carryforward to future years: max(0, $7,000 − $3,000) = $4,000
- 10Total tax savings this year: $630 + $840 = $1,470
- 11Potential future savings from carryforward: $4,000 × 21% = $840
Result:
Total tax savings this year: $1,470. Effective loss reduction: ($1,470 / $10,000) × 100 = 14.7%. An additional $840 in future savings is available from the $4,000 carryforward — bringing the total potential recovery to $2,310.
No Gains to Offset — Maximum Ordinary Income Benefit
Problem:
You have a $5,000 short-term loss, zero capital gains this year, a 24% federal bracket, and a 5% state rate.
Solution Steps:
- 1Harvestable loss: $5,000
- 2Gains offset: min($5,000, $0) = $0 — no capital gains to offset
- 3Remaining loss: $5,000
- 4Ordinary income offset: min($5,000, $3,000) = $3,000
- 5Combined ordinary income rate: 24% + 5% = 29%
- 6Tax saved from ordinary income offset: $3,000 × 29% = $870
- 7Carryforward: max(0, $5,000 − $3,000) = $2,000
- 8Total tax savings this year: $870
Result:
Total tax savings: $870 this year, plus a $2,000 carryforward available in future years. Even without capital gains to offset, harvesting provides immediate tax relief on ordinary income.
Tips & Best Practices
- ✓Harvest losses before December 31 — the sale must settle in the same calendar year for the loss to count on that year's return.
- ✓Replace a sold position immediately with a similar but non-identical security to stay invested and avoid missing a market rebound during the 31-day wash sale window.
- ✓Use specific lot identification (HIFO — highest cost, first out) when selling partial positions to maximize the loss harvested from a single ticker.
- ✓Short-term losses are worth more per dollar than long-term losses when your ordinary income bracket exceeds the long-term capital gains rate — prioritize harvesting short-term losers.
- ✓Track your loss carryforward on Schedule D each year; unused carryforwards from prior years offset future gains at zero additional effort or cost.
- ✓Avoid harvesting in a year when you expect to be in the 0% long-term capital gains bracket — the tax savings may be minimal and not worth the transaction costs.
- ✓Do not harvest a loss inside an IRA, 401(k), or other tax-advantaged account — losses in those accounts provide no deductible tax benefit.
- ✓Review your portfolio for harvesting opportunities after major market drawdowns, sector rotations, or individual stock earnings misses — volatility creates the largest harvesting windows.
- ✓Consult a CPA or tax advisor for positions subject to AMT, state-specific carryforward rules, or complex lot structures before executing a harvest.
Frequently Asked Questions
Sources & References
Last updated: 2026-06-05
Help us improve!
How would you rate the Tax Loss Harvesting Calculator?
Related Calculators
Sources
- •Reserve Bank of India (RBI) — Financial regulations, lending rates, and monetary policy guidelines. rbi.org.in
- •Consumer Financial Protection Bureau (CFPB) — Consumer finance guidelines, mortgage and loan disclosure standards. consumerfinance.gov
- •Securities and Exchange Board of India (SEBI) — Investment and securities market regulations. sebi.gov.in
- •Investopedia — Financial formulas, definitions, and educational content. investopedia.com
For a complete list of all references used across the site, visit our full sources page.
Editorial Note
MyCalcBuddy Editorial Team
This page is maintained as an educational calculator reference.
Formula Source: Fundamentals of Financial Management
by Brigham & Houston