Capital Loss Carryforward & Tax-Loss Harvesting Calculator

JJ Ben-Joseph headshot JJ Ben-Joseph

Current Year Information Total long-term + short-term gains realized year-to-date. Federal rate based on income bracket: 10%, 12%, 22%, 24%, 32%, 35%, 37%.
Capital Loss Carryforward History Unused losses from previous years available to carry forward. Unrealized losses you're considering realizing (tax-loss harvesting strategy). If yes, loss may be disallowed under wash sale rules.
Multi-Year Projection Average annual gains to forecast carryforward utilization.

Capital Losses and Tax-Efficient Investing

Investment losses, while emotionally painful, offer a silver lining in the U.S. tax code: capital losses can offset capital gains and, when losses exceed gains, can reduce ordinary income by up to $3,000 per year. This creates an opportunity for sophisticated investors to strategically realize losses—a practice called tax-loss harvesting—to reduce overall tax liability. The concept is deceptively simple: if an investment has declined in value, selling it at the loss allows you to claim a deduction, while immediately repurchasing a similar (but not "substantially identical") security maintains your desired portfolio exposure. Over time, these harvested losses can accumulate and offset substantial future gains, deferring or eliminating taxes on investment appreciation.

Yet the mechanics are more complex than they initially appear. Capital losses that exceed gains in a given year can only be deducted against up to $3,000 of ordinary income annually; excess losses carry forward indefinitely to future years. Wash sale rules prohibit deducting a loss if you buy substantially identical securities within 30 days before or after the sale. The interaction between long-term and short-term losses, the timing of gains realization, and state tax considerations all affect the actual benefit of tax-loss harvesting. Mistakes—like unwittingly triggering a wash sale or miscalculating carryforward amounts—can eliminate the tax benefit entirely.

This calculator helps investors understand capital loss mechanics, project the tax value of harvested losses, and plan multi-year loss utilization strategies. By modeling different harvesting scenarios, you can optimize tax outcomes while maintaining your desired asset allocation.

Capital Loss Deduction Rules

The IRS permits capital losses to offset capital gains dollar-for-dollar. Once losses exceed gains, the excess can offset up to $3,000 of ordinary income (wages, salary, interest, dividends, etc.) per year. Any loss beyond this $3,000 annual limit carries forward indefinitely to future years, available for offset against future gains or future ordinary income up to $3,000 annually.

Tax-Year Net Loss = Capital Losses Capital Gains

If this result is positive (losses exceed gains):

Deductible Against Ordinary Income = min ( Net Loss , $3,000 )

And the remainder carries forward:

Loss Carryforward = Net Loss Deductible Amount

Example: An investor realizes $50,000 in capital gains and $70,000 in capital losses in 2024. The net loss is $20,000. Of this, $3,000 can be deducted against ordinary income. The remaining $17,000 carries forward to 2025 and beyond.

Tax-Loss Harvesting Strategy

Tax-loss harvesting is the practice of strategically selling securities at a loss to generate deductions, while maintaining investment exposure by purchasing similar (but not substantially identical) securities. The timing and selection of which losses to realize significantly impact overall after-tax returns.

The Wash Sale Rule: The IRS disallows a loss deduction if you purchase substantially identical securities within 30 days before or after the sale. The disallowed loss is added to the cost basis of the new security, deferring the tax benefit rather than eliminating it. This rule prevents investors from claiming losses while maintaining identical economic exposure.

Example: You sell Apple shares at a $5,000 loss on December 15. You immediately repurchase identical Apple shares on December 20. The $5,000 loss is disallowed (wash sale), and the new shares have a $5,000 higher cost basis. If you later sell these repurchased shares at a $5,000 gain, the wash sale adjustment offsets it, resulting in no net gain or loss—the benefit is deferred, not lost.

Strategies to Avoid Wash Sales While Harvesting:

Worked Example: Multi-Year Harvesting Strategy

Consider Jordan, an investor with the following situation:

Current Year (2024):

Step 1: Calculate 2024 Tax Impact (without harvesting)

Step 2: Tax-Loss Harvesting Strategy Jordan realizes the additional $25,000 in losses, bringing total losses to $40,000.

Step 3: Carryforward to 2025 Jordan enters 2025 with a $7,000 loss carryforward. If she realizes $30,000 in gains and $2,000 in losses:

Result: By harvesting losses in 2024, Jordan avoided $5,970 in federal taxes that year and accelerated benefits into 2025. Over multiple years, tax-loss harvesting can significantly reduce her cumulative tax liability on investment returns.

Long-Term vs. Short-Term Capital Losses

Capital losses are differentiated by holding period, matching the distinction for gains:

Loss Type Holding Period Tax Impact Offset Priority
Short-Term Loss ≤ 1 year Offsets short-term gains first (at ordinary income rates) First (against STCG)
Long-Term Loss > 1 year Offsets long-term gains (at preferential rates) Second (against LTCG, then against STCG)
Net Capital Loss Excess of total losses Up to $3,000/year deductible against ordinary income Can be long-term or short-term carryforward

The IRS applies losses to gains in a specific order: short-term losses offset short-term gains; long-term losses offset long-term gains; any remaining losses offset the other type. If both losses and gains exist in both categories, the matching order can affect the final tax outcome, particularly if your marginal tax rate differs from your capital gains rate (which it usually does).

State Tax Implications

Capital loss deductions vary by state. Most states follow federal rules, permitting capital loss offsets against gains and up to $3,000 of ordinary income annually. However, some states treat capital losses differently:

For this calculator, the state impact is not modeled; consult state tax authorities or a tax professional for your specific situation.

Limitations and Important Assumptions

Conclusion

Capital losses, properly managed through tax-loss harvesting, can significantly reduce lifetime investment taxes. By understanding loss carryforward mechanics, avoiding wash sale pitfalls, and strategically timing loss realization, investors can enhance after-tax returns. This calculator provides a framework for modeling different scenarios and understanding the multi-year tax impact of loss harvesting strategies. Use it to inform discussions with your tax advisor and optimize your overall investment tax plan.

Embed this calculator

Copy and paste the HTML below to add the Capital Loss Carryforward and Tax-Loss Harvesting Calculator to your website.