CalcToolVault

Capital Gains Tax Calculator

Calculate short- and long-term capital gains tax, including the 3.8% net investment income tax and state tax.

Your details

$
$

Your situation

$
%
$

This calculator runs entirely on your device. Nothing you enter is uploaded, stored, or sold. How this works

Total capital gains tax

$7,500

15.00% of the $50,000 gain

Save these results

Includes your inputs, the full breakdown, and every row of the table.

Capital gain

$50,000

Federal tax

$7,500

15% long-term rate

Net investment income tax

$0

Below the threshold

Net proceeds after tax

$82,500

Breakdown
Sale proceeds
$90,000
Cost basis
- $40,000
Taxable gain
$50,000
Federal long-term tax
$7,500
Total tax
$7,500

What this means

  • Long-term rates are 0%, 15%, or 20% depending on total taxable income. The 0% bracket is real and underused — in a low-income year you can realize gains at no federal cost.
  • The 3.8% net investment income tax applies to investment income above $200,000 of modified AGI ($250,000 married filing jointly).

How the capital gains tax calculation works

Capital gains tax depends almost entirely on one thing: whether you held the asset more than a year. Short-term gains are taxed as ordinary income, up to 37% federally. Long-term gains get preferential rates of 0%, 15%, or 20%, determined by your total taxable income including the gain.

Two additions catch people off guard. The net investment income tax adds 3.8% once modified AGI passes $200,000 single or $250,000 joint. And gains stack on top of ordinary income when determining which long-term bracket applies, so a large sale can push part of the gain from the 15% band into the 20% band.

Frequently asked questions

How do I qualify for the 0% capital gains rate?

In 2025 a single filer with taxable income up to $48,350 (or $96,700 married filing jointly) pays 0% on long-term gains. Deliberately realizing gains in a low-income year — a gap year, early retirement, a sabbatical — resets your basis for free.

Do capital losses reduce my regular income?

Losses first offset gains of the same type, then the other type. Any remaining net loss can offset up to $3,000 of ordinary income per year, with the rest carried forward to future years indefinitely.

What is the wash sale rule?

If you sell at a loss and buy the same or a substantially identical security within 30 days before or after, the loss is disallowed and added to the basis of the replacement shares.

Related calculators

Spotted a problem, or want this calculator to do more?Corrections are fixed first, and the most-requested features get built next.Tell us →

Disclaimer. This calculator is provided for general information and educational purposes only and does not constitute financial, tax, legal, medical, or engineering advice. Results are estimates based on the inputs you provide and the assumptions described above. Confirm any figure with a qualified professional before acting on it.