Capital Gains Tax Calculator: Tax Owed on an Investment Gain

Work out the tax owed on a realized capital gain, and see how much of the gain is left once the tax is paid.

✓ Editorially reviewed Updated May 17, 2026 By Ugo Candido
Percentage & Amount
The all-in rate — federal long-term rate, plus any surcharges and state tax that apply to you.
$
Sale proceeds minus cost basis. Enter the net gain, not the sale price.
Your estimate $—

Adjust the inputs and select Calculate for a full breakdown.

Compare Common Scenarios

How the numbers shift across typical situations for this calculator:

ScenarioCapital gains taxAfter-tax gain
20% on $50,00010,00040,000
15% on $10,0001,5008,500
23.8% on $250,00059,500190,500
32% on $8,0002,5605,440

How This Calculator Works

Enter the realized gain — sale proceeds less cost basis — and the all-in tax rate that applies to you. The calculator multiplies the two to give the tax owed and shows the after-tax gain.

The Formula

Percentage of an Amount

Result = Amount × Percentage / 100

Amount is the base value, Percentage is the rate applied to it

Worked Example

A $50,000 long-term gain taxed at 20% owes $10,000 in capital gains tax, leaving $40,000 after tax. The rate that applies depends on holding period, income bracket, and surcharges — be sure the rate you use matches your real-world situation.

Key Insight

Short-term gains — assets held a year or less in the US — are usually taxed as ordinary income, which can mean 35% or more for high earners. Holding past the one-year mark often more than halves the tax. The rate is the lever; the timing decision can be worth more than the trade.

Frequently Asked Questions

How is capital gains tax calculated?

Multiply the realized gain by the applicable tax rate. A 20% rate on a $50,000 long-term gain is $10,000 of tax. Short-term and long-term gains often use different rates.

What is the difference between short-term and long-term?

In the US, gains on assets held more than one year are long-term and taxed at preferential rates. Shorter holding periods are taxed as ordinary income, which is usually higher.

What rate should I use?

Long-term US federal rates are typically 0%, 15%, or 20% by income. Add the net investment income tax surcharge for high earners, plus any state tax that applies.

Are losses handled here?

No. Net losses against gains for the year before entering the figure. The calculator works on the net realized gain, not gross gains.

Does this cover home sales?

Partially. The math is the same, but primary residences often qualify for a sizeable exclusion before tax applies. Subtract any exclusion from the gain before entering it here.

Related Calculators

Methodology & Review

Ugo Candido ✓ Editor
Wrote this calculator and is responsible for its methodology and review.

Capital gains tax is the realized gain multiplied by the applicable tax rate. The calculator models a single flat rate; brackets, net investment income tax surcharges, state taxes, and offsetting losses are not separated — fold them into the effective rate you enter.

Written by Ugo Candido · Last updated May 17, 2026.