Free 2026 capital gains tax calculator

Capital Gains Tax Calculator (2026)

Selling an investment? Federal tax on the gain depends on how long you held it and how much other income you have. Enter your filing status, income, gain, and holding period to estimate your 2026 federal tax — long-term 0%/15%/20% brackets stacked on your income, plus the 3.8% net investment income tax. Everything runs in your browser; nothing is uploaded.

Sets your 2026 bracket thresholds.
Long-term gains get the lower rates.
$
Taxable income before the gain (wages, etc.).
$
Net profit on the sale (proceeds − cost basis).

A simplified estimate of federal tax only, not tax advice. It uses 2026 bracket thresholds and treats your entry as taxable income after deductions. It does not include state or local taxes, the alternative minimum tax, the qualified small business stock exclusion, collectibles (28%) or unrecaptured §1250 (25%) rates, capital-loss carryovers, the interaction with credits and phase-outs, or how the gain itself can change other parts of your return. Confirm with a tax professional before acting.

How capital gains tax works

A capital gain is the profit when you sell an asset — stock, a fund, crypto, or property — for more than you paid. The federal tax on that gain depends on two things: how long you held the asset and how much total income you have.

  • Short-term gains (assets held one year or less) are taxed as ordinary income — the same brackets as your wages, stacked on top of your other income.
  • Long-term gains (held more than one year) get preferential rates of 0%, 15%, or 20%, depending on where your total taxable income lands.

The "stacking" rule

Long-term gains sit on top of your ordinary income when deciding which capital-gains rate applies. Your ordinary income fills the bottom brackets first; the gain is then layered above it. That's why the same $20,000 gain can be taxed at 0% for a low-income seller and 15% or 20% for a higher earner — and why a single gain can be split across two rates if it straddles a threshold. This calculator shows exactly how much of your gain falls in each bracket.

The 3.8% Net Investment Income Tax (NIIT)

On top of the regular capital-gains tax, a 3.8% surtax applies to investment income — including capital gains — once your modified adjusted gross income (MAGI) exceeds $200,000 (single or head of household) or $250,000 (married filing jointly). The 3.8% applies to the smaller of your net investment income or the amount of MAGI above the threshold. These thresholds are set by statute and are not adjusted for inflation, so more taxpayers cross them over time.

Methodology

This tool hardcodes the 2026 federal bracket thresholds for ordinary income, long-term capital gains, and the NIIT (see the clearly-labeled data object in the page source). For a short-term gain it computes ordinary tax on your income with and without the gain and takes the difference — the true marginal cost of the gain. For a long-term gain it stacks the gain above your ordinary income and applies the 0/15/20% rate to each slice that falls in each bracket. NIIT is then added where applicable. We treat your entered income as taxable income (after deductions) and use total taxable income as a proxy for MAGI — a reasonable approximation for most people, but not identical to a full return.

Ways to manage the tax

  • Hold for more than a year when you can, to convert a short-term gain into a lower-taxed long-term gain.
  • Harvest gains in low-income years — early retirement or a gap year can put you in the 0% long-term bracket.
  • Tax-loss harvesting — realized losses offset realized gains dollar-for-dollar, and up to $3,000 of net loss can offset ordinary income.
  • Mind the NIIT and IRMAA cliffs — a large gain can trip the 3.8% surtax and, two years later, raise Medicare premiums.

Frequently asked questions

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

Holding period. If you owned the asset one year or less, the gain is short-term and taxed at your ordinary income rate. If you held it more than a year, it's long-term and taxed at the lower 0%/15%/20% rates. The one-year clock starts the day after you acquire the asset.

Can my long-term capital gains really be taxed at 0%?

Yes. If your total taxable income (including the gain) stays below the 0% threshold for your filing status, that portion of the gain is taxed at 0% federally. Because gains stack on top of ordinary income, only the slice that fits under the threshold qualifies — anything above it moves to 15%.

What is the 3.8% NIIT and when does it apply?

The Net Investment Income Tax is a 3.8% surtax on investment income once your MAGI exceeds $200,000 (single/head of household) or $250,000 (married filing jointly). It applies to the lesser of your net investment income or the amount of income above the threshold, and it stacks on top of the regular capital-gains tax.

Does this include state taxes?

No. This calculator estimates federal tax only. Most states tax capital gains as ordinary income, and a few have no income tax at all, so your total bill can be meaningfully higher depending on where you live.

How is the effective rate on the gain calculated?

It's the total federal tax attributable to the gain (capital-gains tax plus any NIIT) divided by the gain amount. Because part of a gain can fall in different brackets, the effective rate often lands between the statutory rates.

Is selling a home taxed the same way?

Not quite. A primary residence qualifies for a capital-gains exclusion of up to $250,000 (single) or $500,000 (married filing jointly) if you meet the ownership and use tests, so only the gain above the exclusion is taxable. This tool doesn't model that exclusion — enter only the taxable portion of a home sale.

See the whole tax picture in Planomy

Free, private, and running entirely in your browser. Model how gains, Roth conversions, and withdrawals interact with your brackets, NIIT, and Medicare premiums across your whole plan — no account required.