Free 2026 capital gains tax calculator

How much capital gains tax will I pay?

Federal tax on a sale depends on two things: how long you held the asset, and how much other income you already have. Enter your filing status, taxable income, gain, and holding period to see the 2026 federal tax on that gain — with the long-term 0%, 15%, and 20% brackets stacked on top of your income so you can see exactly which slice falls at which rate, plus the 3.8% net investment income surtax where it applies. 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 (sale price minus what you paid).

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.

Start with the correct gain, not the sale price

The gain input is net sale proceeds minus adjusted cost basis. Net proceeds are what remains after selling costs. Adjusted basis starts with what you paid and adds purchase fees, reinvested distributions, and qualifying improvements. A stock sale could look like this:

Step Amount Running figure
Sale price $85,000 $85,000 proceeds
Less selling commission −$500 $84,500 net proceeds
Original purchase $50,000 $50,000 basis
Purchase fee + reinvested distributions +$4,500 $54,500 adjusted basis
Capital gain $84,500 − $54,500 $30,000

Enter $30,000 — not the $85,000 sale price — in the calculator. First net all realised gains and losses for the tax year and apply any capital-loss carryover. Tax year matters: this tool uses 2026 thresholds and should not be used to calculate a sale reported on a 2024 or 2025 return.

2026 long-term capital gains brackets

The thresholds below are on your total taxable income — ordinary income plus the gain — not on the gain alone. These are the figures this calculator uses.

Filing status 0% rate 15% rate 20% rate
Single Up to $49,450 $49,450 – $545,500 Over $545,500
Married filing jointly Up to $98,900 $98,900 – $613,700 Over $613,700
Head of household Up to $66,200 $66,200 – $579,600 Over $579,600

A short-term gain gets none of this. It is taxed at your ordinary rate — 10%, 12%, 22%, 24%, 32%, 35%, or 37% in 2026 — which is why the single most valuable move available on a profitable position is often simply waiting until the one-year mark passes.

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.

Three worked examples

All three are single filers selling in 2026, with taxable income measured after deductions:

  • $80,000 income, $20,000 long-term gain. Total taxable income is $100,000 — above the $49,450 0% cap, below the 15% ceiling. The whole gain is taxed at 15%: $3,000. MAGI is under $200,000, so no NIIT.
  • $30,000 income, $30,000 long-term gain. The gain stacks from $30,000 to $60,000. The first $19,450 of it fits under the $49,450 cap and is taxed at 0%; the remaining $10,550 is taxed at 15%, for $1,583 total — an effective rate of just 5.3% on the gain.
  • $250,000 income, $100,000 long-term gain. All $100,000 sits in the 15% band: $15,000. But MAGI of $350,000 is $150,000 over the NIIT threshold, so the full gain also attracts the 3.8% surtax: $3,800. Total $18,800, an effective 18.8%.

The middle case is the one worth internalising. Two people with the same $30,000 gain can pay $0 or $6,000 depending purely on what else was on their return that year — which is why realising gains is a timing decision, not just a market one. If you want the whole method rather than the answer, our guide to how capital gains tax is calculated walks the four steps — basis, holding period, stacking, rate — with the 2026 bracket tables.

Rates that aren't 0/15/20

A few asset classes are carved out of the standard long-term rates. This calculator doesn't model them, so check whether one applies before relying on the number above:

  • Collectibles — art, coins, precious metals, and most physically-backed metal ETFs — are capped at 28% rather than 20%.
  • Unrecaptured Section 1250 gain on depreciated real estate is taxed at up to 25%, covering the depreciation you previously deducted.
  • Qualified small business stock under Section 1202 can be partly or wholly excluded from tax if the holding-period and issuer tests are met.
  • Your primary residence qualifies for an exclusion of up to $250,000 of gain (single) or $500,000 (married filing jointly) if you owned and lived in it for two of the last five years. Only the gain above the exclusion is taxable — enter that figure, not the whole profit.

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. The clock starts the day after you acquire the asset, and crossing it can move the same gain from 24% to 15%.
  • Harvest gains in low-income years — the gap between retiring and claiming Social Security is the classic window, because it can put a slice of gain in the 0% bracket permanently.
  • Tax-loss harvesting — realised losses offset realised gains dollar-for-dollar, and up to $3,000 of net loss can offset ordinary income each year. Anything beyond that carries forward indefinitely, with no expiry.
  • Watch the wash-sale rule. Buy a "substantially identical" security within 30 days before or after selling at a loss and the loss is disallowed — it's added to the basis of the replacement instead. It applies across your accounts, including an IRA, and to a spouse's purchases.
  • Pick your cost basis method. Selling specific lots you identify at the time of the trade usually beats the broker's default of first-in, first-out — it lets you sell high-basis shares and realise a smaller gain.
  • Donate appreciated shares held over a year instead of cash: you generally deduct the full market value and never realise the gain at all.
  • Hold to death for the step-up. Inherited assets generally take a basis equal to their value at the date of death, which erases the unrealised gain entirely.
  • Mind the cliffs. A large gain can trip the 3.8% NIIT, push you over an IRMAA threshold that raises Medicare premiums two years later, and phase out credits — none of which show up in the headline capital-gains rate.

The mistakes that cost the most

  • Selling in December instead of January. A gain realised on 31 December lands in this year's income; one day later it lands in next year's — often at a different rate and with a full year to plan around it.
  • Forgetting reinvested dividends. Every reinvested distribution bought shares and added to your basis. Ignoring them means paying tax twice on the same money.
  • Treating the marginal rate as the whole answer. A gain that pushes you over a NIIT or IRMAA threshold can cost far more than 15% at the margin.
  • Triggering a wash sale by accident — most often via automatic dividend reinvestment in the same fund, or by buying the replacement in an IRA where the loss is lost for good.
  • Assuming the state follows federal. Most states tax capital gains as ordinary income with no preferential rate, so a 15% federal bill can be 20%+ all in.

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.

How do I calculate my capital gain before estimating the tax?

Subtract adjusted cost basis from net sale proceeds. Net proceeds are the sale price after selling costs; adjusted basis is usually what you paid plus purchase fees, reinvested distributions, and qualifying improvements. Then net realised gains against realised losses and any loss carryover. Enter the remaining gain here, not the sale price.

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.

What is the capital gains tax rate for 2026?

For long-term gains, 0%, 15%, or 20% federally, decided by your total taxable income including the gain. In 2026 a single filer pays 0% up to $49,450, 15% from there to $545,500, and 20% above that; for married filing jointly the breakpoints are $98,900 and $613,700. Short-term gains have no preferential rate — they're taxed at your ordinary bracket, up to 37%.

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.

Find the years where this gain is free

A gain costs 0% or 20% depending entirely on what year you realise it in. Planomy projects your taxable income year by year — through retirement, Roth conversions, Social Security, and RMDs — so you can see which years have room under the 0% bracket before you sell. Free, private, and running in your browser.