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
- 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
- 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 →Self-Employment Tax
SE tax, income tax and quarterly payments
TaxesSales Tax
Add or remove sales tax from a price
TaxesMarginal vs Effective Tax Rate
See how your tax rate rises with income
TaxesFICA & Payroll Tax
Social Security and Medicare for employees and employers
TaxesTax Refund Estimator
Estimate refund or amount owed
TaxesStandard vs Itemized Deduction
Which deduction saves you more
Learn more
More Taxes guides →Capital Gains Taxes Explained
How capital gains are taxed in the US, with 0%, 15% and 20% long-term rates, the net investment income tax and ways…
TaxesTax-Loss Harvesting
Learn how tax-loss harvesting works, the wash sale rule and how losses offset gains and up to $3,000 of ordinary income.
TaxesYear-End Tax Planning Checklist
A practical year-end checklist covering retirement contributions, harvesting losses, charitable giving, HSAs and more.
Real Estate InvestingDepreciation Recapture and 1031 Exchanges
Understand the tax on selling rental real estate: capital gains, depreciation recapture and how a 1031 exchange can…
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.