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

?Enter your cost basis.
?The price you sold the asset for.
?How many years you plan to own the home before selling it.
?Enter your ordinary taxable income.
End of inputs

Your Capital Gains Tax Estimate

Capital Gain
$50,000.00

Long-term

Total Tax
$7,500.00

ST + LT + NIIT

Short-Term Tax
$0.00

Ordinary rates

Long-Term Tax
$7,500.00

0/15/20% rates

NIIT
$0.00

3.8% surtax

Net Proceeds
$92,500.00

After tax

Effective Rate
15.00%

Total tax ÷ gain

Marginal LTCG Rate
15.00%

Top LTCG bracket

Cost basis: $50,000.00. Sale price: $100,000.00. Gain: $50,000.00 (Long-term). Holding period: 18 months. Ordinary income: $95,000.00. Filing status: Single. Short-term tax: $0.00. Long-term tax: $7,500.00. NIIT: $0.00. Total tax: $7,500.00 (15.00% effective). Net proceeds: $92,500.00.
Where Your Sale Proceeds Go
Key Insights
Your $50,000.00 gain is classified as long-term because you held the asset for 18 months (more than 1 year). Long-term gains are taxed at preferential rates of 0%, 15%, or 20% — significantly lower than ordinary income rates. This saves you money compared to selling before the 1-year mark.
You held the asset for 18 months — just past the 1-year threshold that unlocks long-term rates. This timing saved you from the higher short-term (ordinary) rates. In the future, consider holding well past 12 months to avoid edge cases near the cutoff, and note that the holding period is measured from the day after acquisition to the sale date.
Your long-term gains are taxed at the 15% rate — the most common LTCG bracket for middle-to-upper income filers. On a $50,000.00 gain, the long-term portion of your tax is $7,500.00. This 15% rate is well below the ordinary income rates (up to 39.6%), which is why holding assets over 1 year is so valuable.
Your total capital gains tax of $7,500.00 is 15.00% of your $50,000.00 gain — a moderate burden. This is typical when the 15% long-term rate applies. You keep $92,500.00 after tax from the sale. Holding assets longer than 1 year is the key reason this rate stays below ordinary income rates.
The Net Investment Income Tax (NIIT) does not apply because your modified adjusted gross income is below the threshold ($200,000 for single, $250,000 for married filing jointly). You avoid the additional 3.8% surtax on investment income. High earners should plan sales carefully, as a large gain can push MAGI over the threshold and trigger the NIIT.

Guide

How to Use This Calculator

  1. 1Enter the Cost Basis — the original purchase price of the asset plus any acquisition costs (commissions, fees).
  2. 2Enter the Sale Price — the amount you received (or expect to receive) from selling the asset.
  3. 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.
  4. 4Enter your Ordinary Taxable Income — your non-gain income (wages, interest, etc.) for the year, which determines your LTCG bracket.
  5. 5Select your Filing Status (Single or Married Filing Jointly) — this affects the bracket thresholds.
  6. 6Review the Capital Gain metric, which shows the realized gain (sale price − cost basis) and whether it's long-term or short-term.
  7. 7Check the Total Tax metric, which combines short-term tax, long-term tax, and NIIT into one figure.
  8. 8Examine the Effective Rate and Marginal LTCG Rate to understand how much of your gain goes to tax.
  9. 9Read the AI insights for personalized guidance on your gain type, tax burden, LTCG rate tier, NIIT impact, and holding period.
  10. 10Adjust inputs to compare scenarios — try shortening the holding period to see how short-term rates increase the tax.
Formula

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.
Glossary

Key Terms

FAQ

Frequently Asked Questions

Scenario Calculators

Related Calculators