Skip to main content

Tax Loss Harvesting Calculator

Calculate potential tax savings from harvesting investment losses against capital gains. Enter values for instant results with step-by-step formulas.

Skip to calculator
Finance & Investing

Tax-Loss Harvesting Calculator

Calculate potential tax savings from harvesting investment losses against capital gains. Estimate loss carryforward and ordinary income offset benefits.

Last updated: January 2026Reviewed by NovaCalculator Finance Editorial Team

Calculator

Adjust values & calculate
$20,000
$8,000
$0
24%
5%
$100,000
Total Tax Savings
$1,600
from harvesting $8,000 in losses
Tax Without Harvesting
$4,000
Tax After Harvesting
$2,400
Harvesting Breakdown
Capital Gains$20,000
Total Losses (harvest + carryforward)-$8,000
Net Taxable Gains$12,000
Gains Tax Rate
15%
Long-term
Combined Rate
20.0%
Federal + State
Capital Gains Saved
$1,600
Comparison Summary
Before: $4,000
After: $2,400
Saved: $1,600
Disclaimer: This calculator provides estimates for educational purposes. Tax-loss harvesting involves complex rules including wash sale provisions and cost basis tracking. Consult a tax professional or financial advisor before implementing a harvesting strategy.
Your Result
Tax Savings: $1,600 | Net Gains: $12,000 | Carryforward: $0
Share Your Result
Understand the Math

Formula

Tax Savings = (Gains Offset x Gains Rate) + (Ordinary Income Offset x Income Rate)

Harvested losses first offset capital gains dollar-for-dollar, eliminating tax at the capital gains rate. Excess losses offset up to $3,000 of ordinary income at your marginal rate. Remaining losses carry forward to future years indefinitely.

Last reviewed: January 2026

Worked Examples

Example 1: Offsetting Capital Gains

You have $20,000 in realized capital gains (long-term) and $8,000 in unrealized losses available to harvest. Federal bracket 24%, state 5%, income $100,000.
Solution:
Without harvesting: Tax = $20,000 x (15% + 5%) = $4,000 After harvesting $8,000 loss: Net gains = $20,000 - $8,000 = $12,000 Tax = $12,000 x (15% + 5%) = $2,400 Tax savings = $4,000 - $2,400 = $1,600 No excess losses (gains > losses)
Result: Tax Savings: $1,600 | Tax reduced from $4,000 to $2,400 | No carryforward losses

Example 2: Losses Exceeding Gains with Carryforward

You have $5,000 in short-term gains and $15,000 in unrealized losses plus $3,000 in loss carryforward. Federal bracket 32%, state 6%.
Solution:
Total losses: $15,000 + $3,000 = $18,000 Offset gains: $18,000 - $5,000 = $13,000 excess Ordinary income offset: $3,000 (max) New carryforward: $13,000 - $3,000 = $10,000 Gains tax saved: $5,000 x (32% + 6%) = $1,900 Ordinary income saved: $3,000 x (32% + 6%) = $1,140 Total savings: $1,900 + $1,140 = $3,040
Result: Tax Savings: $3,040 | $10,000 carried forward | Gains fully offset | $3,000 ordinary income deduction
Expert Insights

Background & Theory

