Tax Calculator

Capital Gain & Loss Harvesting Calculator: What It Calculates and How to Read the Result

Reviewed by Raman Singh, CFP® · IRS Enrolled AgentUpdated

Quick answer

Capital gain and loss harvesting deliberately realizes gains in the 0% long-term capital gains bracket (when income is low enough) and realizes losses to offset future gains or up to $3,000 of ordinary income per year. Done annually, this can reset cost basis and reduce lifetime tax, but the wash-sale rule limits how you replace sold positions.

Capital Gain / Loss Harvesting Calculator
Tax-intelligent harvesting suggestions with scenario analysis and step-up awareness.
Taxable value
$3.0M
$3,007,695.00
Unrealized gains
$599.5K
$599,480.24
Unrealized losses
$110.7K
$110,723.04
Holding period mix
81% LT / 19% ST
By current market value
Scenario controls
Quick presets + save custom scenarios
0% LTCG room (est.)$0

Simplified: ignores deductions and special income types.

Inputs
Portfolio, tax settings, and strategy settings

Columns: Account, Ticker, Description, Quantity, PurchaseDate, CostBasisTotal, CurrentPrice, isLegacyAsset (optional: assetClass).

Tax lots
Harvest?AccountTickerDescriptionQtyPurchase dateCost basisCurrent priceCurrent valueUnrealized G/LST/LTLegacyDecision reason
🔒
$468,000.00$228,000
LT
Legacy
Excluded: legacy flag (step-up preference enabled).
$406,000.00$146,000
LT
Legacy
Not selected.
🔒
$216,000.00$131,000
LT
Legacy
Excluded: legacy flag (step-up preference enabled).
🔒
$147,000.00$52,000
LT
Legacy
Excluded: legacy flag (step-up preference enabled).
$26,320.00$4,738
LT
Legacy
Not selected.
$26,030.00$4,685
LT
Legacy
Not selected.
$25,728.00$4,631
LT
Legacy
Not selected.
$25,414.00$4,575
LT
Legacy
Not selected.
$25,088.00$4,516
ST
Legacy
Not selected.
🔒
$23,000.00$4,140
ST
Legacy
Excluded: legacy flag (step-up preference enabled).
$16,500.00$1,980
LT
Legacy
Not selected.
$14,893.00$1,787
LT
Legacy
Not selected.
$14,526.00$1,743
LT
Legacy
Not selected.
$14,135.00$1,696
ST
Legacy
Not selected.
$12,624.00$1,515
LT
Legacy
Not selected.
$12,299.00$1,476
ST
Legacy
Not selected.
$15,228.00$914
LT
Legacy
Not selected.
$14,850.00$891
LT
Legacy
Not selected.
$14,448.00$867
ST
Legacy
Not selected.
$13,248.00$795
LT
Legacy
Not selected.
$12,936.00$776
LT
Legacy
Not selected.
$12,600.00$756
ST
Legacy
Not selected.
$24,035.00$0
ST
Legacy
Not selected.
$24,346.00$0
ST
Legacy
Not selected.
$24,645.00$0
LT
Legacy
Not selected.
$24,932.00$0
LT
Legacy
Not selected.
$27,146.00$0
LT
Legacy
Not selected.
🔒
$27,451.00$0
LT
Legacy
Excluded: legacy flag (step-up preference enabled).
$13,208.00-$792
ST
Legacy
Not selected.
$13,566.00-$814
LT
Legacy
Not selected.
$13,900.00-$834
LT
Legacy
Not selected.
$15,080.00-$905
LT
Legacy
Not selected.
🔒
$15,504.00-$930
LT
Legacy
Excluded: legacy flag (step-up preference enabled).
$15,904.00-$954
LT
Legacy
Not selected.
$13,515.00-$1,622
ST
Legacy
Not selected.
$13,884.00-$1,666
LT
Legacy
Not selected.
$14,229.00-$1,707
LT
Legacy
Not selected.
🔒
$15,399.00-$1,848
LT
Legacy
Excluded: legacy flag (step-up preference enabled).
$15,834.00-$1,900
LT
Legacy
Not selected.
$137,600.00-$2,400
ST
Legacy
Not selected.
$184,300.00-$5,700
ST
Legacy
Not selected.
$198,400.00-$6,600
LT
Legacy
Not selected.
$112,750.00-$12,250
LT
Legacy
Not selected.
$79,200.00-$15,800
ST
Legacy
Not selected.
$426,000.00-$54,000
LT
Legacy
Not selected.
Edits auto-recalculate derived fields (current value, unrealized gain/loss, holding period).
Key results
Current-year tax impact + long-term comparison
Incremental tax (this year)
$0
Tax savings
NPV of tax savings
$0
Over time horizon (NPV)
Realized STCG
$0.0
$0.00
Realized LTCG
$0.0
$0.00
Realized losses
$0.0
$0.00
Step-up benefit lost (NPV)
$0
If step-up assumed for legacy assets
You’re in a solid range, and we can make it resilient.
Even good projections benefit from a tax-aware, sequence-aware plan and a clear withdrawal or conversion strategy.
  • Your inputs suggest meaningful planning tradeoffs.
  • Small assumption changes can materially change outcomes.
  • A coordinated plan can reduce risk and improve efficiency.

Schedule a Strategic Fit Interview to confirm you’re optimized and protected against downside scenarios.

Schedule a Strategic Fit Interview

No commitment. No sales agenda. 30 minutes with a flat-fee CFP & Enrolled Agent.

