Capital Gains Tax Calculator: Short or Long Term

Use this capital gains tax calculator to estimate tax owed on stocks, real estate, or crypto. Applies federal short- and long-term capital gains rates with optional state add-on, so you see real after-tax profit.

$
$
%
Capital gain / loss$0
Tax owed$0
Net proceeds after tax$0
Effective return after tax0%
Advertisement  ·  728 × 90

How this calculator works

Capital gain = Sale Price − Cost Basis (purchase price + commissions/fees). Tax owed = Capital Gain × Tax Rate (if gain > 0; losses produce $0 tax).

Short-term capital gains (held 1 year or less) are taxed as ordinary income at your marginal federal rate: 10%, 12%, 22%, 24%, 32%, 35%, or 37% depending on taxable income.

Long-term capital gains (held more than 1 year) are taxed at preferential rates:

  • 0% — taxable income up to $47,025 (single) / $94,050 (married filing jointly) in 2024
  • 15% — taxable income $47,026–$518,900 (single) / $94,051–$583,750 (MFJ) in 2024
  • 20% — taxable income above those thresholds

Net Investment Income Tax (NIIT): High earners may owe an additional 3.8% on investment income if modified AGI exceeds $200,000 (single) or $250,000 (MFJ). This calculator does not include NIIT.

Source: IRS Topic No. 409 — Capital Gains and Losses and IRS Revenue Procedure 2023-34 (2024 inflation adjustments for tax brackets).

FAQ

How is capital gains tax calculated?
Capital gain = Sale Price − Cost Basis. Tax owed = gain × rate. Short-term (≤1 year) is taxed as ordinary income at your marginal bracket (10–37%); long-term (>1 year) is taxed at preferential rates of 0%, 15%, or 20% depending on income.
What is the capital gains tax on sale of property in California?
California taxes capital gains as ordinary income at the state level — up to 13.3% — with no preferential rate. Combined with federal long-term rates (15% or 20%) and 3.8% NIIT, the all-in rate can hit 37% in California. The federal Section 121 exclusion ($250K/$500K) still applies for primary residences.
How can I reduce capital gains tax?
Key strategies: hold over 1 year for long-term rates; tax-loss harvesting (offset gains with losses); use 401k/Roth IRA for investments to avoid the tax entirely; donate appreciated assets to charity instead of selling.
What's the difference between short-term and long-term capital gains tax?
Holding period is the only thing that matters. Sell at ≤364 days → short-term, taxed at your full ordinary income bracket (up to 37%). Sell at ≥366 days → long-term, taxed at the preferential 0/15/20% schedule. On a $50,000 gain, the difference between 22% short-term and 15% long-term is $3,500 saved.
Do I pay capital gains tax on my home sale?
If you lived in the home 2 of the last 5 years, the Section 121 exclusion shields up to $250,000 of gain (single) or $500,000 (married) from tax. Gains above that are taxed at long-term rates.
How is capital gains tax calculated on stocks?
Same formula as any asset: gain = sale price − cost basis. Brokers track cost basis automatically and report it on Form 1099-B. Held >1 year → 0/15/20%. Held ≤1 year → ordinary income rate. Wash-sale rules disallow losses if you re-buy within 30 days.
What is the difference between realized and unrealized gains?
Unrealized gain = paper profit, no tax owed yet. Realized gain = you sold the asset, tax is triggered. You control the timing of when a gain becomes taxable by choosing when to sell.
Advertisement  ·  728 × 90

Browse capital gains tax by state

Related calculators

Learn more on the blog

Advertisement  ·  responsive horizontal