Capital Gains Tax Calculator

See how much federal capital gains tax you would owe on a sale — and how dramatically the bill changes if you hold for at least one year. This free online financial calculator runs entirely in your browser — no signup, no data sent anywhere.

· Reviewed by the CalculatorHive editorial team

Inputs

Results

Capital Gain
Estimated Tax
Effective Rate
After-Tax Gain

How It Works (Formula & Method)

Short-term gains (assets held one year or less) are taxed as ordinary income at your marginal federal rate, which can be as high as 37%. Long-term gains (held more than one year) get preferential rates: 0% if your total taxable income is below roughly $47,025 (single filer, 2024), 15% from there up to about $518,900, and 20% above that. Holding just past the one-year mark can cut your tax bill by half or more.

Worked Example

Below is a worked example using the calculator's default values. The same numbers are pre-filled in the form above so you can press Calculate and see the result without typing anything.

Inputs used:

  • Purchase Price ($): 10000
  • Sale Price ($): 18000
  • Your Annual Taxable Income ($): 75000
  • Holding Period: long

With these inputs, the calculator computes the metrics shown in the Results panel. Change any value and press Calculate again to see how the result responds — the live widget and the chart both update instantly.

About the Capital Gains Tax Calculator

Capital gains tax is the tax you pay when you sell an investment — a stock, mutual fund, crypto holding, rental property, or other asset — for more than you paid for it. In the United States, the rate depends on two things: how long you held the asset, and how much total income you have.

How to Use This Calculator

Enter what you paid for the asset (your "cost basis") and what you sold it for. Add your annual taxable income from other sources — capital gains stack on top of ordinary income to determine your bracket. Choose the holding period: short-term if you held for one year or less, long-term if you held for more than a year. Press Calculate.

Tips & Considerations

  • Hold for at least one year and a day to qualify for long-term rates. The difference is often staggering.
  • You can offset capital gains with capital losses (tax-loss harvesting). Realized losses from one investment can cancel gains from another.
  • High earners may also owe the 3.8% Net Investment Income Tax (NIIT) on top of capital gains.
  • State income tax usually applies on top of the federal numbers; check your state's rules.
  • This estimator does not handle wash-sale rules, qualified small business stock, or Section 1250 recapture — consult a CPA for filing-grade figures.

Frequently Asked Questions

How is "long-term" defined exactly?

Held for more than one year — at least one year and one day from the original purchase date to the sale date.

What is cost basis?

Your total invested amount: purchase price plus any commissions, fees, or reinvested dividends. Higher basis means lower taxable gain.

Are crypto gains treated the same?

Yes — the IRS treats cryptocurrency as property, so the same short-term / long-term capital gains rules apply.

What about a primary home?

A primary residence has a separate $250,000 exclusion ($500,000 for married filers) on capital gains, provided you lived there two of the last five years.

Reviewed against: IRS publications, Consumer Financial Protection Bureau (consumerfinance.gov), and current published market data. Results are estimates for educational use only — not financial, tax, or legal advice.

Ad placement