Capital Gains Tax Calculator

Federal tax on a 2026 stock, fund or property sale, with the 0%, 15% and 20% brackets, the 3.8% NIIT and loss savings.

Rates as of the 2026 tax year (IRS Rev. Proc. 2025-32)

$

Wages, interest and other income before deductions, not counting this sale.

$

Leave at 0 to use the 2026 standard deduction.

$

Purchase price plus fees and reinvested dividends.

$

Sale proceeds after commissions and fees.

How long you owned it

Federal tax on this gain

$3,000.00

Gain
$20,000
Gain taxed at 0%
$0
Gain taxed at 15%
$20,000
Gain taxed at 20%
$0
Net investment income tax (3.8%)
$0.00
Effective federal rate on the gain
15%
Profit after federal tax
$17,000
Taxable income including the sale
$83,900
You keep: 85.0%Federal tax: 15.0%
  • You keep$17,00085.0%
  • Federal tax$3,00015.0%

Federal only; most states tax capital gains as ordinary income. Collectibles, depreciation on real estate and the home-sale exclusion are not included.

How it works

A capital gain is what you sold something for minus what you paid, including fees. If you owned it for more than a year, the gain is long-term and taxed at 0%, 15% or 20%. If you owned it a year or less, it is short-term and taxed at the same rates as your wages.

Long-term gains are stacked on top of your other taxable income. Your deductions are used up by ordinary income first, then the part of the gain that fits under the 0% limit is tax-free, the part up to the 15% limit is taxed at 15%, and anything above that at 20%. That is why a gain can be partly tax-free even though the rest is taxed. The calculator figures the tax with and without the sale and shows the difference.

Higher earners also owe the 3.8% net investment income tax on the smaller of their investment income and the amount their modified AGI is over $200,000 ($250,000 married filing jointly, $125,000 married filing separately). These thresholds are set in law and are not adjusted for inflation. Other investment income such as dividends also counts toward it, so enter those in other income.

If you sold at a loss, up to $3,000 ($1,500 married filing separately) of net loss a year comes off your other income and the rest carries forward with no time limit. Selling losing positions before December 31 to offset gains is called tax-loss harvesting. Buying the same or a substantially identical investment within 30 days before or after the sale triggers the wash-sale rule and the loss is disallowed for now.

Formula

Tax on the gain = tax on (other income + gain) − tax on other income, with long-term gains taxed at 0%, 15% or 20% above ordinary taxable income, plus 3.8% × the smaller of the gain and (MAGI − NIIT threshold).

2026 long-term capital gains brackets

RateSingleMarried filing jointlyHead of householdMarried filing separately
0%up to $49,450up to $98,900up to $66,200up to $49,450
15%$49,450 – $545,500$98,900 – $613,700$66,200 – $579,600$49,450 – $306,850
20%over $545,500over $613,700over $579,600over $306,850

The limits apply to total taxable income, including the gain. Source: IRS Revenue Procedure 2025-32, section 4.03.

Sources

Questions people ask

What are the 2026 capital gains tax brackets?

Long-term gains are taxed at 0% while total taxable income is up to $49,450 single or $98,900 married filing jointly, 15% up to $545,500 single or $613,700 joint, and 20% above that. Head of household limits are $66,200 and $579,600.

How much tax do I pay on $20,000 of long-term gains?

It depends on your other income. A single filer with $80,000 of other income is already past the 0% limit after the standard deduction, so the whole $20,000 is taxed at 15%: $3,000 federal. With $40,000 of other income, part of it would be taxed at 0%.

How are short-term capital gains taxed?

Gains on assets held one year or less are added to your ordinary income and taxed at your regular bracket rates, from 10% to 37%.

How much of a capital loss can I deduct?

Losses first offset your capital gains. If losses are larger, up to $3,000 a year ($1,500 married filing separately) comes off other income, and the rest carries forward to future years.