Capital Gains Tax Calculator

Estimate US federal capital gains tax on a single investment sale. Enter your purchase price, sale price, how long you held the asset, and your income to see short-term or long-term tax estimates.

Disclaimer: This information is for educational purposes only and should not replace professional financial or tax advice. Consult a qualified advisor for your specific situation.

Original cost of the investment

Amount received from selling

Used to determine tax bracket

How capital gains tax works

When you sell an investment for more than you paid, the profit is a capital gain. The IRS treats gains differently depending on how long you owned the asset. Gains on assets held one year or less are short-term and generally taxed at ordinary income rates. Gains on assets held more than one year are long-term and typically taxed at lower federal rates.

Your actual tax bill depends on your full tax picture—income, filing status, deductions, state taxes, and other factors. This calculator gives a simplified federal estimate for one sale so you can plan ahead, not a substitute for professional tax preparation.

Read our Capital Gains Tax Guide: Short-Term vs Long-Term Rates for a deeper explanation, examples, and FAQs.

What is capital gains tax?

Capital gains tax applies when you sell an asset for more than your cost basis. In the U.S., federal tax treatment depends on how long you held the asset: one year or less (short-term) vs. more than one year (long-term).

This calculator estimates federal tax on a single sale using simplified 2024 bracket logic. It helps you plan—not replace professional tax preparation.

Formula

Capital gain = Sale price − Cost basis

Estimated tax = Capital gain × Applicable rate (by holding period and income)

After-tax return = Capital gain − Estimated tax

Cost basis may include purchase price and certain fees; rules vary by asset type.

How the calculation works

  1. Enter purchase price, sale price, holding period, and approximate annual income.
  2. Compute capital gain as sale minus cost basis.
  3. Apply short-term (ordinary) or long-term rate based on holding period and income bracket.
  4. Show estimated tax and after-tax proceeds.

Worked examples

Long-term stock gain

  • Bought: $5,000
  • Sold: $8,000 after 18 months
  • Gain: $3,000

Likely qualifies for long-term rates (0%, 15%, or 20% federally depending on income)—lower than short-term ordinary rates.

Short-term gain

  • Bought: $2,000
  • Sold: $2,800 after 8 months
  • Gain: $800

Taxed as ordinary income—rate depends on your full tax picture, not just the gain.

Practical uses

  • Estimating tax before selling investments
  • Comparing hold-vs-sell timing around the one-year mark
  • Rough planning for a single stock sale

Limitations

  • !Federal estimate only—no state tax, NIIT, or AMT
  • !Single sale, single cost basis—no wash sales or multiple lots
  • !Rates and brackets change; verify current IRS guidance

References

Read our in-depth guide for more detail.

How This Calculator Works

1

Enter your sale details

Provide purchase price, sale price, holding period, and approximate annual income.

2

Calculate your gain

The tool subtracts cost basis from proceeds and selects a federal rate based on holding period and income.

3

Review the estimate

View estimated tax owed, after-tax return, and a summary you can copy or share.

What is Capital Gains Tax Calculator?

Capital gains tax is the federal tax owed on profit from selling an asset. Assets held one year or less are taxed as short-term gains at ordinary income rates, while assets held longer than one year qualify for lower long-term rates of 0, 15, or 20 percent.

Use this free tool to estimate federal capital gains tax on a single sale. It applies 2024 US federal bracket logic to your inputs and shows capital gain, estimated tax, and after-tax return. All calculations run in your browser—nothing is stored on our servers.

Short-term gains

Taxed at ordinary income rates based on your entered annual income.

Long-term gains

Assets held more than one year may qualify for reduced federal rates (0%, 15%, or 20%).

Estimate only

Does not include state tax, NIIT, AMT, or filing-status adjustments.

Last updated: · Published:

How to Use This Tool

1

Enter purchase price

Input what you originally paid for the investment (your cost basis before fees or adjustments).

2

Enter sale price

Input the amount you received or expect to receive when selling.

3

Choose holding period

Select short-term (one year or less) or long-term (more than one year) to apply the correct rate type.

4

Add annual income

Enter your approximate taxable income so the tool can pick a federal bracket for the estimate.

5

Review your estimate

See capital gain, estimated tax, after-tax return, and copy or share your results.

Pro Tips

  • Assets held more than one year often qualify for lower long-term federal rates
  • Keep records of purchase date, sale date, cost basis, and any fees paid
  • Capital losses can offset capital gains; up to $3,000 of excess losses may offset ordinary income per year
  • State capital gains taxes vary widely and are not included in this estimate
  • Speak with a CPA or tax advisor for filing, loss harvesting, or complex situations

Frequently Asked Questions

What is capital gains tax?
Capital gains tax applies when you sell an asset for more than you paid. The gain is generally the sale price minus your cost basis. In the US, gains are taxed as short-term (held one year or less) or long-term (held more than one year), with different federal rate schedules for each.
What is the difference between short-term and long-term capital gains?
Short-term gains are taxed at ordinary income tax rates, which depend on your total taxable income. Long-term gains on assets held more than one year usually qualify for lower federal rates (0%, 15%, or 20% for most investments). This calculator lets you compare both scenarios for a single sale.
How does this calculator estimate my tax?
Enter your purchase price, sale price, holding period, and annual income. The tool calculates your capital gain and applies simplified 2024 federal brackets to estimate a rate and tax amount. It assumes a single sale with no adjustments for fees, wash sales, or multiple tax lots.
What does this calculator not include?
This is a rough federal estimate only. It does not include state or local taxes, the 3.8% Net Investment Income Tax (NIIT), alternative minimum tax (AMT), filing status, deductions, or other income that may change your bracket. Real tax liability depends on your full return—consult a tax professional before filing.
Can I use this for stocks, crypto, or real estate?
The basic gain math (sale price minus cost basis) applies to many asset types, but tax rules differ. Crypto, collectibles, and some real estate sales have special rules. This tool provides a general federal estimate; use our crypto tax calculator for transaction-level crypto cost basis tracking.
What tax year do the rates reflect?
Rates are based on 2024 US federal brackets for single-filer-style income thresholds. Tax laws and brackets change annually. Always verify current IRS guidance or speak with a qualified tax advisor before making financial decisions.