Capital Gains Tax Calculator — Estimate tax liability, credits, and after-tax income
The Capital Gains Tax Calculator estimates the tax you'll owe when you sell a capital asset — stocks, mutual fund units, crypto, or real estate — using the same core formula tax authorities apply worldwide. Enter the purchase and sale price, deductible fees and improvements, any prior-year losses, and the applicable tax rate, and the tool shows your gross gain, taxable gain, tax owed, and after-tax proceeds side by side.
How to use
Step 1: Enter what you paid for the asset in the "Purchase price (cost basis)" field. Include brokerage or purchase costs only if you're not tracking them separately in the next section.
Step 2: Enter what you sold it for in the "Sale price (proceeds)" field.
Step 3: In the "Fees & improvements (deductible)" field, add any allowable costs — trading commissions, legal fees, capital improvements on property — that reduce the gain.
Step 4: If you have unused capital losses from previous tax years, enter them in "Prior-year losses (carryover)" so they offset the current gain.
Step 5: Choose the correct "Holding period" — Short-term if you held the asset one year or less, Long-term if longer. This choice is informational and helps you select the right rate.
Step 6: Enter your "Applicable tax rate" as a percentage, or pick a preset from the "Rate preset" dropdown for common jurisdictional rates.
Step 7: Select the correct "Currency" so results are formatted the way your filings show them.
Step 8: Read the highlighted "Estimated tax owed" and check the breakdown for gross gain, taxable gain, after-tax proceeds, and effective tax rate. The bar visualization shows what you keep versus what you pay.
Formula
Detailed calculation guide
A capital gain is the profit realized when you sell a capital asset for more than you paid for it. The starting point is the gross realized gain, computed as the sale proceeds minus the cost basis and any deductible expenses.
In the formulas below, $S$ is the sale price (gross proceeds), $C$ is the cost basis (what you paid), $E$ is deductible fees and improvements, $L$ is prior-year losses you're carrying forward, and $r$ is the applicable capital gains tax rate expressed as a decimal.
Most tax systems distinguish between short-term gains (assets held for a year or less, in the US and many other jurisdictions) and long-term gains (assets held longer). Short-term gains are typically taxed at ordinary-income rates, which are usually higher, while long-term gains benefit from preferential rates — for example, 0%, 15%, or 20% in the US depending on income; 10% or 20% in the UK (18% or 24% for residential property); and 12.5% on long-term listed equity in India.
Capital losses are treated as the negative of a gain. When the sale price is less than the adjusted cost basis, the calculator reports a capital loss, sets tax to zero, and reminds you that in most jurisdictions the loss can offset future capital gains — a mechanism known as loss carryforward. The prior-year losses input models exactly this: entering an amount reduces the current taxable gain by that amount, down to a floor of zero.
The effective tax rate shown is the tax divided by the gross gain, not by the taxable gain. This is a useful headline number because it shows what portion of your actual profit disappears in tax — including the effect of deductible expenses and offset losses. It will therefore usually be lower than the statutory rate you entered.
The tool is deliberately jurisdiction-agnostic. It does not model annual exemptions (such as the UK's Capital Gains Tax annual exempt amount or India's Section 112A ₹1 lakh exemption on listed equity), primary-residence exemptions, indexation benefits, inheritance step-ups, or income-band-based rate stacking. For jurisdiction-specific rules, always consult the official tax authority (IRS, HMRC, ITD, ATO, CRA, etc.) or a qualified tax advisor before filing.
Example: $10,000 → $25,000, long-term, 15%
Tax $2,250 — Net $22,750
A $15,000 long-term gain at 15% produces $2,250 of tax and $22,750 in after-tax proceeds — a typical US long-term stock scenario.
Example: Property £250k → £340k, fees £5k, 24%
Tax £20,400 — Net £319,600
£5,000 of deductible costs brings the gain to £85,000; at the UK residential higher rate of 24% the tax is £20,400.
Example: Crypto $8k → $5k (loss, short-term)
Capital loss $3,000 (no tax)
Selling below cost produces a $3,000 capital loss that can typically be carried forward to offset future gains; no tax is due on the sale itself.
Frequently asked questions
How is the taxable gain calculated?
Taxable gain equals the sale price minus the cost basis minus deductible fees and improvements, further reduced by any prior-year capital losses you carry forward, with a floor of zero. In formula form, $\text{Taxable gain} = \max(0,\; S - C - E - L)$. The tax owed is then this figure multiplied by the applicable rate.
What is the difference between short-term and long-term capital gains?
Most tax systems tax gains on assets held for one year or less as short-term (usually at ordinary-income rates) and gains on assets held longer as long-term (usually at preferential lower rates). The cutoff is one year in the US, India, and many others; the UK uses different rules entirely. Select the holding period that matches the asset and enter the correct rate.
Can I use this for cryptocurrency?
Yes. In most jurisdictions crypto is treated as property or a capital asset, so gains and losses are calculated the same way as for stocks: sale price minus cost basis (with deductible fees), taxed at the appropriate short-term or long-term rate. Some countries have specific rules for wash sales, staking rewards, or airdrops that this calculator does not model.
How are capital losses treated?
When your sale price is below your adjusted cost basis, the calculator shows a capital loss and reports zero tax. In practice, most jurisdictions allow you to offset that loss against other capital gains in the same year, and to carry any unused loss forward to future years. Enter carried-forward losses in the Prior-year losses field to see them reduce the current taxable gain.
Does the calculator include annual exemptions or thresholds?
No. It applies your entered rate to the full taxable gain and does not model jurisdiction-specific exemptions such as the UK's Annual Exempt Amount, India's ₹1 lakh Section 112A exemption on listed equity, or the US $250,000 / $500,000 primary-residence exclusion. Reduce the taxable gain by any exemption you're entitled to before entering it, or adjust the rate to reflect your effective bracket.
Why is the 'effective tax rate' different from the rate I entered?
The effective rate is tax divided by the gross gain (before offsetting expenses and losses). Because fees, improvements, and prior-year losses reduce the taxable base, the tax you actually pay may be a smaller fraction of your headline profit than the statutory rate you entered — this is the practical impact of deductions.
Which fees and costs are deductible?
Rules vary by jurisdiction, but the typical deductible costs include brokerage commissions, transfer fees, stamp duty, legal and professional fees related to the sale, and — for real estate — capital improvements that added lasting value to the property. Routine maintenance and interest are generally not deductible in the gain calculation. Check local guidance before including a specific cost.
Is this calculator a substitute for professional tax advice?
No. It's an estimation tool that applies a single flat rate to a simplified taxable gain. Real capital gains tax filings involve income-based rate stacking, exemptions, netting of long-term against short-term losses, currency conversion, treaty relief, and country-specific rules. Always confirm figures with a qualified tax professional or the relevant tax authority before filing.
Related calculators
Browse all calculators in this category
Editorial review
Author: Calculator1000 Editorial
Sources
Enable JavaScript to use interactive calculators.