Capital Gains Tax Calculator

U.S. only tools

Long-term capital gains have their own rate ladder, and it is stacked on top of your ordinary income rather than replacing it. The same $50,000 gain can be entirely tax free for one filer and taxed at 20% for another, because what matters is where the gain falls in the stack.

$

Sale proceeds minus what you paid, including any costs of buying and selling.

How long you owned it: more than a year is long term, a year or less is short term.

Your filing status, which sets the income thresholds.

$

Wages and other ordinary income after deductions. Long-term gains are stacked on top of it.

$

Interest, dividends and rent that count towards the 3.8% net investment income tax.

Results update as you type. Nothing leaves your device.

Currency symbol

Symbol only - nothing is converted and no exchange rate is used. Figures quoted in the explanation text stay as the sources publish them.

Tax on a $50,000 long-term gain

$7,500.00

$7,500.00 of capital gains tax

Capital gains tax
$7,500.00
Net investment income tax on this gain
$0.00 Not triggered
Effective rate on the gain
15% Blended across the bands
After-tax gain
$42,500.00

The gain, band by band

Taxable income bandGain taxed hereTax
15% capital gains rate$50,000.00$7,500.00
Total capital gains tax$50,000.00$7,500.00

The gain sits on top of $60,000 of ordinary taxable income, so only the part that falls inside each band is charged at that band rate.

Where the gain goes

  • Capital gains tax$7,500.00
  • Net investment income tax on this gain$0.00
  • You keep$42,500.00

State tax on capital gains comes out of the green slice in most states, and a few tax gains as ordinary income with no preferential rate at all.

The same gain held for a different length of time

Holding periodTaxDifference
More than a year (long term)$7,500.00$3,586.00 saved
A year or less (short term)$11,086.00

This comparison ignores the net investment income tax, which applies either way once modified AGI passes the threshold.

The bands, the thresholds and where you sit

MeasureAmount
0% band top (single)$49,450
Room left in the 0% band before this gain$0
Taxable income where the 20% band starts$545,500
Net investment income tax threshold$200,000
Estimated modified AGI used for that test$126,100
Gain counted toward the 3.8% tax$0

Modified AGI is approximated by adding the standard deduction back to taxable income and then adding other investment income, so above-the-line deductions are not captured exactly. The 3.8% tax on this page is the part this gain causes; any net investment income tax already due on your other investment income stays with that income. Check the figures against your return before relying on them.

This gain is taxed at an effective 15%. Realizing gains up to the top of the 0% band each year keeps them tax free, and the 20% rate only starts above $545,500 of taxable income.

This calculator puts the gain through the 2026 long-term bands, prices the same gain as a short-term one for comparison, and checks whether the 3.8% net investment income tax applies on top.

About this capital gains tax calculator

Were a profit taxed alike however long it was held, the calendar would decide nothing; the rate bands and a surtax are why it does. It sorts a gain into the 2026 long-term 0%, 15% and 20% bands, shows what the same gain would cost if it were held a year or less and taxed as ordinary income, and adds the 3.8% net investment income tax when estimated modified AGI crosses the $200,000 single or $250,000 joint line - all in your browser, with no upload and no account.

The bands are read from IRS Revenue Procedure 2025-32, recorded and verified with its source, and the page is reviewed on a schedule and corrected openly when something is off. It prices one federal capital gain and stops there: state treatment, the main home exclusion, loss carryforwards, opportunity zones and 1031 exchanges sit outside it. An estimate, not a return, and not tax advice.

How this capital gains tax calculator works

The 0%, 15% and 20% ladder

Long-term gains are taxed at 0% until total taxable income reaches $49,450 for a single filer, $98,900 for a married couple filing jointly or $66,200 for a head of household. Above that the rate is 15%, and 20% starts above $545,500 single, $613,700 joint or $579,600 head of household.

The bands are measured in total taxable income, not in the gain itself, and the gain is stacked on top of ordinary income. A single filer with $60,000 of taxable income from wages has no room left in the 0% band, so the first dollar of gain is taxed at 15% even though $50,000 of gain sounds small.

The table prints the gain band by band with the slice taxed in each, so a sale that crosses a threshold is charged at two or three rates rather than one. Room left in the 0% band is shown as its own line, because that is the figure anyone harvesting gains for free is actually looking for.

Short-term gains are ordinary income

Hold for a year or less and the gain is added to wages and taxed through the ordinary brackets, with no 0% band available. A $40,000 short-term gain on top of $60,000 of taxable income lands in the 22% band, not the 15% capital gains band.

The holding period starts the day after the purchase settles and runs to the day of sale, and it has to exceed one year. Buying on March 3 and selling on March 3 of the following year is still short term; one day later is long term.

The page prices both holding periods in a single table so the cost of the calendar is visible: the long-term line, the short-term line and the difference between them, with the surtax excluded from that comparison because it applies either way once modified AGI passes the threshold.

The 3.8% net investment income tax

Above $200,000 of modified adjusted gross income for a single filer or head of household, and $250,000 for a couple filing jointly, a 3.8% surtax applies to the smaller of net investment income or the amount over the threshold. The thresholds are not indexed, so more filers cross them each year.

Modified AGI is approximated on this page by adding the standard deduction back to taxable income and then adding any other investment income you enter, so above-the-line deductions are not captured exactly. The gain counted toward the surtax is the part of the gain that sits above the threshold once that MAGI includes the gain itself, and the table prints both numbers.

The charge on this page is only the surtax this sale causes, not the whole return's NIIT. Any tax already owed on your other investment income stays attached to that income, and the return-level total is reported separately, so the effective rate on this gain is not inflated by money it did not produce.

