What it computes

Long-term capital gains and qualified dividends are taxed at 0%, 15% or 20%, and they stack on top of your ordinary taxable income[3]. For 2026 the 0% rate covers taxable income up to $98,900 for a joint return ($49,450 single)[2], so the room left for tax-free gains is that line minus your taxable ordinary income. This calculator finds that room to the dollar with the simulator’s own tax function, including the age-65 deductions and the temporary senior deduction, which phases out as income (gains included) rises[7].

0% capital-gains headroom

You can realize up to $86,400 of long-term gains this year without paying federal tax on them. A $50,000 gain would cost $0 in federal tax (0% of the gain).

  • Deductions: $47,500 (standard, plus any age-65 and senior deductions at this income). Taxable ordinary income: $12,500.
  • 0% band: taxable income up to $98,900. Gains stack on top of ordinary income, so $86,400 of gains fit before the 15% rate starts.
  • Tax on a $50,000 gain: $0: capital-gains tax $0, extra ordinary tax $0, net investment income tax $0. $50,000 of it is untaxed.

Federal only. The senior deduction applies for tax years 2025–2028 to people 65 or older, and not to married people filing separately.

Worked example

A married couple, both 67, has $60,000 of pension and IRA income. Their deductions total $47,500, leaving $12,500 of taxable ordinary income, so $86,400 of long-term gains fit in the 0% band. A $50,000 gain costs them $0 in federal tax.

A $120,000 gain is different: it costs $5,940 (5% of the gain). $5,580 is 15% tax on the part above the 0% band, and $360 is extra tax on ordinary income, because the larger gain raises their income past the point where the senior deduction starts to shrink.

What it ignores

  • State income tax. Many states tax capital gains as ordinary income.
  • How a gain makes more Social Security taxable or raises MAGI for IRMAA and ACA credits; the marginal-rate map shows those together.
  • Short-term gains (taxed as ordinary income), collectibles and unrecaptured depreciation.
  • Capital-loss carryovers and the wash-sale rule for losses (gains can be rebought at once).
  • Itemized deductions; the standard deduction is assumed.

The rule behind it

The full explanation, with sources, is in The 0% capital-gains bracket is real: LTCG stacking explained.

See it over a full plan

Harvesting gains at 0% is a year-by-year decision. The simulator realizes gains whenever it draws on a taxable account and shows when they are taxed, alongside withdrawals, conversions and the senior deduction. Open it in the simulator →

If you already have a saved plan, the link only takes you to the right panel; your plan is not changed.

Embed this tool on your site

Paste this HTML where the tool should appear. It keeps the credit link visible, shows no ads, and reads nothing stored on your visitors’ devices; what they type stays in their browser.

Optional: add this script once on the page and each embedded tool grows to fit its content instead of scrolling inside the frame.

This tool shows how the rules work. It is not financial, tax or investment advice. See the disclaimer.

Sources