Calcist

Style

Buttons

Spacing

How much to show

Decimal places

Text size

Capital gains tax calculator

Enter your income and gains to see the 2026 federal tax on them, with long-term gains taxed at 0%, 15% or 20% and the net investment income tax.

Data: tax year 2026 · Source: IRS Rev. Proc. 2025-32, 26 U.S.C. 1411 (net investment income tax) · Last reviewed October 2026

Short-term or long-term?

Private: calculated on your device. Nothing you type is sent anywhere.

Estimates for planning, not financial, tax or legal advice. Figures use US rules unless the page says otherwise.

Next: See your tax on the rest of your income with the income tax calculator, or plan an inheritance with the estate tax calculator.

How capital gains are taxed

Taxable income = other income + short-term gains + long-term gains − deduction
Long-term gains are stacked on top: the part below the 0% breakpoint is taxed at 0%, up to the 15% breakpoint at 15%, and above at 20%
NIIT = 3.8% × min(gains, MAGI − threshold)

Short-term gains (assets held one year or less) are taxed like wages, at your ordinary brackets. Long-term gains (held more than one year) and qualified dividends get lower rates. Your ordinary income fills the brackets first, and the gains sit on top, which is why the same gain can be taxed at 0% for one person and 15% for another.

2026 long-term capital gains brackets

Filing status0% up to15% up to20% above
Single$49,450$545,500$545,500
Married filing jointly$98,900$613,700$613,700
Married filing separately$49,450$306,850$306,850
Head of household$66,200$579,600$579,600

Amounts are total taxable income, including the gains. The net investment income tax adds 3.8% on investment income above modified AGI of $200,000 (single, head of household), $250,000 (married filing jointly) or $125,000 (married filing separately). These thresholds are set in the law and aren't adjusted for inflation.

Worked example

A single filer earns $60,000 and sells stock held three years for a $20,000 gain. Taxable income is $80,000 − $16,100 = $63,900, of which $43,900 is ordinary income.

  • 0% on $49,450 − $43,900 = $5,550 of the gain
  • 15% on the other $14,450 = $2,167.50

Tax on the gain: $2,167.50, about 10.8% of it. No NIIT, because income is under $200,000.

Holding period

Start counting the day after you bought. The day you sell counts. Bought January 3, 2025: selling on January 3, 2026 is one year exactly, so short-term; selling January 4, 2026 or later is long-term. Inherited property is always long-term, and gifts usually carry over the giver's holding period.

What this calculator leaves out

  • Collectibles (coins, art, precious metals) taxed at up to 28%, unrecaptured section 1250 gain on real estate depreciation taxed at up to 25%, and section 1202 small business stock. These need the full Schedule D worksheet, so they aren't modeled. Enter only gains taxed at 0/15/20%.
  • Losses. Enter net gains. Capital losses offset gains first, and a net loss deducts up to $3,000 a year ($1,500 married filing separately) against other income, with the rest carried forward. Net them out yourself first.
  • Other income is treated as ordinary and as your modified AGI for the NIIT, along with the gains. Interest and nonqualified dividends would add to net investment income.
  • The senior deduction, credits, AMT and state tax aren't included. Home sales may qualify for a $250,000 / $500,000 exclusion first.

Sources

How we checked this

Before every update, this calculator is run in a real browser with these known answers, and it must match all of them:

  • Single, $60,000 income, $20,000 long-term: $5,550 at 0%, $2,167.50 tax ✓
  • Joint, $300,000 + $400,000 long-term: 15%, 20% and NIIT = $77,905 ✓
  • Single, $10,000 short-term on $50,000 income: 12% = $1,200 ✓
  • No other income, $40,000 long-term: $23,900 taxable, all at 0% ✓
  • Bought Jan 3, 2025, sold Jan 3, 2026: short-term ✓
  • Bought Jan 3, 2025, sold Jan 4, 2026: long-term ✓
  • Bought Feb 29, 2024, sold Mar 1, 2025: long-term ✓

Last checked October 26, 2026. Spotted something wrong? The math is done in your browser with the formula shown on this page, so you can check any result by hand.

Add this calculator to your website (free)

Paste this code into any web page. The calculator works on your page, resizes itself, has no ads and no tracking, and nothing your visitors type is sent anywhere. More about embedding.

Questions people ask

What is the capital gains tax rate for 2026?

Long-term gains are taxed at 0%, 15% or 20%. For a single filer, 0% applies while taxable income is up to $49,450, 15% up to $545,500, and 20% above. Short-term gains are taxed at your ordinary rate, 10% to 37%.

How long do I have to hold a stock for long-term rates?

More than one year. Count from the day after you bought it. Selling on the one-year anniversary is still short-term; the next day is long-term.

Do I pay the 3.8% net investment income tax?

Only if your modified AGI is over $200,000 single, $250,000 married filing jointly or $125,000 married filing separately. It applies to the smaller of your investment income or the amount over the threshold.

Can I pay 0% tax on capital gains?

Yes, on the part of your long-term gains that fits under the 0% breakpoint after your other taxable income. A married couple with $60,000 of other income and a $32,200 standard deduction can realize about $71,100 of long-term gains at 0% in 2026.

Related calculators