The Tax-Loss Harvesting Calculator applies the following established principles and formulas. Finance and investing rest on the foundational concept of the time value of money: a dollar received today is worth more than a dollar received in the future, because present funds can be deployed to earn a return. This principle underlies virtually every valuation technique in modern finance. The future value of a present sum P growing at rate r over n periods is expressed as FV = P(1 + r)^n, while the present value of a future cash flow FV is PV = FV / (1 + r)^n. Compound growth amplifies returns significantly over long horizons, a dynamic often described as the eighth wonder of the world. Net Present Value (NPV) extends these mechanics to evaluate investment projects by summing the present values of all expected cash flows minus the initial outlay: NPV = sum[CF_t / (1 + r)^t] - C_0. A positive NPV indicates the project creates value above the required return. The Internal Rate of Return (IRR) is the discount rate that sets NPV to zero, providing a single percentage benchmark for project comparison. The risk-return tradeoff is the central tension of investment theory. Higher expected returns generally require accepting greater uncertainty. Harry Markowitz formalized this in Modern Portfolio Theory by demonstrating that portfolio variance can be reduced through diversification when assets are imperfectly correlated. The efficient frontier represents the set of portfolios offering the maximum return for a given level of risk. The Capital Asset Pricing Model (CAPM) extends this by introducing the market portfolio as a reference, defining expected return as E(r) = r_f + beta * (E(r_m) - r_f), where beta measures an asset's sensitivity to systematic market risk. Asset classes โ€” equities, fixed income, real assets, and alternatives โ€” differ in their return profiles, liquidity, and correlations. Strategic asset allocation determines long-run target weights based on investor objectives and risk tolerance, while tactical allocation permits short-run deviations to exploit perceived mispricings. Discount rates used in valuation models must reflect the cost of capital appropriate to the risk of the cash flows being discounted, a point stressed in corporate finance texts from Brealey, Myers, and Allen through to Damodaran.

History

The history behind the Tax-Loss Harvesting Calculator traces back through the following developments. The formal practice of lending at interest dates to ancient Mesopotamia, where the Code of Hammurabi around 1750 BCE regulated interest rates on grain and silver loans. Banking as an institutional activity took root in medieval Italy, with merchant bankers in Florence and Venice financing trade across Europe through instruments such as bills of exchange. The Medici family operated one of the most sophisticated banking networks of the fifteenth century, pioneering double-entry bookkeeping and correspondent banking relationships. Organized equity markets emerged in the early seventeenth century. The Dutch East India Company (VOC), chartered in 1602, issued shares to the public and created the Amsterdam Stock Exchange โ€” widely regarded as the world's first formal stock exchange. The VOC allowed investors to buy and sell shares freely, establishing the template for the joint-stock company. The period also produced the Dutch tulip mania of 1636 to 1637, one of history's first recorded speculative bubbles, in which tulip bulb futures contracts reached extraordinary prices before collapsing. England's financial revolution followed in the late seventeenth century with the founding of the Bank of England in 1694 and the development of government bond markets. The South Sea Bubble of 1720 illustrated the dangers of speculative excess and contributed to early securities regulation. Throughout the eighteenth and nineteenth centuries, industrialization created enormous demand for capital, fueling the expansion of stock exchanges in London, Paris, New York, and beyond. The New York Stock Exchange, formalized in 1817, became the world's dominant equities market by the twentieth century. The Great Crash of 1929 and subsequent Great Depression prompted the US Securities Act of 1933 and Securities Exchange Act of 1934, establishing the SEC and mandatory disclosure requirements. Harry Markowitz published his landmark portfolio selection paper in 1952, launching quantitative finance. The CAPM emerged in the 1960s through work by Sharpe, Lintner, and Mossin. John Bogle launched the first retail index fund in 1976, democratizing diversified investing and challenging active management orthodoxy.

Share this calculator

Explore More

Frequently Asked Questions

