Capital Gains Tax Calculator — Estimate Tax on Investment Profits

Calculate long-term and short-term capital gains tax

Affects your tax bracket

How to use Capital Gains Tax Calculator

Free capital gains tax calculator. Enter your gain, holding period, and income to see whether long-term (0–20%) or short-term rates apply and exactly how much tax you owe.

A capital gains tax calculator estimates how much tax you owe when you sell an investment, property, or asset at a profit. The tax rate depends on two things: your income and how long you held the asset. Short-term capital gains (held under one year) are taxed as ordinary income — potentially as high as 37%. Long-term capital gains (held one year or more) qualify for preferential rates of 0%, 15%, or 20%, making the holding period one of the most important tax decisions an investor makes.

How to use this Capital Gains Tax Calculator

  1. 1Enter your purchase price (cost basis) — what you originally paid for the asset, including commissions and fees.
  2. 2Enter the sale price — what you received when you sold.
  3. 3Enter the date of purchase and sale, or simply indicate whether you held the asset for more or less than one year.
  4. 4Enter your total taxable income for the year to determine which capital gains bracket applies.
  5. 5The calculator shows your gain, applicable tax rate, estimated tax owed, and your after-tax profit.

Long-term vs short-term capital gains tax rates explained

Capital gains are calculated as the difference between your sale price and cost basis. The tax rate applied depends entirely on your holding period and total income. Holding an asset for just one day longer than 12 months can drop your tax rate from 22–37% to 0–20% — making timing one of the highest-value tax strategies available to investors.

Capital Gain = Sale Price − Cost Basis − Selling Costs
VariableMeaning
Short-term rateSame as your ordinary income tax bracket (10%–37%)
0% LTCG rateTaxable income up to $47,025 (single) or $94,050 (married, 2024)
15% LTCG rateTaxable income $47,026–$518,900 (single, 2024)
20% LTCG rateTaxable income above $518,900 (single, 2024)
Net Investment Income TaxAdditional 3.8% on investment income above $200,000 (single)

Investment tax calculator example: $50,000 stock gain, held 14 months

  1. 01Purchase price: $100,000. Sale price: $150,000. Gain: $50,000.
  2. 02Holding period: 14 months → qualifies for long-term capital gains rates.
  3. 03Taxable income (other income): $85,000. Total taxable income with gain: $135,000.
  4. 04LTCG rate: 15% (income in $47,026–$518,900 range for single filer).
  5. 05Tax owed: $50,000 × 15% = $7,500.

Result

Tax owed on $50,000 gain: $7,500 at long-term rate. If sold after only 11 months (short-term), at 22% ordinary income rate: $11,000. Waiting 3 more months saved $3,500.

What determines your capital gains tax rate?

Holding period

The most controllable factor. Holding exactly one year and one day converts a short-term gain taxed at up to 37% into a long-term gain taxed at 0–20%. This single decision can save tens of thousands on large positions.

Your income level

If your total taxable income falls under $47,025 (single, 2024), your long-term capital gains rate is 0% — you pay nothing on investment profits. Strategic income management can keep you in this bracket.

Cost basis

Accurately tracking your cost basis (purchase price + commissions + reinvested dividends) minimizes reported gains. Poor record-keeping often results in overpaying taxes.

Tax-loss harvesting

Realized capital losses offset gains dollar for dollar. A $10,000 loss harvested in the same tax year as a $10,000 gain eliminates the tax on the gain entirely.

State taxes

Most states do not offer preferential long-term capital gains rates — California taxes capital gains as ordinary income at up to 13.3%. This calculator shows federal tax only.

NIIT surcharge

High earners (above $200,000 single, $250,000 married) pay an additional 3.8% Net Investment Income Tax on top of the standard capital gains rate.

Tips and things to know

  • If your total income is below $47,025 (single) or $94,050 (married), your long-term capital gains tax rate is 0% — consider realizing gains in low-income years.
  • Tax-loss harvesting: sell losing positions before year-end to offset gains. Up to $3,000 in excess losses can offset ordinary income per year.
  • Donate appreciated stock directly to charity instead of selling it first — you avoid the capital gains tax entirely and deduct the full market value.
  • Qualified Opportunity Zone investments allow deferral and potential elimination of capital gains tax if held 10+ years.
  • For inherited assets, the "step-up in basis" at death resets the cost basis to market value on the date of death — potentially eliminating decades of accumulated gains.

Official resources and further reading

Related tools you might need

Frequently asked questions

0% for income up to $47,025 (single). 15% up to $518,900. 20% above $518,900. Holding assets for at least 1 year qualifies for these preferential rates.