Calculators·🇺🇸

US Capital Gains Tax

Federal tax on a US stock sale at 2026 rates — short-term at ordinary rates, long-term at 0/15/20%, plus NIIT.

“Other taxable income” is income after deductions — the 2026 standard deduction is $16,100 single, $32,200 married filing jointly.

Gain$20,000
Holding periodLong-term (>1 year)
Federal tax$3,000
Total tax$3,000
Effective rate on the gain15.00%
Marginal rate on the next dollar15.00%
Net after tax$17,000

Federal only — state tax ranges from 0% (TX, FL, WA) to over 13% (CA) and is not included.

2026 IRS inflation-adjusted brackets · NIIT per 26 U.S.C. §1411 (thresholds fixed 2013, not indexed) · federal only

US Capital Gains Tax Calculator: how it works

Hold more than one year and the gain is long-term, taxed at 0%, 15% or 20% depending on total taxable income. A year or less is short-term and taxed as ordinary income. Above $200,000 MAGI (single) or $250,000 (married filing jointly), a further 3.8% Net Investment Income Tax stacks on top.

Formula

Long-term: bracketed 0/15/20% on taxable income including the gain · Short-term: added to ordinary income at 10–37% · NIIT = 3.8% × min(gain, MAGI over threshold). Federal only; state tax is separate.