Tax-loss harvesting is an investment strategy where you sell securities that have declined in value to realize capital losses, then use those losses to offset capital gains and reduce your tax liability. The IRS allows you to first offset capital gains dollar-for-dollar with capital losses, and if losses exceed gains, you can deduct up to $3,000 of excess losses against ordinary income per year. Any remaining losses carry forward to future tax years indefinitely. For example, if you have $20,000 in capital gains and harvest $8,000 in losses, your taxable gains drop to $12,000, saving approximately $2,320 at a combined 29% tax rate. After selling the losing position, you typically reinvest in a similar but not substantially identical security to maintain your market exposure. This strategy is essentially a timing optimization that defers taxes rather than eliminating them permanently, but the time value of money makes this deferral genuinely valuable.
There is no limit on the amount of capital losses you can use to offset capital gains in any given year. If you have $50,000 in gains and $50,000 in harvested losses, your taxable gains are reduced to zero. Beyond offsetting gains, excess capital losses can offset up to $3,000 per year of ordinary income, which at a 24% federal bracket saves approximately $720 in federal tax alone. Any losses beyond the capital gains offset plus $3,000 ordinary income deduction carry forward to future years indefinitely. This carryforward is one of the most valuable aspects of tax-loss harvesting because large losses harvested in a down year like 2008 or 2022 can offset gains for many years to come. Short-term losses first offset short-term gains which are taxed at higher ordinary rates, then offset long-term gains. This ordering maximizes the tax benefit since short-term capital gains rates can be nearly double long-term rates.
While tax-loss harvesting is commonly associated with year-end planning, the optimal approach is to monitor your portfolio throughout the year and harvest losses whenever they become available. Market volatility creates harvesting opportunities at unpredictable times, and waiting until December means you may miss opportunities from earlier in the year. After a significant market decline of 10% or more is an excellent time to review your portfolio for harvesting opportunities. Some automated platforms like Betterment and Wealthfront perform daily tax-loss harvesting, identifying opportunities as they arise. However, be strategic about timing within the year: losses harvested in January have a longer time value than those harvested in December of the same tax year. Also consider your overall tax situation: if you anticipate unusually high income this year from a bonus or asset sale, harvesting losses becomes more valuable because they offset income taxed at your highest marginal rate. Avoid harvesting losses on positions you expect to rebound quickly if you cannot find an acceptable substitute investment.
Tax-loss harvesting primarily defers taxes rather than eliminating them, because when you repurchase a similar investment at the lower cost basis, your future gains will be larger. However, this deferral creates genuine economic value through the time value of money: a dollar saved today is worth more than a dollar paid in the future. If you harvest a $10,000 loss saving $2,900 in taxes today and invest that savings, it compounds over time. At 7% annual return over 20 years, that $2,900 grows to approximately $11,221, while the deferred tax of $2,900 remains constant in nominal terms. Additionally, tax-loss harvesting can permanently save money if you donate the appreciated replacement shares to charity, die holding the shares which receive a stepped-up basis, or use the losses to offset higher-taxed short-term gains while eventually paying long-term rates on the replacement. Research from Vanguard estimates that systematic tax-loss harvesting adds approximately 0.50% to 1.50% in after-tax return annually for taxable portfolios.
The best candidates for tax-loss harvesting are positions with significant unrealized losses that have readily available substitute investments to maintain your desired asset allocation. Broad market index funds and ETFs are ideal because there are many similar but not substantially identical alternatives. For example, you can swap between the Vanguard Total Stock Market ETF and the iShares Core S&P Total US Stock Market ETF, or between S&P 500 funds from different providers. International funds, bond funds, and sector-specific ETFs also have numerous alternatives available. Individual stocks are trickier because there may not be a substantially similar substitute, and staying out of the position for 31 days creates concentration risk. Avoid harvesting losses on positions where you have very strong conviction about near-term recovery, as the wash sale rule prevents immediate repurchase. Tax-managed mutual funds automatically perform internal harvesting, which can reduce but not eliminate the benefit of additional portfolio-level harvesting.
When your capital losses exceed your capital gains, the IRS allows you to deduct up to $3,000 of the excess against ordinary income each year, with unused losses carrying forward indefinitely. This $3,000 deduction is particularly valuable because it offsets ordinary income taxed at your marginal rate, which is typically higher than capital gains rates. At a 32% federal bracket plus 5% state tax, the $3,000 deduction saves $1,110 annually. If you accumulate $30,000 in excess losses, you can deduct $3,000 per year for 10 years, generating $11,100 in cumulative tax savings. This ongoing deduction provides steady value even in years when you have no capital gains to offset. For married couples filing separately, the limit is $1,500 per spouse. Strategic planning around this threshold is important: if you already have $3,000 in excess losses for the year, additional harvesting provides value only if you expect future capital gains to offset. Some advisors recommend maintaining a reserve of carryforward losses to offset unexpected gains from mutual fund distributions or forced realizations.
Educational Note: This calculator is provided for educational and informational purposes. Results are based on the formulas and inputs provided. Always verify important calculations independently. NovaCalculator processes calculator inputs client-side; optional analytics follow visitor consent settings.Reviewed by: NovaCalculator Finance Editorial Team โ€” Reviewed against CFPB, IRS, and Federal Reserve guidance. Last reviewed: January 2026. ยฉ 2024โ€“2026 NovaCalculator.

