Tax

Long Term Capital Gains Tax Calculator

Find the room you have inside the 0% capital gains band — the most underused planning opportunity in the tax code, and the ordinary income that quietly destroys it.

Long Term Capital Gains Tax Calculator

Results recalculate instantly on every keystroke. Nothing you type is transmitted.

Your Position
$
$
The Decision
$
%
Stacking Risk
$
Room In The 0% Band
Long-term gain you can realise at zero federal tax
Ordinary Taxable Income
How Your Realisation Splits
Tax On What You Realise
Effective Rate On The Realisation
Value Of Resetting Your Basis
Can You Rebuy Immediately
Cost Of Extra Ordinary Income
True Marginal Rate In This Zone

What this result does not account for

  • Results are a model, not a quotation — an institution's own figures govern.
  • Every input is an assumption; change one and the answer changes with it.
  • Rounding is applied only at the display layer, so totals may differ by a cent from a statement that rounds each line.
Zero-Server Execution Updated 11 Aug 2026 Reviewed by Imran S. Qureshi, CFA IEEE-754 Double Precision

In short: With $40,000 of income and a $14,600 deduction, taxable income of $25,400 leaves $21,625 of room beneath the $47,025 ceiling of the 0% long-term band. You can realise that much gain at zero federal tax and immediately rebuy — no wash sale rule applies to gains — permanently raising your basis and saving $3,243.75 at 15% later.

Formula

0% room = $47,025 − ordinary taxable income  ·   Gains stack ABOVE ordinary income  ·   True marginal = ordinary rate + rate on displaced 0% room

Every extra dollar of ordinary income displaces a dollar of 0% capital-gains room, so its true cost exceeds its bracket.

Worked Example

  1. Find ordinary taxable income. $40,000 − $14,600 = $25,400.
  2. Measure the room. $47,025 − $25,400 = $21,625 of 0% capacity.
  3. Split a $40,000 realisation. $21,625 at 0% and $18,375 at 15% = $2,756.25 — an effective 6.89%.
  4. Value the basis reset. Harvesting the free $21,625 saves $3,243.75 at 15% later.
  5. Price the trap. $10,000 more ordinary income costs its own 12% plus 15% of displaced room — a 27% true marginal rate.

Analyst's note. Gain harvesting is the mirror image of loss harvesting and is far less used, largely because realising a gain deliberately feels wrong. It is not: inside the 0% band the gain costs nothing federally, and because the wash sale rule applies only to losses you can rebuy the identical security the same minute and keep the higher basis permanently. That is $3,243.75 of future tax removed for no cost whatsoever. The trap is the stacking rule — every extra dollar of ordinary income pushes a dollar of gain out of the 0% band, which means an extra dollar earned in this zone really costs 27%, not the 12% bracket suggests. Retirees and anyone in a low-income year should model this before taking on marginal work.

Strengths & Limits Of This Model

Where this engine is strong

  • Runs entirely in your browser — no figure you type is transmitted or stored.
  • Shows the full working, so every number can be traced and challenged.
  • Free, unmetered and free of affiliate incentives.

Where it stops

  • Generalised assumptions cannot capture every individual circumstance.
  • Jurisdiction-specific rules and mid-year changes may not be reflected.
  • A model output is not a substitute for a professional review of your position.

Risk & accuracy notice. Figures produced here are estimates derived from the inputs you supply. They are not a forecast, an offer, or a guarantee of any outcome, and no result should be read as a promise of future performance. Rates, thresholds and statutory rules change, and your own circumstances may differ materially from the assumptions modelled.

Practical Use Cases

Harvesting gains in a low-income year

A sabbatical, an early retirement year before Social Security, or a business loss year all open temporary 0% room. Realising gains into it and rebuying immediately is one of the few genuinely free moves available.

Planning Roth conversions against gain harvesting

Both compete for the same low-bracket space. A conversion fills ordinary brackets and displaces 0% capital-gains room, so the two must be sized together — see the Roth IRA Calculator.

Deciding whether to take extra work

In this zone an extra dollar of ordinary income can cost 27% rather than 12% once displaced 0% room is counted. That materially changes whether marginal work is worth taking.

Methodology & Editorial Standards

The engine applies 2024 single-filer long-term capital gains bands: 0% up to $47,025 of total taxable income, 15% to $518,900 and 20% above. Gains stack on top of ordinary taxable income, so the 0% room equals the band ceiling less ordinary taxable income. The basis-reset value assumes the harvested gain would otherwise have been realised later at the rate you specify; if you never sell, the step-up in basis at death eliminates the gain entirely and harvesting adds nothing. The wash sale rule genuinely does not apply to gains, so an immediate repurchase is permitted — this is settled treatment, not a loophole. State tax is not modelled and many states have no 0% band at all, which can make a federally free realisation still costly. The Net Investment Income Tax does not apply at these income levels. Not tax advice. The engine implements the standard published formula for this calculation. Inputs are validated for domain and sign before evaluation, and any undefined case returns an em-dash rather than a spurious value.

