Capital Loss Carryforward & Tax-Loss Harvesting Calculator
Introduction: 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.
If this result is positive (losses exceed gains):
And the remainder carries forward:
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:
- Buy a Similar But Not Identical Asset: If you own Apple, purchase a different tech stock (Microsoft, Nvidia) for 30+ days, then return to Apple. The new holding provides similar market exposure without triggering wash sale rules.
- Wait 31 Days: Sell the loss position and wait a full month before repurchasing it.
- Harvest Losses in Different Accounts: Wash sale rules apply within accounts, but some argue (debatably) that purchasing the same security in a different account (spouse's account, child's account, trust) avoids wash sale. However, the IRS is increasingly scrutinizing this approach; consult a tax advisor before assuming it works.
- Use Related Positions: If you own a diversified fund that holds tech stocks, harvesting losses in individual tech stocks and maintaining the fund position may not trigger wash sales, as the positions are not identical.
Worked Example: Multi-Year Harvesting Strategy
Consider Jordan, an investor with the following situation:
Current Year (2024):
- Realized capital gains: $50,000
- Realized capital losses: $15,000
- Unrealized losses (positions down but not sold): $25,000
- Ordinary income: $120,000 (single filer, 24% marginal rate)
Step 1: Calculate 2024 Tax Impact (without harvesting)
- Net capital gain: $50,000 - $15,000 = $35,000
- Long-term capital gains tax (assuming all long-term): 15% × $35,000 = $5,250
- No ordinary income offset (gains exceed losses)
Step 2: Tax-Loss Harvesting Strategy Jordan realizes the additional $25,000 in losses, bringing total losses to $40,000.
- Net capital loss: $40,000 - $50,000 gains = -$10,000 (losses exceed gains)
- Deductible against ordinary income: $3,000
- Loss carryforward to 2025: $7,000
- Tax savings from $3,000 deduction: $3,000 × 24% (marginal rate) = $720
- Capital gains tax: $0 (all gains offset by losses)
- Total 2024 tax savings from harvesting: $5,250 (gains tax eliminated) + $720 (ordinary income deduction) = $5,970
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:
- Capital loss available: $7,000 (carryforward) + $2,000 (current) = $9,000
- Net capital gain: $30,000 - $9,000 = $21,000
- Capital gains tax: 15% × $21,000 = $3,150
- Benefit of carryforward: $7,000 × 15% = $1,050 in taxes saved
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:
- No State Income Tax (TX, FL, WA, NV, AK, SD, WY, TN): No state-level benefit from capital loss deductions.
- State Capital Gains Tax (CA, WA, IL): Some states have separate capital gains taxes (e.g., California taxes long-term gains at ordinary income rates; Washington taxes gains over $250,000 at 7%). Capital loss deductions may or may not apply to state capital gains taxes depending on state rules.
- Surtaxes (NY, NJ): High-income earners in some states pay additional surtaxes, which may or may not be affected by capital loss deductions.
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
- No State Tax Consideration: This calculator models federal taxes only.
- Wash Sale Assumption: The calculator does not track wash sale violations; you must ensure that harvested securities are not repurchased within the 30-day window.
- Net Investment Income Tax (NIIT): High-income taxpayers (>$200,000 single) face an additional 3.8% NIIT on investment income; not modeled here.
- Alternative Minimum Tax (AMT): High net worth individuals may be subject to AMT, which has different loss limitation rules; not considered in this calculator.
- Charitable Deductions and Limitations: The calculator assumes no charitable deductions that might affect the benefit of capital loss deductions.
- Realized vs. Unrealized Gains/Losses: Only realized (sold) gains and losses affect taxes; unrealized positions do not.
- Holding Period Assumption: This calculator assumes all gains and losses are long-term unless specified. Verify holding periods for accuracy.
- Tax Rate Stability: Assumes marginal tax rate remains constant across projection years. Tax rate changes would affect actual benefits.
- Professional Consultation Recommended: Tax planning is complex. Consult a CPA or tax attorney for strategies specific to your situation.
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.
How to use this calculator
- Enter Realized capital gains this year (USD) using the unit or time period shown by the field.
- Enter Capital losses realized this year (USD) using the unit or time period shown by the field.
- Enter Ordinary income (wages, salary, etc.) using the unit or time period shown by the field.
- Run the calculation and compare the output with a second scenario before acting on it.
Formula: how the estimate is built
The result can be read as result = f(a, b, c), where those inputs represent Realized capital gains this year (USD), Capital losses realized this year (USD), Ordinary income (wages, salary, etc.). Keep money, time, distance, percentage, and count fields in the units requested by the form.
Arcade Mini-Game: Capital Loss Carryforward & Tax-Loss Harvesting Calculator Calibration Run
Use this quick arcade run to practice separating useful scenario inputs from common planning mistakes before you rely on the calculator output.
Start the game, then use your pointer or arrow keys to catch useful inputs and avoid bad assumptions.