Share this calculator

Formula

Tax Savings = (Gains Offset x Gains Rate) + (Ordinary Income Offset x Income Rate)

Harvested losses first offset capital gains dollar-for-dollar, eliminating tax at the capital gains rate. Excess losses offset up to $3,000 of ordinary income at your marginal rate. Remaining losses carry forward to future years indefinitely.

Worked Examples

Example 1: Offsetting Capital Gains

Problem: You have $20,000 in realized capital gains (long-term) and $8,000 in unrealized losses available to harvest. Federal bracket 24%, state 5%, income $100,000.

Solution: Without harvesting: Tax = $20,000 x (15% + 5%) = $4,000\nAfter harvesting $8,000 loss:\nNet gains = $20,000 - $8,000 = $12,000\nTax = $12,000 x (15% + 5%) = $2,400\nTax savings = $4,000 - $2,400 = $1,600\nNo excess losses (gains > losses)

Result: Tax Savings: $1,600 | Tax reduced from $4,000 to $2,400 | No carryforward losses

Example 2: Losses Exceeding Gains with Carryforward

Problem: You have $5,000 in short-term gains and $15,000 in unrealized losses plus $3,000 in loss carryforward. Federal bracket 32%, state 6%.

Solution: Total losses: $15,000 + $3,000 = $18,000\nOffset gains: $18,000 - $5,000 = $13,000 excess\nOrdinary income offset: $3,000 (max)\nNew carryforward: $13,000 - $3,000 = $10,000\nGains tax saved: $5,000 x (32% + 6%) = $1,900\nOrdinary income saved: $3,000 x (32% + 6%) = $1,140\nTotal savings: $1,900 + $1,140 = $3,040

Result: Tax Savings: $3,040 | $10,000 carried forward | Gains fully offset | $3,000 ordinary income deduction

Frequently Asked Questions

What is tax-loss harvesting and how does it reduce my taxes?

Tax-loss harvesting is an investment strategy where you sell securities that have declined in value to realize capital losses, then use those losses to offset capital gains and reduce your tax liability. The IRS allows you to first offset capital gains dollar-for-dollar with capital losses, and if losses exceed gains, you can deduct up to $3,000 of excess losses against ordinary income per year. Any remaining losses carry forward to future tax years indefinitely. For example, if you have $20,000 in capital gains and harvest $8,000 in losses, your taxable gains drop to $12,000, saving approximately $2,320 at a combined 29% tax rate. After selling the losing position, you typically reinvest in a similar but not substantially identical security to maintain your market exposure. This strategy is essentially a timing optimization that defers taxes rather than eliminating them permanently, but the time value of money makes this deferral genuinely valuable.

How much can I deduct from tax-loss harvesting?

There is no limit on the amount of capital losses you can use to offset capital gains in any given year. If you have $50,000 in gains and $50,000 in harvested losses, your taxable gains are reduced to zero. Beyond offsetting gains, excess capital losses can offset up to $3,000 per year of ordinary income, which at a 24% federal bracket saves approximately $720 in federal tax alone. Any losses beyond the capital gains offset plus $3,000 ordinary income deduction carry forward to future years indefinitely. This carryforward is one of the most valuable aspects of tax-loss harvesting because large losses harvested in a down year like 2008 or 2022 can offset gains for many years to come. Short-term losses first offset short-term gains which are taxed at higher ordinary rates, then offset long-term gains. This ordering maximizes the tax benefit since short-term capital gains rates can be nearly double long-term rates.