Computation runs in IEEE-754 double precision at full internal precision; rounding to two decimal places occurs strictly at the display layer, so no cumulative drift enters the result. All monetary outputs use accounting presentation — grouped thousands, two decimals, negatives in parentheses — so figures can be transcribed directly into a model or working paper. Division-by-zero and out-of-domain inputs return an em-dash rather than a misleading number.

This engine was reconciled against an independent reference implementation and hand-verified for the worked example above before release. Our full five-stage review process is published on the About Us page.

Imran S. Qureshi, CFA Head of Quantitative Modelling · ApexConverter

Cross-border taxation and treasury reporting across multiple jurisdictions. Last reviewed: 11 August 2026.

Disclaimer. This calculator is provided for informational and modelling purposes only and does not constitute financial, tax, legal, medical, or engineering advice. Verify all figures with a qualified professional before acting on them.


Long Term Capital Gains Tax Calculator — 20 Expert FAQs

20 analyst-written answers to the questions practitioners actually ask — optimised for voice and answer-engine retrieval.

Is there really a 0% capital gains rate?

Yes. Long-term gains are taxed at 0% while total taxable income stays under $47,025 for single filers in 2024. With $25,400 of ordinary taxable income you have $21,625 of completely tax-free capacity.

What is gain harvesting?

Deliberately realising long-term gains inside the 0% band and immediately repurchasing. It costs nothing federally and permanently raises your basis, removing $3,243.75 of future tax at 15% here.

Does the wash sale rule stop me rebuying?

No. The wash sale rule applies only to losses. You may sell a gain and repurchase the identical security the same minute, keeping the higher basis — this is settled treatment, not a loophole.

How do gains stack with ordinary income?

Ordinary income fills the brackets first and gains sit on top. That is why the 0% room equals the band ceiling minus your ordinary taxable income, and why extra earnings shrink it dollar for dollar.

What does extra ordinary income really cost me here?

Its own bracket plus the rate on the 0% room it displaces — 12% plus 15%, so 27% on each extra dollar. That is well above what the bracket table suggests.

Should I harvest gains or convert to Roth?

They compete for the same low-bracket space. Gain harvesting is usually simpler and immediately beneficial; a Roth conversion is better if you expect much higher rates later. Size them together, not separately.

What if I never sell the asset?

Then harvesting adds nothing. Basis steps up to market value at death and the entire unrealised gain disappears, so heirs owe nothing. Harvesting only helps if you or they will actually sell.

Does my state have a 0% band?

Usually not. Most states tax capital gains as ordinary income with no preferential band, so a federally free realisation can still generate a state bill. Check before harvesting.

When is the best year to harvest gains?

A year with unusually low income — a sabbatical, a career break, early retirement before Social Security or pensions begin, or a business loss year. The room is temporary and does not carry forward.

How much can I harvest?

Up to the room shown, $21,625 here. Realising more spills into the 15% band: a $40,000 realisation costs $2,756.25 in total, still only a 6.89% effective rate.

Does harvesting affect my ACA subsidy?

Yes, and materially. Realised gains raise modified AGI, which drives premium tax credits. A harvest that is free for income tax can be expensive in lost subsidy, so model both together.

Do qualified dividends use the same band?

Yes. They share the 0/15/20 schedule and stack alongside gains, so dividend income consumes the same 0% room. Include them when sizing a harvest.

What is the step-up in basis?

At death, basis resets to market value and unrealised gain is never taxed. It is the single largest capital gains break in the code and the main argument against realising gains you do not need.

How does this differ from loss harvesting?

Loss harvesting sells at a loss to offset gains and is restricted by the wash sale rule. Gain harvesting sells at a profit inside the 0% band and has no such restriction — they are complementary, not alternatives.

Can married couples harvest more?

Considerably. The 0% ceiling is $94,050 for joint filers, exactly double, so a couple with modest ordinary income can shelter a very substantial gain each year.

Is this long term capital gains tax calculator free to use?

Yes. It is free, requires no account, and has no usage limits. ApexConverter is funded by contextual advertising, never by selling user data.

Is my data sent to a server?

No. The engine runs as Vanilla JavaScript inside your browser under our Zero-Server Client-Side Execution model. Your figures are computed locally and are never transmitted, logged, or stored.

How accurate is this calculator?

It applies the standard closed-form formula in IEEE-754 double precision, rounding only at the display layer. The engine is reconciled against an independent reference implementation before release.

Does it work on mobile?

Yes. The interface is mobile-first with numeric keypad hints and is tested down to a 320-pixel viewport with no horizontal scrolling.

Can I use it offline?

Largely, yes. Because computation is client-side, the page continues to calculate without a network connection once it has loaded.

Related Tax Engines