DDanfio

Capital Gains Tax Calculator

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.

$

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.

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
$0.00
Effective rate on the gain
15%
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$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, so above-the-line deductions and other income are not captured exactly. Check the figure against your return before relying on it.

This gain is taxed at an effective 15%. Realising 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.

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 couple filing jointly or $66,200 for a head of household. Above that the rate is 15%, and 20% applies above $545,500 single, $613,700 joint or $579,600 head of household.

The bands are measured in total taxable income, not in gain. A single filer with $60,000 of taxable income from wages has no room in the 0% band at all, so the first dollar of gain is taxed at 15%.

Short-term gains are ordinary income

Holding a position for a year or less means the gain is added to wages and taxed through the ordinary brackets. 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 ends on the day of sale. It has to exceed one year, so buying on 3 March and selling on 3 March the following year is still short term.

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.

The tax applies to capital gains, dividends, interest and rent, but not to wages or to income from an active business. It is reported on Form 8960 and charged on top of the capital gains rate.

What is excluded

The main home exclusion removes up to $250,000 of gain from a sale, or $500,000 for a joint return, when you owned and lived in the property 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 offset gains: short-term losses come off short-term gains first, then long-term gains, and up to $3,000 of remaining net loss can reduce ordinary income each year with the rest carried forward.

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
$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
$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

Capital gains tax
$45,000.00
Net investment income tax
$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.

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 realising 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. 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 engine 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-09-14. This page is an estimate tool, not financial, tax or legal advice.Read the full disclaimer.