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
- Enter purchase price, sale price, holding period, and approximate annual income.
- Compute capital gain as sale minus cost basis.
- Apply short-term (ordinary) or long-term rate based on holding period and income bracket.
- 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
Enter your sale details
Provide purchase price, sale price, holding period, and approximate annual income.
Calculate your gain
The tool subtracts cost basis from proceeds and selects a federal rate based on holding period and income.
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
Enter purchase price
Input what you originally paid for the investment (your cost basis before fees or adjustments).
Enter sale price
Input the amount you received or expect to receive when selling.
Choose holding period
Select short-term (one year or less) or long-term (more than one year) to apply the correct rate type.
Add annual income
Enter your approximate taxable income so the tool can pick a federal bracket for the estimate.
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?
What is the difference between short-term and long-term capital gains?
How does this calculator estimate my tax?
What does this calculator not include?
Can I use this for stocks, crypto, or real estate?
What tax year do the rates reflect?
More Finance Tools To Explore
Discover more tools to enhance your productivity and solve everyday problems
Crypto Tax Calculator
financeCalculate cryptocurrency taxes
Index Fund Returns
financeEstimate investment returns
Loan Calculator
financeCalculate loan payments
Retirement Calculator
financePlan your retirement savings
Budget Planner
financeCreate monthly budgets
Savings Calculator
financeTrack savings growth