Capital Gains Tax Calculator

Estimate the federal tax on selling a stock, fund, or other asset — with 2026 long-term rates (0/15/20%), short-term ordinary rates, and the 3.8% NIIT for higher earners.

$
What you sold the asset for.
$
What you originally paid, including commissions.
$
Your wages and other income, before this sale. Sets which rate band the gain falls into.
2026 brackets.
Long-term gets the preferential 0/15/20% rates.
Total tax on the sale
$0
Capital gain
$0
Rate applied
Federal capital gains tax
$0
Net Investment Income Tax (3.8%)
$0
Effective rate on gain
0%
After-tax proceeds from gain
$0

Enter a sale price above your cost basis to see the tax.

Federal estimate only — excludes state tax. Not tax advice.

How this capital gains tax calculator works

When you sell an asset — stock, a fund, crypto, or property — for more than you paid, the profit is a capital gain, and the IRS taxes it. How much you owe depends on two things: how long you held the asset and how much other income you have. This calculator estimates your federal tax by combining both, and adds the 3.8% Net Investment Income Tax when it applies.

Your gain is simply the sale price minus your cost basis (what you originally paid, including commissions). The calculator then applies the right rate depending on whether the gain is long-term or short-term, and shows your after-tax proceeds.

Long-term vs. short-term: the one-year line

The single biggest factor in your capital gains tax is the holding period. Hold an asset for more than one year and the profit is a long-term gain, taxed at preferential rates of 0%, 15%, or 20%. Hold it for one year or less and it is a short-term gain, taxed as ordinary income at your regular marginal rate — which for many people is 22%, 24%, or higher. Selling even a day past the one-year mark can dramatically cut the tax, which is why the holding period matters so much.

2026 long-term capital gains rates

Long-term rates are not flat — the rate you pay depends on your total taxable income, and the gain stacks on top of your other income. For the 2026 tax year, a single filer pays:

Married-filing-jointly thresholds are higher ($98,900 and $613,700). Because the gain fills these bands on top of your other taxable income, a single sale can be partly taxed at 0% and partly at 15% — this calculator handles that band-by-band split for you.

The 3.8% Net Investment Income Tax (NIIT)

Higher earners owe an extra 3.8% NIIT on investment income, including capital gains. It kicks in when modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly), and applies to the lesser of your net investment income or the amount over that threshold. The result is that some investors face an effective long-term rate of 18.8% or 23.8% rather than 15% or 20%. The calculator adds this automatically when your income crosses the line.

What this calculator does not include

To stay clear and broadly accurate, this tool estimates federal capital gains tax on a single sale. It does not model state capital gains tax (most states tax gains as ordinary income), the special 28% rate on collectibles, Section 1250 depreciation recapture on real estate, the home-sale exclusion, wash-sale rules, or the offsetting of gains with capital losses. For a sale with any of these features, or before making a decision, consult a tax professional and verify current rules at IRS Topic No. 409.

Planning a sale of vesting equity instead? Our RSU tax calculator handles the supplemental-withholding side, and the retirement calculator shows how tax-advantaged accounts let gains compound without an annual tax drag.

Frequently asked questions

What is the difference between long-term and short-term capital gains?
It is about how long you held the asset. Hold it more than one year and the profit is a long-term gain, taxed at the preferential 0%, 15%, or 20% rate. Hold it one year or less and it is a short-term gain, taxed as ordinary income at your regular marginal rate, which is usually higher.
How are 2026 long-term capital gains rates determined?
The rate depends on your total taxable income. For 2026 a single filer pays 0% on long-term gains while taxable income stays under $49,450, 15% up to $545,500, and 20% above that. The gain stacks on top of your other taxable income, so part of it can fall in more than one band.
What is the 3.8% Net Investment Income Tax (NIIT)?
The NIIT is an extra 3.8% tax on investment income, including capital gains, for higher earners. It applies to the lesser of your net investment income or the amount your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly). It is on top of the regular capital gains tax.
Does this calculator include state capital gains tax?
No. This tool estimates federal capital gains tax only. Most states also tax capital gains, usually as ordinary income at the state rate, and a few have no income tax at all. Check your state's rules for the full picture.
How can I reduce capital gains tax?
Common strategies include holding assets longer than a year to get long-term rates, harvesting losses to offset gains, using tax-advantaged accounts like IRAs and 401(k)s, and timing sales for a year when your income is lower. This tool is informational; consult a tax professional for your situation.

Related calculators & guides