Capital Gains Tax Calculator -- Estimator

Estimate federal capital gains taxes on stocks, crypto, and real estate

Capital Gains Tax Calculator

Estimate federal and state capital gains taxes on stocks, cryptocurrency, real estate, and other investments. Updated for the 2025 tax year with accurate long-term and short-term rates. All calculations run in your browser -- nothing is sent to any server.

How Capital Gains Tax Works

Short-Term vs. Long-Term

Assets held for one year or less generate short-term capital gains, taxed as ordinary income at rates up to 37%. Assets held longer than one year qualify for long-term capital gains rates: 0%, 15%, or 20%, depending on your total taxable income. This creates a strong tax incentive to hold investments for more than 365 days.

How the Tax is Calculated

Capital gain = Sale price minus purchase price (cost basis). The gain is added to your taxable income. Long-term gains use special brackets separate from ordinary income. Short-term gains are stacked on top of your regular income and taxed at your marginal rate.

Net Investment Income Tax (NIIT)

High earners pay an additional 3.8% NIIT on investment income including capital gains. The threshold is $200,000 for single filers, $250,000 for married filing jointly, and $125,000 for married filing separately. The NIIT applies to the lesser of your net investment income or the amount your MAGI exceeds the threshold.

State Capital Gains Taxes

Most states tax capital gains as ordinary income at the state's income tax rate. A few states (Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, Wyoming) have no income tax and thus no capital gains tax. New Hampshire taxes only dividends and interest, not capital gains.

2025 Long-Term Capital Gains Tax Rates

Long-term capital gains benefit from preferential tax rates. The rate depends on your total taxable income and filing status.

Rate Single Married Filing Jointly Head of Household Married Filing Separately
0% Up to $48,350 Up to $96,700 Up to $64,750 Up to $48,350
15% $48,351 - $533,400 $96,701 - $600,050 $64,751 - $566,700 $48,351 - $300,000
20% Above $533,400 Above $600,050 Above $566,700 Above $300,000

Short-term capital gains are taxed as ordinary income using the standard 2025 federal income tax brackets: 10%, 12%, 22%, 24%, 32%, 35%, and 37%.

Worked Examples

Stock Sale (Long-Term)

Purchase: $10,000 | Sale: $15,000 (held 2 years)

Capital gain: $5,000

Single filer, $75,000 income: 15% bracket applies.

Federal tax: $5,000 x 0.15 = $750

No NIIT (income below $200K threshold). If California resident, add ~$370 state tax (7.4% effective rate). Total tax: ~$1,120.

Crypto Gain (Short-Term)

Purchase: $8,000 | Sale: $12,000 (held 6 months)

Capital gain: $4,000 (short-term)

Married filing jointly, $150,000 combined income. Gain taxed as ordinary income at 22% marginal rate.

Federal tax: $4,000 x 0.22 = $880

Add state tax if applicable. Short-term gains cost significantly more than long-term.

High Earner with NIIT

Purchase: $50,000 | Sale: $80,000 (held 18 months)

Capital gain: $30,000 (long-term)

Single filer, $220,000 total income. 15% long-term rate applies, plus NIIT because income exceeds $200K.

Federal: $30,000 x 0.15 = $4,500

NIIT: $30,000 x 0.038 = $1,140

Total federal: $5,640 (18.8% effective rate).

Frequently Asked Questions

What are capital gains?

Capital gains are profits from selling an asset for more than you paid for it. If you buy stock for $5,000 and sell it for $7,000, you have a $2,000 capital gain. Capital gains are taxable in the year you sell the asset. Common sources include stocks, bonds, cryptocurrency, real estate, mutual funds, ETFs, and collectibles.

What is the difference between short-term and long-term capital gains?

Short-term capital gains apply to assets held for one year or less and are taxed as ordinary income at rates up to 37%. Long-term capital gains apply to assets held for more than one year and benefit from preferential rates: 0%, 15%, or 20%, depending on your income. The holding period clock starts the day after you purchase the asset. Holding for 366+ days can save you thousands in taxes.

What is the Net Investment Income Tax (NIIT)?

The NIIT is an additional 3.8% tax on investment income including capital gains, dividends, interest, annuities, and royalties. It applies to taxpayers with modified adjusted gross income above $200,000 (single), $250,000 (married filing jointly), or $125,000 (married filing separately). The tax applies to the lesser of your net investment income or the amount your MAGI exceeds the threshold. The NIIT was enacted as part of the Affordable Care Act.

