Skip to content
UnitFormula

Long-term capital gains — on assets held more than a year — are taxed at 0%, 15%, or 20%, depending on your total taxable income, plus a 3.8% Net Investment Income Tax for high earners. The gain stacks on top of your other income: a $20,000 gain on $60,000 of other income (single, 2026) falls in the 15% band, so the tax is $3,000. The 0% rate applies up to $49,450 of income for single filers; 15% up to $545,500; 20% above.

Capital Gains Tax Calculator — long-term 0/15/20% + NIIT (2026)

A $20,000 long-term gain on $60,000 of other income, filing single, US 2026.

Total tax on the gain$3,000.00
Capital gains tax
$3,000.00
Net Investment Income Tax (3.8%)
$0.00
Effective rate on the gain
15%

Quick examples

How it's calculated

  1. LTCG tax = 15% / 20% on the gain by bandLTCG tax=15% / 20% on the gain by band\text{LTCG tax} = 15\% \text{ / } 20\% \text{ on the gain by band}
    gain
    = 20,000
    zeroCeiling
    = 49,450
    fifteenCeiling
    = 545,500
    3,000
  2. NIIT = 3.8% × min(gain, MAGI − threshold)NIIT=3.8%×min(gain,MAGIthreshold)\text{NIIT} = 3.8\% \times \min(\text{gain}, \text{MAGI} - \text{threshold})
    threshold
    = 200,000
    0
  3. Total = LTCG tax + NIITtotal=LTCG tax+NIIT\text{total} = \text{LTCG tax} + \text{NIIT}
    3,000

Compare scenarios

Side by side across the compared columns.
Other incomeTax on the gainEffective rate
$30,000$82.500.4%
$80,000$3,000.0015%
$300,000$3,760.0018.8%
$600,000$4,760.0023.8%
Total tax on the gain$3,000.00

How it works

The rate on a long-term gain isn't fixed — it depends on where the gain lands once it's stacked on top of your ordinary taxable income. Your other income "fills up" the lower brackets first, then the gain sits on top: whatever part of it falls below the 0% ceiling is untaxed, the part up to the 15% ceiling is 15%, and anything above is 20%. That's why the same gain can be taxed at different rates for different people, and why a single gain can even span two rates. On top of that, high earners pay the 3.8% Net Investment Income Tax on the smaller of their investment income or the amount their income exceeds $200,000 (single) or $250,000 (married). The income sweep shows one gain climbing through the bands as other income rises.

Worked example

A single filer with $60,000 of other taxable income and a $20,000 long-term gain stacks the gain from $60,000 to $80,000 — entirely between the $49,450 zero-rate ceiling and the $545,500 fifteen-percent ceiling, so all of it is taxed at 15%: $3,000. Income is well under $200,000, so there's no NIIT. Raise other income to $600,000 with a $50,000 gain and the gain sits above the $545,500 ceiling, taxed at 20% ($10,000), plus 3.8% NIIT on the $50,000 ($1,900) — $11,900 total, an effective 23.8%.

Frequently asked questions

How are long-term capital gains taxed?

At 0%, 15%, or 20% federally, based on your total taxable income — not a flat rate. The gain is added on top of your other income; the part below the 0% ceiling ($49,450 single in 2026) is untaxed, up to the 15% ceiling ($545,500) is 15%, and above is 20%. Assets held a year or less are short-term and taxed as ordinary income instead.

Why does my gain get more than one rate?

Because the gain occupies a slice of your income, and that slice can straddle a rate boundary. If your other income is just below the 0% ceiling, part of the gain fills the rest of the 0% band and the remainder is taxed at 15%. The calculator splits the gain across the bands automatically — you don't pay one rate on the whole thing just because the top of it crossed a line.

What is the 3.8% Net Investment Income Tax?

An extra 3.8% tax on investment income — including capital gains — for higher earners. It applies to the lesser of your net investment income or the amount your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly). It's on top of the 0/15/20% rate, so a high earner's gain can face 23.8%.

What counts as long-term?

An asset held **more than one year** before you sell it. Held a year or less, the gain is short-term and taxed at your ordinary income rates (up to 37%), not these preferential rates — so the holding period matters a lot. This calculator is for long-term gains; enter a short-term gain in the income-tax calculator as ordinary income instead.

Does this include state capital gains tax?

No — it's federal only. Most states tax capital gains as ordinary income (some have no income tax, a few have special rates), so your total can be meaningfully higher than shown. Add your state's treatment separately; this page handles the federal 0/15/20% plus NIIT.

How can I lower the rate on a gain?

Timing and income are the levers: holding past one year gets the long-term rates, and realizing a gain in a lower-income year can keep it in the 0% or 15% band. Offsetting gains with capital losses ("harvesting") reduces the taxable gain directly. The calculator shows how much the rate moves with your other income — the same lever those strategies pull.

How accurate is this, and what does it exclude?

The arithmetic is exact for the gain, other income, and filing status entered, using the 2026 published ceilings. It's a federal estimate that assumes the gain is entirely long-term, approximates MAGI as your other income plus the gain, and treats the gain as your only net investment income. It excludes state tax, short-term gains, qualified dividends, capital-loss offsets, the qualified small business stock exclusion, and depreciation recapture.

How we know this is right

Last reviewed
Jul 23, 2026
Next review
Oct 15, 2026
Precision
Rounded to 2 decimal places.
Read our methodology

Sources