Capital Gains Tax Calculator

Calculate your short-term and long-term capital gains tax for 2024/2025. Enter your filing status, ordinary income, and investment gains to see your total tax liability, effective rate, and bracket-by-bracket breakdown.

$
$
$
Enter your income and capital gains to see your tax estimate.

How Capital Gains Tax Works

When you sell an asset for more than you paid for it, the profit is called a capital gain and is subject to tax. The rate you pay depends on two key factors: how long you held the asset and your taxable income. Assets held for one year or less generate short-term gains taxed at ordinary income rates (up to 37%). Assets held longer qualify for lower long-term capital gains rates (0%, 15%, or 20%).

Short-Term vs Long-Term Capital Gains Tax Rates

Short-Term Capital Gains (Held ≤ 1 Year)

Short-term gains are added to your ordinary income and taxed at the same marginal rates as your wages and salary. For 2024, these rates range from 10% to 37%. If you're in the 32% marginal bracket, your short-term gains will also be taxed at 32%.

Long-Term Capital Gains (Held > 1 Year)

Long-term gains benefit from preferential tax rates. For 2024, the long-term capital gains brackets are:

Filing Status0% Rate15% Rate20% Rate
Single$0 – $47,025$47,026 – $518,900Over $518,900
Married Filing Jointly$0 – $94,050$94,051 – $583,750Over $583,750
Head of Household$0 – $63,000$63,001 – $551,350Over $551,350

Additional Medicare Tax / NIIT

High-income taxpayers may owe an additional Net Investment Income Tax (NIIT) of 3.8% on the lesser of their net investment income or the amount their modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly). This calculator includes NIIT in the total capital gains tax estimate.

Tax-Loss Harvesting Strategy

Tax-loss harvesting is a strategy where you sell investments at a loss to offset capital gains. Losses first offset gains of the same type (short-term losses offset short-term gains first), then offset gains of the other type. Up to $3,000 of net losses can be deducted against ordinary income each year, with remaining losses carried forward.

Capital Gains Tax Optimization Tips

  • Hold assets longer than one year to qualify for lower long-term rates
  • Tax-loss harvest by selling underperforming assets to offset gains
  • Consider tax-advantaged accounts like 401(k)s and IRAs where gains can grow tax-deferred
  • Time your sales to years when your income is lower (e.g., between jobs, early retirement)
  • Gift appreciated assets to family members in lower tax brackets or to charity
  • Use the 0% bracket if your income is below the threshold

Key Exclusions and Special Rules

  • Primary residence exclusion: Up to $250,000 ($500,000 for married couples) of gain from selling your primary home may be excluded if you've lived in it for 2 of the last 5 years.
  • Collectibles: Gains from collectibles (art, antiques, coins, precious metals) are taxed at a maximum 28% rate.
  • Qualified Small Business Stock (QSBS): Under Section 1202, up to $10 million or 10x your basis in qualified small business stock may be excluded.
  • Section 1031 exchanges: Real estate investors can defer capital gains by using like-kind exchanges for investment properties.

State Capital Gains Taxes

Most states tax capital gains as ordinary income, with rates varying from 0% (no income tax states) to over 13% (California). This calculator estimates only federal taxes. Be sure to consult a tax professional for your state-specific obligations.

Sources and References

  • IRS Publication 550 — Investment Income and Expenses
  • IRS Topic No. 409 — Capital Gains and Losses
  • IRS Revenue Procedure 2023-34 (2024 tax brackets)
  • IRS.gov — Net Investment Income Tax (NIIT) FAQs

Frequently Asked Questions

What is the difference between short-term and long-term capital gains?
Short-term capital gains are profits from assets held for one year or less and are taxed at your ordinary income tax rates (up to 37%). Long-term capital gains are profits from assets held for more than one year and are taxed at preferential rates of 0%, 15%, or 20%, depending on your taxable income. Holding assets longer than one year can significantly reduce your tax burden.
What is the Net Investment Income Tax (NIIT)?
The Net Investment Income Tax (NIIT) is an additional 3.8% tax on the lesser of your net investment income or the amount your modified adjusted gross income exceeds a threshold ($200,000 for single filers, $250,000 for married filing jointly). This applies to capital gains, dividends, interest, and other investment income for higher-income taxpayers.
How do I know if I'm in the 0% long-term capital gains bracket?
For 2024, single filers with taxable income up to $47,025 pay 0% on long-term capital gains. Married filing jointly: up to $94,050. Head of household: up to $63,000. This means if your total taxable income (including gains) falls within these thresholds, your long-term capital gains tax rate is zero.
Can capital losses offset capital gains?
Yes. Capital losses can be used to offset capital gains. If your losses exceed your gains, you can deduct up to $3,000 ($1,500 if married filing separately) against other income. Any remaining losses can be carried forward to future tax years indefinitely.
Do I pay state tax on capital gains?
Yes, most states tax capital gains as ordinary income. A few states have no income tax (Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, Washington, Wyoming). This calculator focuses on federal taxes only. Consult a tax professional for state-specific rates.
How are cryptocurrency gains taxed?
The IRS treats cryptocurrency as property, so capital gains rules apply. Selling, trading, or spending crypto for goods/services triggers a taxable event. Holding periods and rates follow the same short-term/long-term rules as stocks and other investments. Mining income and staking rewards may be taxed as ordinary income.

Related Tools