Skip to main content

Getting started with Capital Gains Tax

If you've sold shares and aren't sure whether you owe tax — or how to work it out — start here. This guide assumes no tax knowledge. It explains what Capital Gains Tax (CGT) is, what it does and doesn't apply to, and walks through the whole process at a high level, linking to a detailed worked example for each step along the way.

What is Capital Gains Tax?

When you sell something for more than you paid, the profit is a capital gain, and Capital Gains Tax is the tax on that gain. Crucially, it is a tax on the gain, not on the total amount you sold for — if you sell £20,000.00 of shares that cost you £18,000.00, the gain is £2,000.00, and that £2,000.00 is what matters for tax.

You generally have to deal with CGT yourself: unlike the tax on your salary, it isn't taken off automatically. If your gains for the year are large enough (see allowances below), it's your responsibility to report them to HMRC and pay what's due. This guide — and the calculator — exist to make that manageable.

Run into a term you don't recognise? The jargon buster explains every CGT word and acronym used in these guides in plain English.

What's taxed, and what's exempt

CGT on investments applies when you sell assets held in a general (taxable) account. The most common cases this calculator is built for are:

  • Shares — in listed companies, funds and ETFs, and also in private/unlisted companies.
  • Cryptoassets — HMRC treats most crypto disposals like share disposals, with the same pooling and matching rules.

Held in an ISA or pension? You can stop reading.

Investments inside an ISA or a pension (including a SIPP) are exempt from Capital Gains Tax. You can buy and sell within those wrappers as much as you like without a CGT bill, and you don't report those disposals. CGT only bites on assets held outside a tax wrapper.

What this calculator does not cover

This tool is focused on shares, funds and crypto. CGT also applies to other things, but they have different rules and deadlines and are out of scope here:

  • Property of any kind (buy-to-let, second homes, land, your main home if it doesn't qualify for private-residence relief). Property CGT has its own rules and a separate 60-day report-and-pay deadline — see HMRC's property guidance.
  • Other chargeable assets such as valuable personal possessions, business assets, or disposals qualifying for reliefs like Business Asset Disposal Relief.

This site is for information only and does not provide tax advice. Always check the figures against your own records and consult a qualified tax adviser before filing.

The tax-free allowance

Everyone gets a yearly tax-free amount called the annual exempt amount — currently £3,000 for 2026/27. You only pay CGT on gains above it. It has fallen sharply in recent years, and the rate you pay depends on your income. See the full rates & allowances guide for the current figures and recent history.

How a gain is worked out — it's not just “sale minus purchase”

For a single share bought once and sold once, the gain really is just sale price minus what you paid (plus dealing costs). But almost nobody's situation is that tidy — you might buy the same share several times, or sell and buy back. The hard part of CGT is deciding which shares you actually sold, and therefore what they cost. HMRC has a fixed set of rules for that, and the rest of this guide walks through them.

Step 1 — Fees and exchange rates are factored in

Before any matching begins, each trade's cost is adjusted: dealing fees are folded into the purchase cost (increasing it) or subtracted from the sale proceeds (reducing them). If the trade was in a foreign currency, it's converted to GBP at the exchange rate on the trade date. These adjustments happen once, upfront, so by the time matching runs every figure is already in GBP with fees included.

Read the full guide to fees and exchange rates →

Step 2 — Same-day trades are merged

Next, HMRC tidies up your day's trading: all purchases of the same share on the same day are treated as one combined purchase, and all sales of it that day as one combined sale. This “merging” keeps the sums manageable and happens automatically in the calculator.

Read the full guide to same-day merging →

Step 3 — Match the sale against your shares, in order

To cost a sale, HMRC works through three matching rules in a fixed priority. Each share is matched by the first rule that applies, then the next rule handles what's left:

  1. The same-day rule — shares bought on the same day as the sale are matched first.
  2. The bed & breakfast (30-day) rule — next, shares bought back in the 30 days after the sale.
  3. The Section 104 pool — anything left is matched against your pooled holding at its average cost per share.

In practice, a single sale often uses more than one rule

These rules aren't either/or. One big sale can be split across all three — some shares matched same-day, some to a buy-back, and the rest from the pool — each with a different cost. The all-three-rules walkthrough shows exactly that, end to end, with the full gain calculation broken down.

A special case — transferring shares to a spouse

Not every disposal is a sale. If you transfer shares to your spouse or civil partner, the transfer happens on a no-gain/no-loss basis — no CGT is due at that point, and your partner inherits your original cost. This is a common planning move (for example, to use both partners' allowances) and also applies when assets are split on divorce or separation.

Read the full guide to transferring shares →

Step 4 — Apply the allowance, then work out the tax

Add up your gains and losses across all disposals in the tax year, then subtract the annual exempt amount (£3,000 for 2026/27). Whatever is left is your taxable gain. Losses are set off before the allowance, and unused losses from earlier years can be carried forward.

The tax itself is the taxable gain × your CGT rate, and your income decides that rate. Your salary and other income fill up a yearly basic-rate band first (roughly the first £37,700.00 above your personal allowance); your gain is then stacked on top of that income. For 2026/27, the part of the gain that still fits inside the band is taxed at 18%, and anything above it at 24%. If your income already fills the band, the whole gain is at 24%.

When a rate changes mid-year

CGT rates rose partway through 2024/25 (on 30 October 2024). In a year like that, gains before the change date use the old rate and gains on/after it use the new one. HMRC lets you set your allowance and losses against the higher-rate gains first (the most beneficial order), and the calculator does this for you. See how rate-change years are handled.

Step 5 — Report and pay

You must tell HMRC about your disposals if either is true for the tax year:

  • your taxable gain is above the annual exempt amount (£3,000); or
  • your total proceeds (the amount you sold for, not the gain) exceed the reporting threshold of £50,000 — even if no tax is due.

You report through Self Assessment or HMRC's real-time “report and pay” service. Keep a record of every buy and sell (with dates, quantities and fees) so the figures can be evidenced — that's exactly what the calculator produces.

Don't miss the deadlines

For share and crypto gains reported through Self Assessment, the key dates are: register for Self Assessment by 5 October after the tax year if you haven't before, then file your return and pay any tax by 31 January following the end of the tax year. (Property is different — that has a separate 60-day deadline.)

Let the calculator do it

All of the above is automated. Import your trades from a CSV or spreadsheet, and the calculator merges same-day trades, applies the three matching rules in the correct order, subtracts the right year's allowance, handles mid-year rate changes, and gives you a per-disposal breakdown you can check against your records.

Open the calculator

Sources

The rules and figures in this guide come from HMRC and GOV.UK. This site is independent and not affiliated with HMRC.