AnyCalculator
Free calculator

Capital Gains Tax Calculator

Estimate capital gains tax owed on stocks, real estate, or crypto sales from your taxable gain and rate. Compare short-term vs. long-term US tax brackets.

Instant result Transparent formula No sign-up

Your inputs

Enter your numbers

$
%

Instant estimate

Your results

Capital gains tax

$100.00

Estimates update as you type. Verify important decisions with a qualified professional.

Method

How it works

Multiply your net taxable capital gain (sale price minus cost basis and selling expenses) by your applicable capital gains tax rate: Capital Gains Tax = Taxable Gain × (Tax Rate ÷ 100).

Capital gains tax=Amount\times Rate/100

Worked example

If you sell an investment held for more than one year with a $25,000 taxable gain and fall in the 15% federal long-term bracket, your estimated federal tax is $25,000 × 0.15 = $3,750.

Federal long-term vs. short-term capital gains overview

Holding periodFederal rate structureAdditional notes
1 year or less (Short-term)10% – 37% ordinary income bracketsTaxed at the same marginal rate as wages and salary
Over 1 year (Long-term)0%, 15%, or 20%Most middle-income filers fall in the 15% federal tier
High-income surtax (NIIT)+3.8% above thresholdApplies above $200k single / $250k married filing jointly

Practical tips

  • Holding an appreciated asset for at least one year and one day before selling moves the gain from ordinary income rates to lower long-term capital gains rates.
  • Offset realized capital gains dollar-for-dollar by harvesting capital losses in the same tax year; up to $3,000 of excess net loss can also offset ordinary income.
  • Remember to add state capital gains tax if your state taxes investment income — most states tax capital gains at regular state income rates.

Frequently asked questions

How do I calculate my taxable capital gain?

Subtract your adjusted cost basis (original purchase price plus commissions, improvements, or reinvested dividends) and selling costs from the net sale proceeds.

Does the primary home exclusion reduce capital gains tax?

Yes. If you owned and lived in your primary residence for at least 2 of the last 5 years, you can generally exclude up to $250,000 of gain ($500,000 if married filing jointly).

Do I owe capital gains tax if I reinvest the proceeds?

In a taxable brokerage account, selling at a gain triggers tax even if you immediately reinvest. Tax-advantaged accounts (401k, IRA, Roth IRA) and qualified 1031 real estate exchanges defer or avoid immediate tax.

Are collectibles and depreciated real estate taxed differently?

Yes. Collectibles can face up to a 28% federal long-term rate, and depreciation recapture on rental real estate is generally taxed up to 25%.

AdvertisementResponsive banner

Any future affiliate recommendations will be clearly disclosed and will not affect calculator results.