- Home
- Calculators
- Property
- Capital gains tax calculator
Capital gains tax calculator
Estimate the tax on your property sale, with discount and exemption flags you can adjust to your jurisdiction.
Calculator propertyLogic updated January 2026
This calculator estimates the capital gains tax payable on selling a property. The gain is the sale price minus the original purchase price minus any capital improvements made along the way. Many jurisdictions apply a discount when the property has been held beyond a threshold (often expressed as a percentage of the gain), and a primary-residence exemption that removes the tax entirely. The calculator handles all three paths.
How this is calculated
Formula
capitalGain = salePrice − purchasePrice − capitalImprovements ; if held ≥ threshold: taxableGain = gain × (1 − discount/100) ; estimatedTax = taxableGain × marginalTaxRate / 100 Step-by-step
- Calculate the raw capital gain: sale price minus purchase price minus capital improvements
- If the property is exempt (e.g. primary residence in your jurisdiction), tax is zero — skip remaining steps
- If the property has been held at or beyond the discount threshold, apply the discount percentage to reduce the taxable portion of the gain
- Multiply the taxable gain by your marginal tax rate to estimate tax payable
- Subtract estimated tax from the gross gain to get net profit after tax
- Losses (negative gains) produce zero tax — this engine doesn't model loss carry-forwards
- Rounding mode
- ROUND_HALF_UP
- Precision
- 20-digit internal precision (Decimal.js), rounded to 2 decimal places for display
- Logic last reviewed
Assumptions & limitations
What this calculator assumes
- Capital gain equals sale price minus purchase price minus capital improvements
- If the property is exempt, no tax is payable
- Long-term holding discount is applied to the full gain when held at or beyond the threshold
- Losses (negative gains) produce zero tax — no loss carry-forward modelled
- Tax is applied at a single marginal rate — no progressive bracket ladder
- Selling costs and legal fees are not included — fold them into capital improvements if you want to net them off
What this calculator doesn’t account for
- Does not model jurisdiction-specific tax brackets or surcharges
- Does not include selling costs (agent commission, conveyancing, marketing)
- Does not factor in depreciation recapture rules that apply in some jurisdictions
- Does not model partial exemptions (e.g. for periods of primary residence within the holding period)
- Does not adjust the cost base for inflation indexing (which some jurisdictions allow as an alternative to a discount)
Worked example
An investor sells a property for $850,000 that they bought for $500,000 eight years ago. They spent $30,000 on capital improvements. The property is taxable (not their primary residence), eligible for a 50% long-term discount because it's been held over 12 months, and they're on a 37% marginal rate.
| Input | Value |
|---|---|
| Purchase price | $500,000 |
| Sale price | $850,000 |
| Capital improvements | $30,000 |
| Discount threshold | 12 months (held) |
| Discount | 50% |
| Marginal tax rate | 37% |
Capital gain: $320,000 — Taxable gain: $160,000 — Estimated tax: $59,200 — Net profit: $260,800
Raw gain = $850,000 − $500,000 − $30,000 = $320,000. The 8-year holding period exceeds the 12-month threshold, so the 50% discount applies to give a taxable gain of $160,000. At 37% marginal rate, estimated tax is $59,200. Net profit after tax is $260,800. Without the discount, tax would have been $118,400 — the discount halves it.
Frequently asked questions
How is capital gain calculated?
Sale price minus the cost base (original purchase price plus the cost of capital improvements made over the holding period). Some jurisdictions also let you add selling costs and acquisition costs to the cost base, which reduces the gain. This calculator uses the basic three-input formula — adjust the capital improvements input to bake in any other deductible costs.
What costs reduce my capital gain?
Capital improvements that add value or extend useful life — extensions, structural renovations, new bathrooms or kitchens. Routine maintenance and repairs typically don't qualify. In many jurisdictions, transaction costs (agent commission, conveyancing, transfer taxes) can also be added to the cost base. Track receipts for everything from purchase through sale; the documentation matters at tax time.
How does holding period affect tax?
Many jurisdictions apply a long-term-holding discount that reduces the taxable portion of the gain — common thresholds are 12 months or longer, with discounts of 30–50% off the gain. The economic logic is that part of the nominal gain is just inflation, so taxing it in full would over-tax the real gain. Specific rules vary; this calculator lets you set the threshold and discount that match your jurisdiction.
Is the primary residence exempt?
Most jurisdictions have a primary-residence exemption that removes capital gains tax on the home you live in, provided certain conditions are met (typically: it's been your main residence for the full ownership period, you didn't rent it out, and it sits on a typical residential parcel). Toggle 'Exempt' on this calculator to model that case — the engine returns zero tax and the full gain as net profit.
What if I made a loss?
If the sale price (less improvements) is below the purchase price, the gain is negative — a capital loss. This calculator returns zero tax in that case, but most jurisdictions allow you to carry the loss forward to offset future capital gains. The size of the loss isn't reported here as a usable figure; consult a qualified tax adviser to record and apply the carry-forward in your tax return.
Embed this calculator
Add this calculator to your website. Free to use with attribution.
The calculator will resize to fit your content area. Please keep the attribution link visible — replace YOUR_SITE with your domain so we can attribute traffic correctly.