Capital Gains Tax Calculator
Estimate Capital Gains Tax totals, payments, rates, and costs for financial planning.
This capital gains tax calculator estimates the tax owed when you sell an investment (stocks, real estate, or other assets) for more than you paid, based on your gain amount, how long you held the asset, and your income bracket. Short-term and long-term gains are taxed at very different rates.
Enter your sale price, cost basis, and holding period, and the calculator estimates your capital gains tax.
Worked Calculation Examples
| Scenario | Result | Calculation Step |
|---|---|---|
| Stock sold after 6 months (short-term) | Gain $5,000 · Tax ≈ $1,100 | Gain = $15,000 − $10,000 = $5,000. Held under a year, so taxed at the ordinary 22% bracket rate: $5,000 × 0.22 = $1,100. |
| Same stock sold after 18 months (long-term) | Gain $5,000 · Tax = $750 | Same $5,000 gain, but held over a year qualifies for the 15% long-term rate: $5,000 × 0.15 = $750 - $350 less tax on an identical gain, purely from holding period. |
Short-Term vs. Long-Term Capital Gains
Assets held one year or less generate short-term capital gains, taxed at your ordinary income tax rate. Assets held longer than one year qualify for long-term capital gains rates, which are typically significantly lower (commonly 0%, 15%, or 20% depending on income) - this is why holding period alone can substantially change the tax owed on an identical gain.
How Cost Basis Affects Your Gain
Capital gain is calculated as sale price minus cost basis (what you originally paid, plus certain improvements or fees). Understating your cost basis overstates your taxable gain, so keeping accurate purchase records - including reinvested dividends for stocks or capital improvements for real estate - directly reduces the tax you owe.
Sources & References
Capital gains tax rates and thresholds are set annually by the IRS (see IRS Topic No. 409 and Publication 550 in the US) and by equivalent tax authorities elsewhere - they change with tax law and should be verified for the current tax year rather than assumed to stay fixed. This calculator does not account for the Net Investment Income Tax, state-level capital gains tax, or the primary-residence exclusion, all of which can change the actual amount owed.
How to Use the Capital Gains Tax Calculator
- Open the Capital Gains Tax Calculator and enter the values requested in the input fields.
- Check the units, percentages, dates, or time periods before reading the answer.
- Review the instant result and adjust any value to compare another scenario.
- Use the formula, example, and FAQs below to understand how the capital gains tax calculator works.
Frequently Asked Questions
How do I calculate capital gains tax?
Subtract your cost basis from the sale price to find your gain, then apply either your ordinary income rate (short-term, held one year or less) or the lower long-term capital gains rate (held over one year).
What is the difference between short-term and long-term capital gains?
Short-term gains (assets held one year or less) are taxed at ordinary income rates. Long-term gains (held over one year) get preferential, generally lower tax rates.
Does selling my primary home trigger capital gains tax?
Often not on the full amount - many jurisdictions exclude a significant portion of gain on a primary residence (for example, up to $250,000 for single filers in the US) if ownership and use requirements are met.
How do I use this capital gains tax calculator?
Enter the known values, review the units or settings, and the calculator updates the result instantly. The formula and example on this page show how the answer is produced.
What does the Capital Gains Tax Calculator calculate?
Estimate Capital Gains Tax totals, payments, rates, and costs for financial planning. It is designed for fast browser-based calculations without sign-up, downloads, or manual spreadsheet setup.
What formula does this capital gains tax use?
The formula is: Capital Gain = Sale Price − Cost Basis; Tax = Gain × Applicable Rate. The rate applied depends entirely on holding period: assets held one year or less are taxed at ordinary income rates, while assets held longer qualify for preferential long-term rates. The US introduced a lower long-term capital gains rate in the Revenue Act of 1921, based on the policy argument that taxing long-held investment gains more lightly encourages saving and long-term investment over short-term speculative trading - a rationale still debated by economists and policymakers today.
Related Calculators
Tax Refund Calculator
Estimate Tax Refund totals, payments, rates, and costs for financial planning.
Income Tax Calculator
Estimate U.S. federal income tax, taxable income, and marginal and effective tax rates by tax year and filing status.
Self-Employment Tax Calculator
Estimate Self-Employment Tax totals, payments, rates, and costs for financial planning.
Property Tax Calculator
Estimate Property Tax totals, payments, rates, and costs for financial planning.
Loan Calculator
Calculate monthly loan payments, interest charges, and loan payoff terms.
Mortgage Calculator
Estimate home mortgage payments including principal, interest, taxes, and insurance.
Last updated: September 27, 2026.