UK capital gains tax calculator
A 20,000 gain with a 3,000 annual exempt allowance leaves 17,000 taxable; a basic-rate taxpayer selling shares or other assets pays 18%, which is 3,060. Enter your gain, unused allowance, income tax band and asset type. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Gain
- 20,000
- Annual exempt allowance
- 3,000
- Income tax band
- Basic
- Asset type
- Other
- Taxable gain
- 17,000
- Allowance used
- 3,000
- Rate percent
- 18
- Tax
- 3,060
UK capital gains tax is the levy on the profit you make when you dispose of shares, crypto, a second home, or most other chargeable assets. This UK capital gains tax calculator takes a realised gain in pounds, the annual exempt allowance you still have for the tax year, your income tax band, and the asset type, then returns the tax owed under the main rates that have applied since 30 October 2024. Chargeable gain is the gain minus the allowance, floored at zero; that remainder is multiplied by eighteen percent for a basic-rate taxpayer on other assets or residential property, twenty-four percent for a higher or additional-rate taxpayer on those same assets, or thirty-two percent for carried interest. A negative gain is rejected as invalid input rather than inverted into a fabricated repayment.
What UK capital gains tax is and how the tax owed is formed
UK capital gains tax is charged on the chargeable gain that remains after you deduct allowable costs and the annual exempt allowance from a disposal. This calculator starts one step later: you already know the realised gain in pounds, and you pass the allowance you still have for the year. The rate table is the main UK CGT schedule from 30 October 2024.
Residential property that is not your only or main residence uses the same eighteen and twenty-four percent pair. Carried interest is taxed at thirty-two percent in every band. Example: a twenty thousand pound gain, a three thousand pound allowance, a basic-rate taxpayer and other assets leaves seventeen thousand taxable and tax of three thousand and sixty pounds.
A zero gain is likewise allowed and yields tax of zero. Money fields are rounded half-up to two decimal places so the tax matches ordinary sterling pence.
What you can do with it
Self Assessment worksheet from a broker gain
Enter the realised gain, the annual exempt allowance still unused, your income tax band, and other assets to lock the UK CGT owed before you copy it into a tax return draft.
Buy-to-let disposal that is not the main home
Use asset type residential with the matching income tax band to estimate tax on a UK property gain after the annual exempt allowance, without mixing in US holding-period rules.
Year-end pack for an accountant
Run the same four fields from a script so the tax figure in a client pack matches the browser check, including carried interest at thirty-two percent.
FAQ
How is UK capital gains tax calculated from a known gain?
Taxable gain is max(0, gain minus the allowance). Tax is that remainder times the UK CGT rate for the band and asset, rounded to pence.
What happens if the gain is negative?
A capital loss is not taxed as a negative UK capital gains tax bill, and the failure is not billed.
Which CGT rates does the calculator use?
Main rates from 30 October 2024: other and residential assets at 18% for basic-rate taxpayers and 24% for higher or additional-rate taxpayers; carried interest at 32% in every band. The whole taxable remainder is taxed at that single rate.
What is the annual exempt allowance in this tool?
It is the annual exempt amount you still have for the tax year, in pounds, which you supply. A typical individual amount from 2024/25 is 3000. If the allowance covers the whole gain, tax is zero.
What if my gain is smaller than my annual exempt allowance?
Then nothing is taxable and the tax owed is zero. The calculator shows a taxable gain of zero rather than an error, because a disposal that fits inside the annual exempt amount simply owes no capital gains tax.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/fin/capital-gains-tax-uk \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"gain":20000,"annual_exempt_allowance":3000,"income_tax_band":"basic","asset_type":"other"}'const res = await fetch("https://api.kit.forhosting.com/fin/capital-gains-tax-uk", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"gain": 20000,
"annual_exempt_allowance": 3000,
"income_tax_band": "basic",
"asset_type": "other"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/fin/capital-gains-tax-uk",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"gain": 20000,
"annual_exempt_allowance": 3000,
"income_tax_band": "basic",
"asset_type": "other"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/fin/capital-gains-tax-uk", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"gain":20000,"annual_exempt_allowance":3000,"income_tax_band":"basic","asset_type":"other"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"gain":20000,"annual_exempt_allowance":3000,"income_tax_band":"basic","asset_type":"other"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/fin/capital-gains-tax-uk", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"gain": 20000,
"annual_exempt_allowance": 3000,
"income_tax_band": "basic",
"asset_type": "other"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "fin.capital_gains_tax_uk",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_gain | 1000000000000 |
max_allowance | 1000000000000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Successful calls are billed at $0.002; invalid input is not charged.
What UK capital gains tax is and how the tax owed is formed
Subtract the allowance from the gain and floor the result at zero; that remainder is taxable_gain. Multiply taxable_gain by the rate that belongs to the pair of income tax band and asset type, and you have tax, the amount this endpoint returns as the primary result and again as amount so a dashboard can bind either key. Other assets — shares, crypto, unit trusts, and most personal possessions above the chattel limit — are taxed at eighteen percent when income_tax_band is basic and at twenty-four percent when the band is higher or additional. When the allowance is larger than the gain, taxable_gain is zero and the tax owed is zero: that is how a disposal inside the annual exempt amount is represented, not as an error. A negative gain is not a capital-loss relief claim and is not a repayment: it is rejected as invalid_input so a typo cannot emit a signed bill that a downstream ledger would post as a credit. The formula string in the response restates tax equals the maximum of zero and gain minus annual_exempt_allowance, times rate_percent over one hundred, so a reviewer can print the identity next to the number without reconstructing it.
Input contract, response shape, and error behaviour
Example: gain fifty thousand, allowance three thousand, higher band, residential asset yields forty-seven thousand taxable at twenty-four percent and tax of eleven thousand two hundred eighty. Prefer bare numbers over formatted strings; currency marks, thousands separators, and trailing unit labels are not parsed. Pair the result with your own Self Assessment step if you need a filed figure. POST a JSON body with two required finite numbers and two required enumerated strings, all in pounds sterling for a single tax year. gain is the realised capital gain after incidental costs of sale and allowable expenditure, before the annual exempt allowance, and must be greater than or equal to zero; aliases amount, capital_gain, gain_amount, realised_gain, and realized_gain are accepted so a broker export does not need a rename step. A negative gain fails with invalid_input naming gain and is not billed. annual_exempt_allowance is the annual exempt amount still available for the year and must be greater than or equal to zero; aliases aea, allowance, annual_exemption, exempt_amount, and annual_exempt_amount are accepted. income_tax_band must be one of basic, higher, or additional; aliases tax_band, band, and income_band are accepted. asset_type must be one of other, residential, or carried_interest; aliases asset and asset_class are accepted, and shares, crypto, property, and carried map onto the canonical values. Each money field may arrive as a JSON number or as a numeric string that matches a strict finite decimal pattern. Missing required fields, empty strings, non-finite values, unknown enumerations, or amounts above one trillion fail with invalid_input naming the field. On success the body echoes rounded gain, annual_exempt_allowance, income_tax_band, and asset_type, returns taxable_gain as the floored remainder, allowance_used as the lesser of gain and the allowance, rate_percent as the looked-up UK CGT rate, and tax and amount as the same half-up two-decimal product, plus currency GBP and a formula string you can print next to the numbers. This endpoint does not split a gain across unused basic-rate band, apply Business Asset Disposal Relief, Private Residence Relief, or losses brought forward, and it does not file a return. Pricing for a successful item is a flat $0.002.
Where a UK capital gains tax calculator earns its keep
They want the tax owed from a known gain, the annual exempt allowance still unused, an income tax band, and an asset class, without rebuilding the same subtraction and table lookup in a spreadsheet cell that drifts when someone forgets which rate applied after 30 October 2024. Individuals drafting a Self Assessment worksheet from a broker statement need a number they can paste beside the disposal. Classroom and bookkeeping courses that teach UK CGT need an oracle that rejects a negative gain instead of silently emitting a signed total a grader might treat as a repayment. Failed validation does not consume balance. Pair this capability with a separate relief or loss tool when you need those layers; keep this surface focused on the UK CGT tax owed that people mean when they search that phrase. Accountants reviewing a client pack before year end need the same identity a finance script will later call over the API. Property investors disposing of a buy-to-let that is not the main residence, and carry holders estimating a carried-interest charge, need the residential and carried_interest rows of the table rather than a single blended rate. Keep requests small, pin tax and taxable_gain in tests, and you get a reproducible sterling amount for planning notes, year-end packs, and lightweight tax notebooks without standing up a full Self Assessment system.
Technical questions
What does the UK capital gains tax calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.