Capital Gains Tax Calculator
A capital gains tax calculator is a free online tool that estimates the federal tax on your investment sale, including short-term rates, long-term preferential rates, and the 3.8% NIIT. It shows your total tax, effective rate, and net proceeds. Free, no sign-up required.
Investment Sale Details
Your Capital Gains Tax Estimate
Long-term
ST + LT + NIIT
Ordinary rates
0/15/20% rates
3.8% surtax
After tax
Total tax ÷ gain
Top LTCG bracket
How to Use This Calculator
- 1Enter the Cost Basis — the original purchase price of the asset plus any acquisition costs (commissions, fees).
- 2Enter the Sale Price — the amount you received (or expect to receive) from selling the asset.
- 3Set the Holding Period in months — the time from acquisition to sale. Over 12 months qualifies as long-term; 12 or fewer is short-term.
- 4Enter your Ordinary Taxable Income — your non-gain income (wages, interest, etc.) for the year, which determines your LTCG bracket.
- 5Select your Filing Status (Single or Married Filing Jointly) — this affects the bracket thresholds.
- 6Review the Capital Gain metric, which shows the realized gain (sale price − cost basis) and whether it's long-term or short-term.
- 7Check the Total Tax metric, which combines short-term tax, long-term tax, and NIIT into one figure.
- 8Examine the Effective Rate and Marginal LTCG Rate to understand how much of your gain goes to tax.
- 9Read the AI insights for personalized guidance on your gain type, tax burden, LTCG rate tier, NIIT impact, and holding period.
- 10Adjust inputs to compare scenarios — try shortening the holding period to see how short-term rates increase the tax.
How It's Calculated
Capital gains tax:
gain = salePrice − costBasis
isLongTerm = holdingPeriodMonths > 12
Short-term gains (held ≤ 1 year):
Taxed at ordinary marginal income rate (up to 39.6%).
Long-term gains (held > 1 year):
Taxed at 0% / 15% / 20% based on total income (stacked on ordinary):
Single: 0% ≤ $48,000 | 15% ≤ $533,000 | 20% above
Married Joint: 0% ≤ $96,000 | 15% ≤ $600,000 | 20% above
NIIT (Net Investment Income Tax):
3.8% on the lesser of investment income or MAGI over threshold.
Threshold: $200,000 (single) / $250,000 (married filing jointly).
totalTax = shortTermTax + longTermTax + niit
effectiveRate = totalTax / gain
netProceeds = salePrice − totalTax
Example: $50,000 cost basis, $100,000 sale price, 18-month holding
(long-term), single, $95,000 ordinary income.
gain = $100,000 − $50,000 = $50,000
Long-term gains stacked on $95,000 ordinary income → 15% bracket.
longTermTax = 15% × $50,000 = $7,500
MAGI = $95,000 + $50,000 = $145,000 < $200,000 → NIIT = $0
totalTax = $7,500. effectiveRate = 15.00%.
netProceeds = $100,000 − $7,500 = $92,500.
Example: Same sale but held only 8 months (short-term).
shortTermTax = ordinary marginal rate (25%) × $50,000 = $12,500
totalTax = $12,500. effectiveRate = 25.00%.
Holding 5 months longer (past 12) saves $5,000 in tax.Key Terms
Frequently Asked Questions
Scenario Calculators
How Much Tax on $100,000 Capital Gains?
Calculate the capital gains tax on $100,000 in stock, crypto, or real estate profits. See short-term vs long-term rates for 2026.
Open calculator →Capital Gains Tax Calculator for Home Sale (Section 121)
Calculate capital gains tax when selling your primary residence. See Section 121 exclusion, adjusted basis, and taxable gain.
Open calculator →California Investment Gains Tax Calculator
Calculate California capital gains tax on stocks, crypto, and real estate. California taxes capital gains as ordinary income up to 13.3%.
Open calculator →Related Calculators
Income Tax Calculator
Estimate your federal income tax with 2026 brackets, standard deduction, marginal and effective rates.
Property Tax Calculator
Estimate annual property taxes by state and county. See effective tax rates and compare states side by side.
Self-Employment Tax Calculator
Calculate self-employment tax (12.4% Social Security + 2.9% Medicare) plus income tax for 1099 income.