Key results
Current-year tax impact + long-term comparison
Scenario comparison (baseline vs selection)
ScenarioRealized gainsRealized lossesTax impact (yr)NPV tax savingsAfter-tax @ horizon
Baseline – No Harvest$0$0$0$0$10,213,907
Preset – Max Loss Harvesting$0$54,000-$660-$4,669$10,201,715
Preset – Harvest up to 0% LTCG$0$54,000-$660-$4,669$10,201,715
Preset – Tax-Cost Budget$29,029$54,000-$660-$1,804$10,208,624
Current Selection$0$0$0$0$10,213,907
Taxes now vs later
Nominal totals (simplified)

“Taxes later” includes turnover + liquidation at horizon. Future-year tax rates are held constant for illustration.

After-tax portfolio value over time
Directional comparison (simplified)

Display uses a straight-line proxy for tax timing; the totals/NPV cards are the primary outputs.

Waterfall: where savings come from
NPV components (simplified)

Step-up is shown separately to highlight the trade-off for legacy-flagged positions.

Model notes (important)
Plain-English explainers and disclaimers

Progressive tax treatment: LTCG brackets are stacked on top of projected ordinary income and “other capital gains.” This is a simplified planning model and ignores deductions, AMT, phase-outs, and special income types.

Netting & $3k rule: Losses offset gains first; any leftover loss may reduce ordinary income up to $3,000 if enabled. Carryforwards are not modeled.

Long-term projections: Returns compound at your expected return; future tax rates are held constant; turnover is an optional simplified proxy. This is directional guidance, not precise tax advice.

Wash sales: Not modeled. Always review replacement trades with wash-sale rules separately.

Full results locked
Preview the KPIs above. Enter your info to unlock charts, tables, and downloads.

What This Calculator Actually Answers

This tool models two distinct strategies. Tax-loss harvesting: selling positions at a loss to offset realized gains elsewhere, plus up to $3,000 of ordinary income per year (with the rest carrying forward indefinitely). Tax-gain harvesting: deliberately selling positions at a gain in years where your taxable income is low enough to fall into the 0% federal long-term capital gains bracket, effectively resetting cost basis tax-free.

The output shows the cumulative tax savings across multiple years and the resulting cost-basis reset on positions you continue to hold. For most retirees with taxable brokerage accounts, this is one of the highest-leverage moves available in years where income is intentionally compressed (between retirement and Social Security claiming, for example).

How to Read the Result

The savings figure assumes you harvest deliberately and replace sold positions with similar-but-not-identical funds to avoid wash-sale violations. If you intend to repurchase the exact same fund within 30 days, the wash-sale rule disallows the loss, and the calculator's loss-harvesting estimate becomes irrelevant.

For gain harvesting, the 0% LTCG bracket is income-dependent. As of 2026, married-filing-jointly with taxable income below approximately $96,700 falls into the 0% bracket. Once you cross the threshold, every additional dollar of long-term gain is taxed at 15% federally, so the strategy is most powerful in years where total income is well below the threshold.

Common Mistakes

  • Violating the wash-sale rule by repurchasing the same security (or a substantially identical one) within 30 days before or after the sale. The disallowed loss adds to the cost basis of the replacement security but cannot be used immediately.
  • Harvesting losses without coordinating with realized gains: the value of loss harvesting is highest when offset gains exist, not when losses pile up as carryforwards.
  • Forgetting state tax consequences. Arizona's 2.5% flat rate applies to capital gains as ordinary income: modest, but worth modeling.
  • Gain harvesting in years where Social Security or RMD income pushes you out of the 0% LTCG bracket. The strategy depends on intentional income compression.
  • Ignoring the AMT implications of large harvested gains for households still affected by AMT thresholds.

When This Calculator Is Not the Right Tool

This is a tactical tax-management tool, not a holistic retirement plan. If your priority is multi-year Roth conversion sizing, RMD trajectory planning, or withdrawal sequencing, those decisions sit upstream of capital-gain harvesting and are better modeled with the tax-efficient withdrawal calculator first. Use this tool after the bigger-picture strategy is set.

Frequently Asked Questions

What is the 0% federal long-term capital gains bracket in 2026?

For married-filing-jointly households, the 0% bracket applies to taxable income up to approximately $96,700 (subject to final 2026 inflation adjustments). Single filers have a much lower threshold (~$48,350). The bracket applies only to long-term capital gains and qualified dividends, not short-term gains or ordinary income.

Can I harvest losses every year indefinitely?

Yes, with one constraint: the $3,000 annual ordinary-income offset is the ceiling for excess losses each year. Any remaining net capital loss carries forward indefinitely until used. Many retirees accumulate carryforward losses during market downturns that offset gains realized years later.

Does tax-loss harvesting actually add value, or is it a marketing gimmick?

It adds real value in three specific scenarios: when you have realized gains to offset, when you can claim the $3,000 annual ordinary-income offset, and when carryforward losses meaningfully offset future planned gains (a large stock sale, Roth conversion of appreciated NUA, etc.). It is not the largest planning lever in most retirement plans, but the cumulative effect over a decade is non-trivial.

What counts as a substantially identical security for the wash-sale rule?

Identical securities clearly trigger the rule. The IRS has not given bright-line guidance on similar-but-different ETFs (e.g., VTI and ITOT), but most tax professionals treat them as different enough to avoid the rule. Selling one and buying the other immediately is a common harvest-and-replace pattern. When in doubt, wait 31 days or use a clearly different index.

Calculators are a starting point. If you want to see how the result applies to your specific situation across tax brackets, IRMAA thresholds, and your full retirement income plan, schedule a 20-minute Strategic Fit Interview.