When is the best time to harvest tax losses?

While tax-loss harvesting is commonly associated with year-end planning, the optimal approach is to monitor your portfolio throughout the year and harvest losses whenever they become available. Market volatility creates harvesting opportunities at unpredictable times, and waiting until December means you may miss opportunities from earlier in the year. After a significant market decline of 10% or more is an excellent time to review your portfolio for harvesting opportunities. Some automated platforms like Betterment and Wealthfront perform daily tax-loss harvesting, identifying opportunities as they arise. However, be strategic about timing within the year: losses harvested in January have a longer time value than those harvested in December of the same tax year. Also consider your overall tax situation: if you anticipate unusually high income this year from a bonus or asset sale, harvesting losses becomes more valuable because they offset income taxed at your highest marginal rate. Avoid harvesting losses on positions you expect to rebound quickly if you cannot find an acceptable substitute investment.

Does tax-loss harvesting actually save money or just defer taxes?

Tax-loss harvesting primarily defers taxes rather than eliminating them, because when you repurchase a similar investment at the lower cost basis, your future gains will be larger. However, this deferral creates genuine economic value through the time value of money: a dollar saved today is worth more than a dollar paid in the future. If you harvest a $10,000 loss saving $2,900 in taxes today and invest that savings, it compounds over time. At 7% annual return over 20 years, that $2,900 grows to approximately $11,221, while the deferred tax of $2,900 remains constant in nominal terms. Additionally, tax-loss harvesting can permanently save money if you donate the appreciated replacement shares to charity, die holding the shares which receive a stepped-up basis, or use the losses to offset higher-taxed short-term gains while eventually paying long-term rates on the replacement. Research from Vanguard estimates that systematic tax-loss harvesting adds approximately 0.50% to 1.50% in after-tax return annually for taxable portfolios.

What securities are best for tax-loss harvesting?

The best candidates for tax-loss harvesting are positions with significant unrealized losses that have readily available substitute investments to maintain your desired asset allocation. Broad market index funds and ETFs are ideal because there are many similar but not substantially identical alternatives. For example, you can swap between the Vanguard Total Stock Market ETF and the iShares Core S&P Total US Stock Market ETF, or between S&P 500 funds from different providers. International funds, bond funds, and sector-specific ETFs also have numerous alternatives available. Individual stocks are trickier because there may not be a substantially similar substitute, and staying out of the position for 31 days creates concentration risk. Avoid harvesting losses on positions where you have very strong conviction about near-term recovery, as the wash sale rule prevents immediate repurchase. Tax-managed mutual funds automatically perform internal harvesting, which can reduce but not eliminate the benefit of additional portfolio-level harvesting.

How does tax-loss harvesting interact with the $3,000 ordinary income deduction?

When your capital losses exceed your capital gains, the IRS allows you to deduct up to $3,000 of the excess against ordinary income each year, with unused losses carrying forward indefinitely. This $3,000 deduction is particularly valuable because it offsets ordinary income taxed at your marginal rate, which is typically higher than capital gains rates. At a 32% federal bracket plus 5% state tax, the $3,000 deduction saves $1,110 annually. If you accumulate $30,000 in excess losses, you can deduct $3,000 per year for 10 years, generating $11,100 in cumulative tax savings. This ongoing deduction provides steady value even in years when you have no capital gains to offset. For married couples filing separately, the limit is $1,500 per spouse. Strategic planning around this threshold is important: if you already have $3,000 in excess losses for the year, additional harvesting provides value only if you expect future capital gains to offset. Some advisors recommend maintaining a reserve of carryforward losses to offset unexpected gains from mutual fund distributions or forced realizations.

References

Reviewed by Sahil, Senior Finance & Tax Editor ยท Editorial policy