Capital Gains Tax Calculator

Estimate federal tax on a stock, crypto or fund sale and see the difference between short-term and long-term treatment, including the 3.8% net investment income tax.

Your numbers

Long-term capital gains tax$6,000
Short-term tax (ordinary rates)
$9,286
Savings from holding over 1 year
$3,286
Net investment income tax
$0.00
Gain taxed at 0% / 15% / 20%
0 / 40,000 / 0
Tax on this gain
$0$2.5K$5K$7.5K$10KLong-termShort-termTax · Long-term: $6,000Tax · Short-term: $9,286
  • Long-term
  • Short-term

How the capital gains tax calculator works

Long-term gains stack on top of ordinary income and are taxed at 0%, 15% or 20% depending on taxable income. Short-term gains are taxed at ordinary brackets. NIIT of 3.8% applies above $200,000 (single) or $250,000 (joint) MAGI.

Example

Using the default inputs (Capital gain: $40,000; Other taxable income: $90,000; Filing status: Single), the calculator returns long-term capital gains tax of $6,000. Change any field above to see your own result and charts update instantly.

Good for these goals

Frequently asked questions

How long must I hold for long-term rates?

More than one year.

Can I avoid gains tax?

Use tax-advantaged accounts, harvest losses, donate appreciated shares or time sales in lower-income years.

Related taxes calculators

All Taxes →

Estimates are for educational purposes only and are not financial, tax or legal advice. Results depend on your inputs and simplified assumptions; tax figures reflect 2026 federal rules and may differ from your situation. See our disclaimer. © 2026 FinanzCalc.