Capital Gains Tax Calculator

Calculate taxes on investment profits. Compare short-term vs. long-term capital gains rates using 2024 thresholds.

Investment Details

$
$
$

Your other taxable income for the year

Enter your investment details and click Calculate to estimate your capital gains tax.

Pro Tip

Hold investments for at least one year and one day to qualify for preferential long-term capital gains rates, which can save you thousands in taxes.

View Tax Brackets

Understanding Capital Gains Tax

Capital gains tax is levied on the profit from selling an asset such as stocks, bonds, real estate, or other investments. The tax rate depends on how long you held the asset and your overall taxable income.

Short-term capital gains (assets held one year or less) are taxed at your ordinary income tax rate, which can be as high as 37%. Long-term capital gains (assets held over one year) enjoy preferential rates of 0%, 15%, or 20% depending on your taxable income.

Capital losses can offset capital gains dollar-for-dollar. If your losses exceed your gains, you can deduct up to $3,000 per year ($1,500 if married filing separately) against ordinary income and carry forward any remaining losses to future years.

The Net Investment Income Tax (NIIT) of 3.8% may also apply if your modified AGI exceeds $200,000 (single) or $250,000 (married filing jointly). This calculator does not include the NIIT.

Capital Gains Tax Formula

Tax = (Sale Price - Purchase Price) × Applicable Rate

Where:

Capital Gain = Sale price minus purchase price (cost basis)

Short-Term Rate = Your ordinary income tax rate (10%-37%)

Long-Term Rate = 0%, 15%, or 20% based on income level

Example

Single filer, $85,000 income, sells stock held 2 years for $25,000 gain:

  • Total income with gain = $110,000
  • Income above 0% threshold ($47,025) = gain taxed at 15%
  • Capital gains tax = $25,000 x 15% = $3,750
  • Net proceeds = $75,000 - $3,750 = $71,250

Frequently Asked Questions

What qualifies as a long-term capital gain?
An asset held for more than one year qualifies for long-term capital gains rates. The holding period begins the day after you acquire the asset and ends on the day you sell or dispose of it.
Can capital losses offset capital gains?
Yes. Short-term losses first offset short-term gains, and long-term losses first offset long-term gains. Any excess loss of one type offsets gains of the other type. Up to $3,000 of net losses can offset ordinary income per year.
What is the 0% long-term capital gains rate?
For 2024, single filers with taxable income up to $47,025 and married filing jointly up to $94,050 pay 0% on long-term capital gains. This makes tax-gain harvesting attractive for lower-income years.
Are there additional taxes on investment income?
Yes. The Net Investment Income Tax (NIIT) adds 3.8% on investment income for individuals with MAGI above $200,000 (single) or $250,000 (married filing jointly). This calculator does not include the NIIT.