What is excluded

The main home exclusion removes up to $250,000 of gain from a sale, or $500,000 on a joint return, when the property was owned and used as a main residence for two of the previous five years. Qualifying small business stock, opportunity zone investments and 1031 exchanges defer or exclude gain in specific situations.

Losses are not netted here, because the page prices one gain. A real return offsets short-term losses against short-term gains first and then the other type, allows up to $3,000 of remaining net loss against ordinary income each year, and carries the rest forward.

State treatment sits outside the model too, and a few states tax gains as ordinary income with no preferential rate at all. This is one federal gain priced carefully, which is why it is a planning estimate rather than a return.

Worked examples

Each example below was run through the calculator on this page when the site was built, so the numbers match what you see when you enter the same inputs.

$50,000 long-term gain on top of $60,000 of income

Capital gain: $50,000.00 · Holding period: More than a year (long term) · Filing status: Single · Ordinary taxable income: $60,000.00

Tax on a $50,000 long-term gain

$7,500.00

$7,500.00 of capital gains tax

Capital gains tax: $7,500.00 · Net investment income tax on this gain: $0.00 · Effective rate on the gain: 15% · After-tax gain: $42,500.00

Ordinary income already fills the 0% band, so the whole gain sits in the 15% band even though the gain itself is modest.

The same $50,000 held for six months

Capital gain: $50,000.00 · Holding period: A year or less (short term) · Filing status: Single · Ordinary taxable income: $60,000.00

Tax on a $50,000 short-term gain

$11,086.00

$11,086.00 of capital gains tax

Capital gains tax: $11,086.00 · Net investment income tax on this gain: $0.00 · Effective rate on the gain: 22.2% · After-tax gain: $38,914.00

Ordinary rates apply to a short-term gain, which is why the holding period matters more than the size of the gain.

$300,000 gain with $150,000 of ordinary income

Capital gain: $300,000.00 · Holding period: More than a year (long term) · Filing status: Single · Ordinary taxable income: $150,000.00 · Other investment income: $8,000.00

Tax on a $300,000 long-term gain

$55,415.80

$45,000.00 of capital gains tax plus $10,415.80 of net investment income tax on this gain

Capital gains tax: $45,000.00 · Net investment income tax on this gain: $10,415.80 · Effective rate on the gain: 18.5% · After-tax gain: $244,584.20

Modified AGI clears the $200,000 threshold, so a slice of the gain is charged the extra 3.8% on top of the 15% and 20% rates.

A long-term gain that stays inside the 0% band

Capital gain: $30,000.00 · Holding period: More than a year (long term) · Filing status: Single · Ordinary taxable income: $20,000.00

Tax on a $30,000 long-term gain

$82.50

$82.50 of capital gains tax

Capital gains tax: $82.50 · Net investment income tax on this gain: $0.00 · Effective rate on the gain: 0.3% · After-tax gain: $29,917.50

The $20,000 of ordinary income leaves $29,450 of room inside the $49,450 single 0% band, so that much of the gain is tax free and only the last $550 is charged 15%.

Frequently asked questions

What are the 2026 capital gains rates?

0%, 15% and 20% for gains on assets held more than a year. For single filers the 15% rate starts above $49,450 of taxable income and 20% above $545,500. Joint filers get $98,900 and $613,700, heads of household $66,200 and $579,600.

How long do I have to hold an asset?

More than one year. The holding period starts the day after you acquire the asset and ends on the day you sell it, so a purchase on 3 March 2025 is long term from 4 March 2026 onwards.

Can I avoid capital gains tax completely?

Long-term gains inside the 0% band are not taxed at all, which is why realizing gains up to the top of the band each year is a common strategy. Selling at a loss, charitable donations of appreciated stock and the main home exclusion also remove or defer tax.

Is the net investment income tax the same as capital gains tax?

No. It is a separate 3.8% surtax on the smaller of net investment income or modified AGI above $200,000 single and $250,000 joint. It is charged on top of whatever capital gains rate already applies.

Do short-term losses offset long-term gains?

Losses offset gains of the same type first, then the other type. After that, up to $3,000 of net loss can reduce ordinary income each year, and anything left carries forward to future years.

Does selling my main home trigger this tax?

Usually not. Up to $250,000 of gain is excluded for a single filer and $500,000 for a joint return when the home was owned and used as a main residence for two of the five years before the sale. Above that the remaining gain is taxed at long-term rates.

Assumptions and sources

  • Long-term capital gains brackets for 2026: IRS Revenue Procedure 2025-32, verified against the official source and kept on record. 15% begins above $49,450 (single), $98,900 (married filing jointly) and $66,200 (head of household); 20% begins above $545,500, $613,700 and $579,600 respectively.
  • Ordinary income brackets used for short-term gains: the same Revenue Procedure, reproduced in the income tax calculation on this site.
  • Net investment income tax: IRS Topic no. 559 and Form 8960 - 3.8% on the lesser of net investment income or modified AGI above $200,000 for single and head of household filers and $250,000 for married filing jointly. The thresholds are not indexed for inflation.
  • Simplifications: modified AGI is estimated by adding the standard deduction back to taxable income; state capital gains treatment, the main home exclusion, loss carryforwards, opportunity zones, 1031 exchanges and the qualified small business stock exclusion are all outside this calculator.

Last reviewed 2026-10-09. An estimate, not a return, and not tax advice. Read the full disclaimer.

Where a figure on this page comes from an official agency — HUD, IRS, FICO or a state body — the site keeps a dated snapshot of the source page in its sources library, and a scheduled job re-checks that snapshot, so the number can be traced back to the document it came from.