How can I reduce capital gains taxes?

Strategies include: holding investments for more than one year to qualify for long-term rates; harvesting capital losses to offset gains (up to $3,000 of excess losses can offset ordinary income per year); using tax-advantaged accounts like IRAs, 401(k)s, and HSAs for investments; donating appreciated assets to charity (you avoid the capital gains tax and get a deduction for the full market value); timing sales across tax years to manage income levels; and for primary residences, claiming the $250,000 ($500,000 married) home sale exclusion if you lived in the home for 2 of the last 5 years.

What are the 2025 long-term capital gains tax rates?

For 2025, long-term capital gains are taxed at 0% for single filers with taxable income up to $48,350 ($96,700 married filing jointly); 15% for income from $48,351 to $533,400 single ($96,701 to $600,050 MFJ); and 20% for income above $533,400 single (above $600,050 MFJ). Head of household thresholds are $64,750 and $566,700. Short-term gains are taxed as ordinary income at rates from 10% to 37%.

Does this calculator store my financial data?

No. All calculations run entirely in your browser using JavaScript. No purchase prices, sale amounts, income figures, or tax results are sent to any server. Nothing is stored, logged, or transmitted. Your financial information remains completely private.

Related Tools

Privacy & Limitations

  • Client-side only. No data is sent to any server. No cookies, no tracking of inputs or results.
  • Estimates only. This calculator provides estimates based on 2025 IRS tax rates. It does not account for cost basis adjustments (like brokerage fees, wash sales, or inherited step-up basis), capital loss carryovers, depreciation recapture on real estate, or the Alternative Minimum Tax (AMT). Your actual tax liability may differ.
  • Federal + state estimate. State taxes use approximate effective rates. Some states have progressive brackets or special capital gains rates not fully modeled here.
  • Not tax advice. This tool is for informational and educational purposes only. For complex situations (large gains, multiple transactions, real estate, business assets, or tax-loss harvesting strategies), consult a qualified tax professional or CPA.
  • Cost basis simplification. The calculator assumes a single purchase and sale. For assets purchased at different times (different lots), you may be able to specify which shares to sell to optimize your tax outcome.

Related Tools

View all tools

Capital Gains Tax Calculator FAQ

What are capital gains?

Capital gains are profits from selling an asset for more than you paid for it. If you buy stock for $5,000 and sell it for $7,000, you have a $2,000 capital gain. Capital gains are taxable in the year you sell the asset. Common sources include stocks, bonds, cryptocurrency, real estate, and other investments.

What is the difference between short-term and long-term capital gains?

Short-term capital gains apply to assets held for one year or less and are taxed as ordinary income at rates up to 37%. Long-term capital gains apply to assets held for more than one year and benefit from lower tax rates: 0%, 15%, or 20%, depending on your income. Holding investments for more than a year can significantly reduce your tax bill.

What is the Net Investment Income Tax (NIIT)?

The NIIT is an additional 3.8% tax on investment income including capital gains, dividends, and interest. It applies to taxpayers with modified adjusted gross income above $200,000 (single), $250,000 (married filing jointly), or $125,000 (married filing separately). The tax applies to the lesser of your net investment income or the amount your MAGI exceeds the threshold.

How can I reduce capital gains taxes?

Strategies include: holding investments for more than one year to qualify for long-term rates; harvesting capital losses to offset gains; using tax-advantaged accounts like IRAs and 401(k)s; donating appreciated assets to charity; timing sales across tax years; and if selling a primary residence, claiming the $250,000 ($500,000 for married couples) home sale exclusion.

What are the 2025 long-term capital gains tax rates?

For 2025, long-term capital gains are taxed at 0% for single filers with income up to $48,350 ($96,700 married filing jointly); 15% for income from $48,351 to $533,400 single ($96,701 to $600,050 MFJ); and 20% for income above $533,400 single (above $600,050 MFJ). Head of household thresholds are $64,750 and $566,700.

Does this calculator store my financial data?

No. All calculations run entirely in your browser using JavaScript. No purchase prices, sale amounts, or tax results are sent to any server. Nothing is stored, logged, or transmitted.

Request a New Tool
Improve This Tool