Capital Gains Tax Calculator (2026)

Calculate federal capital gains tax for stocks, crypto, and real estate. Includes LTCG rates, NIIT, state tax, and primary residence exclusion for 2026.

$
$
$
Capital Gain
Applicable Tax Rate
Tax Owed
Net After Tax
Extended More scenarios, charts & detailed breakdown
$
$
$
$
Adjusted Capital Gain
Tax Rate
Tax Owed
Net After Tax
Professional Full parameters & maximum detail
$
$
$
$
%
$
$
Adjusted Capital Gain
Federal Capital Gains Tax
State Capital Gains Tax
NIIT (3.8%)
Total Tax Owed
Effective Tax Rate on Gain
Net After All Taxes
Note: Hold 1+ year to save

How to Use This Calculator

  1. Enter the Purchase Price (cost basis) and Sale Price of your asset.
  2. Select whether your holding period is short-term (1 year or less) or long-term (over 1 year).
  3. Enter your filing status and taxable income to determine which rate bracket applies.
  4. Use the Real Estate tab to apply the primary residence exclusion.
  5. Use the Professional tab for state tax, NIIT, and loss harvesting offsets.

Formula

Capital Gain = Sale Price − Adjusted Cost Basis
Long-Term Tax = Gain × LTCG Rate (0%, 15%, or 20%)
Short-Term Tax = Gain × Ordinary Income Rate
NIIT = Gain × 3.8% (if MAGI > $200K single / $250K married)

Example

Example: You bought stock for $10,000 and sold for $25,000 after 2 years. Gain = $15,000. With taxable income of $90,000 (single), the 15% LTCG rate applies. Federal tax = $15,000 × 15% = $2,250. Net proceeds = $22,750.

Frequently Asked Questions

  • For 2026, long-term capital gains rates are 0% (single filers with taxable income up to $48,350), 15% (up to $533,400), and 20% (above $533,400). Married filing jointly thresholds are $96,700, $600,050, and above.
  • The Net Investment Income Tax (NIIT) is an additional 3.8% tax on investment income including capital gains. It applies to single filers with MAGI above $200,000 and married filers above $250,000.
  • If you owned and lived in the home for at least 2 of the last 5 years, you can exclude up to $250,000 of gain (single) or $500,000 (married filing jointly) from capital gains tax.
  • Assets held 1 year or less are taxed as ordinary income (short-term). Assets held more than 1 year qualify for preferential long-term rates of 0%, 15%, or 20%.

Related Calculators

Sources & References (5)
  1. IRS — Topic 409: Capital Gains and Losses — Internal Revenue Service
  2. IRS — Publication 550: Investment Income and Expenses — Internal Revenue Service
  3. Tax Foundation — Capital Gains Tax Rates — Tax Foundation
  4. IRS — Net Investment Income Tax (Topic 559) — Internal Revenue Service
  5. IRS — Schedule D Instructions — Internal Revenue Service