🇺🇸 United States

Capital Gains Tax Calculator

Calculate how much tax you owe on investment gains. Compare short-term vs long-term rates to see how holding longer saves money, or compute your total after-tax proceeds with costs deducted. Works with any currency.

All amounts displayed in selected currency
$
Original cost of the asset
$
Price you sold (or plan to sell) the asset for
months
How long you held the asset. 12+ months = long-term
%
Your marginal income tax rate (for gains held < 12 months)
%
Long-term capital gains rate (for gains held >= 12 months)
Estimates only. Enter your own tax rates. Consult a tax professional for personalised guidance.

Try another scenario

Calculate for your country
Found an issue? Send feedback

How to Use This Calculator

Tab "Calculate Tax"

Enter the purchase price and sale price of your asset, along with the holding period in months. Then enter your short-term and long-term tax rates. The calculator determines whether your gain is short-term or long-term (12+ months) and shows the tax owed and net proceeds.

Tab "Short-Term vs Long-Term"

Enter the same gain with both your short-term and long-term tax rates. The result shows a side-by-side comparison of how much tax you would owe under each rate, and how much you save by qualifying for the long-term rate. Use this to decide whether holding an extra month is worth the tax savings.

Tab "After-Tax Proceeds"

Enter the sale price, purchase price, and all associated costs (broker fees, improvements, legal fees). The calculator deducts costs from your gain before applying tax, then shows your total after-tax proceeds — the actual amount you walk away with.

The Formulas

Capital gain:
Capital Gain = Sale Price − Purchase Price − Allowable Costs

Tax owed:
Tax = Capital Gain × Applicable Rate
(Short-term rate if held < 12 months, Long-term rate if held ≥ 12 months)

Net proceeds:
Net Proceeds = Sale Price − Costs − Tax

Tax savings (long-term vs short-term):
Savings = Capital Gain × (Short-Term Rate − Long-Term Rate)

All calculations are universal. You enter your own tax rates based on your country, income level, and filing status. No country-specific rates are applied automatically.

Worked Examples

Example 1 — Stock held 18 months (long-term)

You bought shares for $50,000 and sold them 18 months later for $75,000. Your long-term capital gains rate is 15%.

Purchase price$50,000
Sale price$75,000
Capital gain$75,000 − $50,000 = $25,000
Holding period18 months (long-term)
Tax rate15% (long-term)
Tax owed$25,000 × 15% = $3,750
Net proceeds$75,000 − $3,750 = $71,250

By holding for more than 12 months, the gain qualifies for the lower long-term rate of 15% instead of the short-term rate.

Example 2 — Short-term vs long-term comparison

Same $25,000 gain, but comparing the tax impact of selling before vs after the 12-month mark. Short-term rate: 22%. Long-term rate: 15%.

Capital gain$25,000
Short-term tax (22%)$25,000 × 22% = $5,500
Long-term tax (15%)$25,000 × 15% = $3,750
Tax savings$5,500 − $3,750 = $1,750

Holding for just one extra month (from 11 to 12 months) saves $1,750 in this scenario. The longer holding period pays for itself unless the asset price drops by more than the tax savings.

Example 3 — Real estate sale with costs

You sell a rental property for $350,000 that you purchased for $250,000. You spent $7,000 on agent commissions and $15,000 on capital improvements over 3 years.

Sale price$350,000
Purchase price$250,000
Total costs$7,000 + $15,000 = $22,000
Taxable gain$350,000 − $250,000 − $22,000 = $78,000
Tax rate (long-term, 36 mo)15%
Tax owed$78,000 × 15% = $11,700
After-tax proceeds$350,000 − $22,000 − $11,700 = $316,300

Deducting broker fees and improvements reduces the taxable gain from $100,000 to $78,000, saving $3,300 in tax compared to ignoring costs.

Understanding Capital Gains Tax

What Is Capital Gains Tax?

Capital gains tax is a tax on the profit from selling an asset that has increased in value. It applies to stocks, bonds, real estate, cryptocurrency, collectibles, and other investments. You only pay capital gains tax when you realise the gain — that is, when you actually sell the asset. Unrealised gains (paper profits) are not taxed.

Short-Term vs Long-Term Rates

Most tax systems distinguish between short-term and long-term capital gains. In the US, short-term gains (assets held less than one year) are taxed at your ordinary income tax rate, while long-term gains (held one year or more) receive preferential rates of 0%, 15%, or 20%. Other countries have similar structures. The UK has separate CGT rates for basic-rate and higher-rate taxpayers. India distinguishes between short-term and long-term based on asset type.

Reducing Your Tax Bill

Key strategies include: holding longer to qualify for lower long-term rates, tax-loss harvesting to offset gains with losses, deducting costs (fees, commissions, improvements) from your gain, and using tax-advantaged accounts where gains grow tax-free or tax-deferred. Timing matters: selling in a year when your income is lower can also reduce the rate applied to your gains.

What Costs Can You Deduct?

Allowable costs vary by jurisdiction but typically include: broker commissions and transaction fees for stocks, and agent commissions, legal fees, title insurance, and capital improvements for real estate. These costs increase your cost basis, reducing the taxable gain. Repairs and maintenance are generally not deductible against capital gains.

Frequently Asked Questions

Capital gains tax is calculated on the profit from selling an asset. Subtract the purchase price and any allowable costs from the sale price to get the capital gain. Then multiply the gain by the applicable tax rate. If you held the asset for 12 months or more, the long-term rate applies; otherwise, the short-term rate applies. Use the "Calculate Tax" tab for a quick calculation.
Short-term capital gains apply to assets held for less than 12 months and are typically taxed at your ordinary income tax rate. Long-term capital gains apply to assets held for 12 months or more and are taxed at a lower, preferential rate. In the US, long-term rates are 0%, 15%, or 20% depending on income. Use the "Short-Term vs Long-Term" tab to compare the difference for your specific gain.
Yes. You can deduct costs directly related to buying, improving, or selling the asset. For stocks, this includes broker commissions. For real estate, deductible costs include agent commissions, legal fees, closing costs, and capital improvements. These costs increase your cost basis and reduce the taxable gain. Use the "After-Tax Proceeds" tab to see the impact of costs on your final proceeds.
The savings depend on the difference between your short-term and long-term rates. For example, if your short-term rate is 22% and your long-term rate is 15%, you save 7% of your gain by holding for at least 12 months. On a $50,000 gain, that is $3,500 in tax savings. Use the "Short-Term vs Long-Term" tab to calculate the exact savings for your situation.
No. This is a universal capital gains tax calculator. You enter your own short-term and long-term tax rates based on your country, income level, and filing status. For country-specific calculators with built-in tax brackets, see the US, UK, and India links below the calculator.

Related Calculators

Embed This Calculator

Add the sum.money Capital Gains Tax Calculator to your website. Free, responsive, always up to date.

<iframe src="https://sum.money/embed/capital-gains-tax-calculator" width="100%" height="700"></iframe>