Tax Calculators

Capital Gains Tax Calculator

Estimate the federal tax on selling stock, a home or other assets in 2026 — long-term gains at 0%, 15% or 20%, short-term gains at your income-tax rate, plus the 3.8% NIIT.

2026 capital gains thresholds and brackets from the IRS Last checked How we calculate

Inputs
$
$

Estimates only. Adjust any value to recalculate instantly.

Results
Estimated federal tax on the gain $3,000 15.0% of a $20,000 long-term gain
Capital gains tax $3,000 $0 at 0%, $20,000 at 15%, $0 at 20%
Net investment income tax $0 3.8% above $200k / $250k
Effective rate on gain 15.0%
You keep $17,000
Your gain after federal tax
Your gain after federal tax You keep: $17kCapital gains / income tax: $3.0kNIIT: $0
  • You keep $17k
  • Capital gains / income tax $3.0k
  • NIIT $0

Long-term gains stack on top of your other taxable income: the part that falls under the $49,450 threshold is taxed at 0%, then 15% up to $545,500, then 20%. State tax, if any, is extra; NIIT uses taxable income as an approximation of MAGI.

How the capital gains tax calculator works

For long-term gains it stacks the gain on top of your other taxable income and taxes each slice at the 2026 0%, 15% and 20% rates for your filing status. Short-term gains are taxed as ordinary income using the 2026 brackets. It then adds the 3.8% net investment income tax on the portion above $200,000 (single) or $250,000 (joint).

Worked example

Worked example: with taxable income before the gain of $80,000 and capital gain of $20,000, the capital gains tax calculator shows estimated federal tax on the gain of $3,000.

Capital gains tax
$3,000
Net investment income tax
$0
Effective rate on gain
15.0%
You keep
$17,000
How it scales
Capital gainEstimated federal tax on the gain
$5,000$750
$20,000$3,000
$50,000$7,500
$100,000$15,000
$250,000$42,440

The formula

Long-term tax = slice under the 0% threshold × 0 + slice up to the 15% ceiling × 15% + remainder × 20%. Short-term tax = tax(income + gain) − tax(income). NIIT = 3.8% × min(gain, income + gain − threshold).

Results are estimates for educational purposes and are not financial advice. Confirm exact figures with your lender, plan administrator or advisor.

Embed this calculator — free Get the code

Add the live capital gains tax calculator to your own site. Free to use — just keep the credit link. It resizes itself automatically.

By embedding you agree to keep the visible attribution link to FinCalculators.net. See all embeddable calculators →

Frequently asked

Questions about the capital gains tax calculator

What are the 2026 capital gains tax rates?

Long-term gains are taxed at 0% up to $49,450 of taxable income for single filers ($98,900 married filing jointly), 15% up to $545,500 ($613,700), and 20% above that.

How are short-term capital gains taxed?

Assets held one year or less are taxed as ordinary income at your regular bracket, which can be as high as 37%. Holding past one year qualifies for the lower long-term rates.

What is the 3.8% net investment income tax?

An extra 3.8% applies to investment income when modified AGI exceeds $200,000 (single) or $250,000 (married filing jointly). These thresholds are not indexed for inflation.

Is the Capital Gains Tax Calculator free to use?

Yes. Every calculator on FinCalculators is completely free, with no sign-up, login or paywall. You can run as many scenarios as you like.

Reference data
Related calculators
1040 Tax Calculator (Tax Year 2025) Estimate your 2025 federal income tax. Enter your income, filing status and deductions to see your tax, effective rate and refund or balance due.
1040 Tax Calculator (Tax Year 2017) Estimate your 2017 federal income tax. Enter your income, filing status, deductions and exemptions to see your tax, effective rate and refund or balance due.
1040 Tax Calculator (Tax Year 2016) Estimate your 2016 federal income tax. Enter your income, filing status, deductions and exemptions to see your tax, effective rate and refund or balance due.
Sales Tax Calculator Add sales tax to a price, or work backwards to remove it from a tax-inclusive total.
Mileage Reimbursement Calculator Multiply your miles by the 2026 IRS standard rate to find your deduction or reimbursement for business, medical or charitable driving.
1040 Tax Calculator (Tax Year 2026) Estimate your 2026 federal income tax. Enter your income, filing status and deductions to see your tax, effective rate and refund or balance due.