Finance

Capital Gains Tax Calculator

Estimate your 2026 US federal capital gains tax on stocks, crypto, or real estate — short-term, long-term, and the 3.8% NIIT surtax.

📅 Last updated: August 5, 2026 · Reviewed by the MyCalcKit Editorial Team

What this calculator does

Estimates the US federal tax on a capital gain — from selling stocks, crypto, or real estate — using the current IRS short-term and long-term rates, and shows whether the 3.8% Net Investment Income Tax (NIIT) surtax applies.

Who this is for

Anyone who sold stocks, cryptocurrency, or other investment property this year and wants to estimate the tax bill before filing, or is deciding whether to sell now or wait past the one-year mark to qualify for long-term rates.

How this calculator works

Short-term gains (assets held one year or less) are taxed as ordinary income, using the same progressive brackets as wages. Long-term gains (held more than one year) get preferential 0%, 15%, or 20% rates — but the rate isn't based on the gain alone. Your long-term gain "stacks" on top of your ordinary taxable income, and each dollar of the gain is taxed at whichever rate band it falls into once stacked. This is why the same $20,000 gain can be entirely tax-free for one person and entirely taxed at 20% for another, depending on their other income.

Federal tax only, long-term/short-term capital gains rates and NIIT threshold verified directly against IRS Revenue Procedure 2025-32 (§4.03, IR-2025-103, Oct. 9, 2025). Excludes state capital gains tax, the §121 primary residence exclusion, and cost-basis/depreciation-recapture rules for real estate. Source: irs.gov.

Worked example

Single filer, $80,000 ordinary taxable income, $20,000 long-term capital gain: the gain stacks from $80,000 to $100,000. The 0% bracket covers up to $49,450 (already used up by ordinary income), so none of the gain is tax-free. The 15% bracket covers $49,450–$545,500, so the entire $20,000 gain falls in the 15% band: $20,000 × 15% = $3,000 in federal capital gains tax, an effective rate of 15% on the gain.

A second example: the same $80,000 ordinary income and $20,000 gain, but held for less than a year (short-term). The gain is added directly to ordinary income and taxed at the filer's marginal ordinary rate (24% for income in this range) rather than the preferential 15% long-term rate — a real difference of roughly $1,800 in tax for waiting past the one-year mark, illustrating why holding period matters so much.

The 3.8% NIIT Surtax

Beyond the standard capital gains rates, higher earners may owe an additional 3.8% Net Investment Income Tax on top. It applies to the lesser of your net investment income or the amount your modified adjusted gross income (MAGI) exceeds $200,000 (single, head of household) or $250,000 (married filing jointly) — thresholds that have not changed since NIIT was introduced in 2013 and are not adjusted for inflation, unlike most other tax figures. This means NIIT quietly captures more taxpayers every year as incomes rise with inflation but the threshold stays fixed.

Where your gain goes

Run the calculator above to see the tax vs. net proceeds split.

Common mistakes

  • Assuming your whole gain is taxed at one flat rate. Long-term gains stack on ordinary income and can straddle multiple rate bands — part of a large gain might be taxed at 15% and part at 20%.
  • Selling one day too early. Holding an asset exactly one year is still short-term; you need to hold it for more than one year (366+ days in most cases, accounting for leap years) to qualify for long-term rates.
  • Forgetting the NIIT surtax exists. It's a separate 3.8% tax on top of the regular capital gains rate, easy to miss since it isn't part of the headline 0/15/20% bracket table.
  • Ignoring state capital gains tax. This calculator is federal-only; most states tax capital gains as ordinary income at their own rates, meaningfully increasing your real total tax bill.
  • Treating crypto differently from stocks. The IRS taxes cryptocurrency as property under the same capital gains rules as stocks — there's no separate, lighter "crypto tax" regime.

What to do next

Frequently Asked Questions

What's the difference between short-term and long-term capital gains?

Short-term applies to assets held one year or less, taxed at your ordinary income rate (up to 37%). Long-term applies to assets held more than one year, taxed at the lower 0%, 15%, or 20% preferential rates.

What are the 2026 long-term capital gains brackets?

For single filers: 0% up to $49,450 of taxable income, 15% up to $545,500, 20% above. For married filing jointly: 0% up to $98,900, 15% up to $613,700, 20% above. These are IRS Revenue Procedure 2025-32 figures.

What is the Net Investment Income Tax (NIIT)?

An additional 3.8% surtax on investment income (including capital gains) for taxpayers whose modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly). These thresholds are not inflation-adjusted and have stayed the same since 1997.

Does my capital gain get taxed at a flat rate?

No — long-term gains "stack" on top of your ordinary taxable income. The portion of your gain that falls within each rate band is taxed at that band's rate, similar to how ordinary income brackets work.

Does this include state capital gains tax?

No, this is federal tax only. Many states tax capital gains as ordinary income at their own state rates; a few (like Texas and Florida) have no state income tax at all.

Is crypto taxed the same way as stocks?

Yes — the IRS treats cryptocurrency as property, so the same short-term/long-term capital gains rules and rates apply to crypto sales as to stocks.