Long-term gains and NIIT

Capital Gains Tax Calculator

See how 2026 long-term capital gains stack into the 0%, 15% and 20% bands, and whether the 3.8% Net Investment Income Tax applies.

Your numbers

Long-term capital gains tax

0%, 15% and 20% rates stacked on your other taxable income, plus the 3.8% Net Investment Income Tax.
TAX YEAR 2026

Revenue Procedure 2025-32 §4.03us-tax-2026-v1

$Taxable income that is not long-term gain or qualified dividends
$Held more than one year
MAGI and net investment income for NIIT
$Leave blank to use other taxable income plus the gains
$Leave blank to use the long-term gains

Tax on long-term gains

$3,000.00$0.00 at 0% · $20,000.00 at 15% · $0.00 at 20%
Ordinary income tax$12,312.00On other taxable income only
Net Investment Income Tax$0.003.8% of the lesser of NII or MAGI over the threshold
Combined federal tax$15,312.00Ordinary + gains + NIIT

High confidence0% and 15% ceilings transcribed from Revenue Procedure 2025-32 §4.03; NIIT thresholds from the IRS Q&A on IRC 1411; Collectibles, unrecaptured 1250 gain and the home-sale exclusion are not modelled.

How we got this
  1. Ordinary taxable incomeTaxed at ordinary brackets$80,000.00
  2. Ordinary income tax$12,312.00
  3. 15% long-term gains$20,000.00$3,000.00
  4. Net Investment Income TaxMAGI is not over the $200,000.00 threshold for Single$0.00
What we assumed
  • Tax year 2026. The 0% and 15% long-term capital gains ceilings are from Revenue Procedure 2025-32 §4.03. Amounts above the 15% ceiling are taxed at 20%.
  • Long-term means a holding period of more than one year. Short-term gains are ordinary income and should be entered there, not here.
  • Qualified dividends use the same 0%/15%/20% schedule. They are not a separate input; include them in the long-term gain figure only if they are actually qualified.
  • Collectibles (28%), unrecaptured section 1250 gain (25%), the net investment income of a trade or business, and the section 121 exclusion on a main home are not modelled.
  • MAGI for the NIIT was taken as other taxable income plus the gains ($100,000.00). That understates MAGI when the standard deduction or adjustments came off before taxable income, so the NIIT can be too low.
  • NIIT thresholds are statutory under IRC 1411 and are not inflation-indexed. Source: IRS Questions and Answers on the Net Investment Income Tax.
  • This is federal tax only, not a filed return, and not tax advice.
Technical details

Method capital-gains-v1.0.0Data us-tax-2026-v1

Guide

Long-term gains are not taxed at your ordinary bracket

A long-term capital gain sits in 0%, 15% or 20% bands that are stacked on top of your other taxable income. Crossing into 15% does not re-tax the wages underneath, and a separate 3.8% Net Investment Income Tax can still apply once MAGI is high enough.

The gain uses the room left in each preferential band

Other taxable income fills the 0% and 15% ceilings first. Only the leftover room is available to the gain. That is why two people with the same $20,000 gain can owe different tax on it: one still had 0% room, the other did not.

The 2026 ceilings come from Revenue Procedure 2025-32. Amounts above the 15% ceiling are taxed at 20%.

NIIT looks at MAGI and net investment income

The tax is 3.8% of the smaller of net investment income or MAGI over $200,000 single / $250,000 joint / $125,000 married filing separately. Those thresholds are not inflation-indexed.

Wages are not net investment income. They still raise MAGI, which is how a high salary can cause NIIT on a gain that would otherwise sit below the threshold.

Short-term is a different tax

A holding period of one year or less is ordinary income. Enter it with other taxable income, not as a long-term gain, or this page will understate the tax.

Questions about this calculator

Do capital gains push my wages into a higher bracket?

Ordinary brackets apply to ordinary taxable income. Long-term gains use a separate 0%/15%/20% schedule stacked on top of that income.

The gains can still fill preferential bands that your wages already reached, which is why the same gain is taxed differently at different ordinary-income levels.

Is the Net Investment Income Tax the same as Additional Medicare Tax?

No. Additional Medicare Tax is 0.9% on wages and self-employment income over a threshold. NIIT is 3.8% on net investment income over a MAGI threshold. They do not apply to the same kind of income.

Does selling my main home count here?

Only the gain that is not excluded under section 121. This page does not apply that exclusion, so entering a home-sale figure as a long-term gain can overstate the tax.

Terms used here

Long-term capital gain
Gain on an asset held more than one year, generally taxed at 0%, 15% or 20% rather than ordinary rates.
Preferential rate ceiling
The taxable-income level at which the 0% long-term rate ends and the 15% rate begins, or the 15% rate ends and 20% begins.
Net Investment Income Tax
A 3.8% tax on the lesser of net investment income or MAGI over a statutory threshold.
Qualified dividend
A dividend eligible for the same 0%/15%/20% schedule as long-term gains, if it meets holding-period rules this page does not test.

Practical tips

  • Enter other taxable income, not gross wages, or the 0% room will look larger than it is.
  • If you have interest and rental income as well as a gain, put the combined net investment income in the advanced field so NIIT is not understated.
  • Losses you already netted should be reflected in the gain figure you type; this page does not apply the $3,000 ordinary-income loss limit.

Limits and caveats

  • Collectibles (28%) and unrecaptured section 1250 gain (25%) are not modelled.
  • The section 121 home-sale exclusion is not applied.
  • This is not a filed Form 8949 or Form 8960, and not tax advice.

Results are for information. They are not legal, tax, medical, or financial advice. How the math is maintained · Report a wrong figure.

Engine notes

Rounding, versioning, and omissions that sit beside the guide rather than repeating it.

  • Gains stack on top of other taxable income. The 0% band fills any room left under $49,450 for a single filer (the joint ceiling is $98,900). The 15% band then runs to $545,500 single / $613,700 joint. Anything above that is 20%.
  • NIIT is a separate 3.8%. The Net Investment Income Tax is 3.8% of the lesser of net investment income or MAGI over $200,000 single / $250,000 joint. Those thresholds are statutory and are not adjusted for inflation.
  • What is left out. The section 121 exclusion on a main home, collectibles taxed at 28%, unrecaptured section 1250 gain at 25%, and netting of capital losses beyond treating the gain figure you enter as already netted.

Calculation receipt

What each number here is

This answer is built from published figures. Each one is named below, with the release it came from.

VERIFIEDIRS and state revenue departments
Sets the figures this answer is made of. Without it the page says so rather than estimating.

If a source above is unavailable or out of date: The long-term rate a household pays is decided by published thresholds. Without them the page cannot say which bracket applies.

Sources

Where this data comes from