CalcGallery

Capital Gains Tax Calculator

Work out the gain after basis adjustments and the tax at the rate you enter, with losses offset and a loss producing no tax.

Built by AbhiLast reviewed September 22, 2026

Enter a purchase price and sale proceeds.

Your amounts and rates

Legal fees, survey, transfer taxes. These add to your basis.

Work that added value, not routine repairs. These add to your basis.

Agent commission, legal fees. These come off the proceeds.

The rate that applies to you. No threshold or holding-period rule is stored here.

Result

Enter purchase price and sale proceeds to see the result.

Your entries are kept on this device only.

Results are arithmetic from the amounts and rates you enter. The site publishes no tax rate, threshold or tipping convention, and rates vary by jurisdiction and change. Check the rate on your receipt, invoice or tax authority guidance, and confirm anything that matters with a qualified adviser. Read the full disclaimer

How to use the Capital Gains Tax Calculator

  1. Enter what you paid, plus any purchase costs and capital improvements.
  2. Enter what you sold for, and the costs of selling.
  3. Enter the capital gains rate that applies to you.
  4. Optionally add losses to offset and the two dates, for the holding period.

How it is calculated

cost basis   = purchase price + purchase costs + improvementsgain         = proceeds − cost basis − selling costsnet gain     = gain − losses offsettax          = max(0, net gain) × ratenet proceeds = proceeds − cost basis − selling costs − tax

Why the adjustments matter

The subtraction most people do is proceeds minus purchase price. Here is what that misses:

Without adjustmentsWith adjustments
Cost basis250,000284,000
Gain150,00092,000
Tax at 15%22,50013,800

Eight thousand seven hundred of tax, on figures that were sitting in the paperwork the whole time. Purchase costs and capital improvements raise the basis; selling costs come off the proceeds. Both reduce the gain.

Whether a particular cost qualifies is jurisdictional, and the line between a capital improvement and a repair is a common point of dispute. This page does the arithmetic on what you tell it.

A loss produces no tax

If the sale comes out negative, the tax is zero, not a negative number. A negative tax is not a refund, and reporting one would make a bad outcome look better than it was.

The loss itself is still shown, signed, because it may be usable against other gains. Whether it can be carried forward, how far, and against what, varies by jurisdiction and is not modelled here.

What is not modelled

No rate, threshold, allowance, exemption or holding-period rule is stored. That is deliberate: they differ by country, several depend on your other income, and they change most years. The holding period is reported so you can identify the right rate and enter it.

Principal residence relief, rollover and deferral schemes, wash-sale rules and inherited-asset basis rules are all real and all absent.

Practical tips

Find the completion statements. Purchase and sale costs are on them, and they are the adjustments people forget.

Keep improvement receipts. They raise the basis and they are the hardest to reconstruct years later.

The holding period often decides the rate. Check where your sale falls before picking one.

This is arithmetic, not advice. A transaction of any size is worth taking to someone who knows your jurisdiction.

With your numbers

  1. Basis is $250,000.00 plus $4,000.00 costs and $30,000.00 improvements = $284,000.00
  2. Tax at 15% is $13,800.00, on a gain of $92,000.00

Quick reference

The rate is yours. Thresholds, allowances, exclusions and loss carry-forward vary by jurisdiction and are not modelled.

Common tax and shopping examples, worked out with the options this calculator starts on for United States.
ExampleCapital gain or loss
Property with adjustments, 15%$92,000.00
Same sale, no adjustments$150,000.00
Sold at a loss-$84,000.00
Gain offset by losses$150,000.00
Shares, 20%€8,000.00
Shares with dealing costs€7,750.00
Small gain, 10%€1,000.00
Break-even sale€0.00

Common questions about the Capital Gains Tax Calculator

What counts as a basis adjustment?
Costs of acquiring the asset — legal fees, survey, stamp duty or transfer taxes — and capital improvements that added value rather than maintained it. A new roof or an extension typically adds to basis; repainting and repairs typically do not. Selling costs such as agent commission come off the proceeds. What qualifies is jurisdictional, and the boundary between an improvement and a repair is a common point of dispute.
Why does this page not know my rate?
Because rates, thresholds, allowances and holding-period rules differ by jurisdiction and change regularly, and several depend on your other income. A stored table would be wrong somewhere and out of date everywhere within a year. The page reports the holding period so you can look up the rate that applies, and applies whatever you enter.
What happens if I sold at a loss?
The tax is zero. The page clamps it rather than returning a negative figure, because a negative tax is not a refund and showing one would flatter the result. The loss itself is still reported, signed, because it may be usable against other gains. How losses can be carried forward or set off is jurisdictional and is not modelled.
How much difference do the adjustments make?
On the worked example, a great deal. A 250,000 purchase sold at 400,000 looks like a 150,000 gain and 22,500 of tax at 15%. Adding 4,000 of purchase costs, 30,000 of improvements and 24,000 of selling costs brings the gain to 92,000 and the tax to 13,800 — a difference of 8,700. That is the main reason to use this rather than subtracting two numbers.
Does the holding period change the tax?
Not on this page. It is reported so you can identify which rate applies, because many jurisdictions tax short and long holdings differently, but the rate itself is the one you enter. Encoding the thresholds would mean storing rules that vary by country and change.

Report a problem with this calculator