Home Guides & News About Us Contact
Updated Jul 2026

UK Shares Capital Gains Tax Calculator (2026/27)

Capital Gains Tax on shares is charged at 18% and 24% for 2026/27, with a £3,000 annual exempt amount - and one gain can be taxed at both rates. In full history mode this calculator applies HMRC's full matching rules (same-day, then 30-day, then the Section 104 pool), imports your broker's CSV, and produces a Self Assessment-ready summary.

Quick estimate: one holding, one sale. Full transaction history: paste every buy, sell, split and bonus and get HMRC same-day / 30-day / Section 104 matching, per-year tax and a Self Assessment-ready summary.

1. Tax Year & Income
?
?
£
?
£

2. Build Purchase Pool (Section 104)
Qty Cost Action
No purchases added.
Total: 0 £0.00

3. Enter Your Sale
£
Data processed locally. We do not store financial details.
1. Your income & allowances (per tax year)

Fill in only the years you sold shares. Income sets whether each slice of gain is taxed at the lower or higher rate.

£
£
£
£
£
£
£
£
£

2. Add your transactions

The importer reads the formats it knows it can read correctly: Trading 212 trade exports, Interactive Investor statement exports, files exported from this page, and simple files you build yourself with columns for Date, Type (buy or sell), Security, Quantity, Amount and optional Fees. Anything else is refused rather than guessed at - a column the importer cannot account for can change what a row means, and a wrong guess means a wrong tax figure. If your file is refused, the page offers to email us its column headings (only the headings - your figures never leave your browser) and we will look at adding the format. Every import shows a read-back first - trade count, first rows, per-security totals - and nothing is added until you confirm. Dates read as UK day-first; totals must be in pounds (a foreign-currency price per share is fine when the file also carries a pound total, as Trading 212 exports do). Dividend, interest and deposit rows are skipped for you. Export your FULL history, not just this tax year - the pool needs every purchase back to the first share you still held. Most brokers cap each export (Trading 212: 12 months per file), so import each file in turn: rows already imported are skipped automatically using their order IDs, and overlapping exports will not double-count. Splits and bonus issues: add those manually below, or re-import a file exported from this page.

Or add transactions one at a time:

DateTypeSecurityDetailRemove
No transactions added yet.

The transactions export re-imports into this page, so you can save your history for your records, amend it in a spreadsheet, or add next year's trades and pick up where you left off. The report export includes the SA108 box figures and the full disposal-by-disposal audit trail.

Enter shares of the same company/fund under an identical name so they pool together. Splits and bonus issues adjust the pool but are never acquisitions for the 30-day rule.

Everything is calculated in your browser. We never store or send your transactions.

How the Section 104 pool works

When you sell UK shares you cannot pick which ones you sold. HMRC pools all shares of the same company into a single HMRC's method for valuing shares of the same class bought at different times. All purchases are averaged into one pooled cost per share, used to work out the gain when you sell. and averages the cost: (total cost of all shares owned ÷ total number of shares) = average cost per share. This calculator builds that pool for you, and in full transaction history mode it applies the complete HMRC matching order to every sale. Prefer to follow the maths yourself first? Read how to calculate CGT on shares.

The order HMRC matches shares

You do not choose which shares you sold, and it is not first-in-first-out. Every disposal is matched against your purchases in a fixed order:

  1. Same-day rule: shares bought on the day of the sale are matched first.
  2. Selling shares to use your CGT allowance then quickly rebuying them. HMRC blocks it - shares rebought within 30 days match to the sale, not the cheaper pool, so no gain is crystallised. (30 days): shares bought in the 30 days after the sale come next - this stops you selling to use your allowance and instantly buying back. It only applies if you were UK resident when you rebought, and new shares from a rights or bonus issue do not count as fresh purchases here.
  3. Section 104 pool: everything else is matched to your pooled average cost.

In full transaction history mode the calculator applies all three rules to every sale and its report shows exactly which purchases each sale was matched against. The difference is not academic: match part of a sale to a 30-day repurchase instead of the pool and the gain changes.

HMRC's share matching order changes the gain on a saleSelling 500 shares and rebuying 200 within 30 days: assuming everything comes from the pool overstates the gain at 6,500 pounds. HMRC's matching order gives 200 pounds on the 200 shares matched to the 30-day rebuy plus 3,900 pounds on the 300 shares matched to the pool: 4,100 pounds in total.Which shares did you sell? HMRC decidessell 500 at £18, rebuy 200 at £17 within 30 days - matched in a fixed order: same day, then next 30 days, then your poolIf you wrongly use the pool for all 500 shares£6,500 "gain" - overstatedWhat HMRC's matching order actually gives: £4,100200 shares → £200300 shares → £3,90030-day rebuySection 104 poolThe calculator applies this order to every sale automatically.Source: HMRC HS284 & CG51560 · matching rules apply UK-wideukfinancetools.co.uk
Sell 500 shares at £18 and rebuy 200 at £17 within 30 days: HMRC matches 200 shares to the rebuy (£200 gain) and 300 to the pool (£3,900), £4,100 in total - not the £6,500 the pool alone would suggest.

Import your broker’s CSV - one pool across every account

HMRC pools per person, not per platform. If you hold the same fund with two brokers it is still a single Section 104 holding, and the “book cost” your platform displays may not follow HMRC’s matching rules at all. Import the trade history from each account together and the calculator builds the combined pool the tax rules expect. Use your full history, not a single tax year: the pool is built from every purchase you have ever made in a security, so a part-year export cannot compute it and the calculator will tell you which sale it cannot match.

Everything runs in your browser: your transactions are never uploaded or stored. Export gives you two files - a transactions CSV that re-imports here (your save file for adding next year’s trades), and a full report with the Self Assessment figures and a disposal-by-disposal audit trail.

How your gain is actually taxed

This is where most calculators mislead you. CGT is not simply "18% if you are a basic-rate taxpayer". Your taxable gain - after the £3,000 annual exempt amount - is stacked on top of your income. The slice that still fits inside the basic-rate band (up to £50,270) is taxed at 18%; anything above is taxed at 24%. A single gain can be split across both rates.

How a capital gain is split across the 18% and 24% rates Your taxable gain stacks on top of your income. With £40,000 income, the slice of the gain up to the £50,270 basic-rate limit is taxed at 18% and the rest at 24%. Your gain stacks on your income Income £40,000 18% 24% basic-rate limit £50,270 income gain at 18% gain at 24% Source: gov.uk · the £50,270 CGT band test is UK-wide, including Scottish taxpayersukfinancetools.co.uk
The portion of a gain that fits below the £50,270 basic-rate limit is taxed at 18%; the rest at 24%.

Worked example: income £40,000, gain £20,000. After the £3,000 allowance, £17,000 is taxable. Exactly £10,270 (the £50,270 basic-rate limit minus your £40,000 income) fills the rest of the basic-rate band at 18%, and the remaining £6,730 is taxed at 24%.

Scottish taxpayer? CGT still uses the UK-wide bands

Income tax bands are devolved; Capital Gains Tax is not. Scottish higher-rate income tax starts above £43,662 in 2026/27, but the CGT split point stays at the UK-wide £50,270 for every UK taxpayer. A Scot already paying higher-rate income tax can therefore still have part of a gain taxed at 18%. The calculator applies the UK-wide test automatically, wherever in the UK you live. For the full explanation and a Scotland-defaulted version, see the capital gains tax Scotland calculator.

Using capital losses

Losses on other share disposals are deducted from your gains in the same year first. If losses remain, they carry forward indefinitely - but you must claim them within 4 years of the end of the tax year in which they arose, so report a loss on your tax return even in a year you owe nothing. Brought-forward losses are only used down to the level of the annual exempt amount, never below it, so the allowance is not wasted.

Crystallising a gain without breaking the 30-day rule

Selling to use your £3,000 allowance and rebuying the same shares within 30 days does not work - the bed & breakfast rule matches the repurchase to the sale. The legitimate alternatives that keep you invested are to rebuy through your spouse (bed-and-spouse), rebuy the holding inside an ISA (bed-and-ISA), or buy a similar but not identical fund.

Deductible costs

You can reduce the gain by the incidental costs of buying and selling: broker fees and commission, and Stamp Duty Reserve Tax (SDRT, usually 0.5%) paid on purchase. In full transaction history mode, enter these in the fees column - imported fee columns are picked up automatically.

Reporting and paying

Share gains are not reported through the 60-day service - that is only for UK residential property. Report shares on your Self Assessment return, or HMRC’s real-time CGT service. You must report if your gains exceed £3,000 or, if you file Self Assessment, when your total proceeds exceed £50,000 - even when the gain is within the allowance. The full report export includes the figures the SA108 capital gains pages ask for.

The 2026/27 rates

Share CGT has been 18% and 24% since 30 October 2024, aligned with residential-property rates, with a £3,000 annual exempt amount. Selling a second property too? Use the property CGT calculator.

Selling crypto? HMRC pools fungible tokens the same way (NFTs excepted) - Section 104 averaging with the same-day and 30-day rules - so the maths here applies, though this tool is built for shares. See HMRC’s Cryptoassets Manual.

Hold income funds? Reinvested income in Fund or ETF units that reinvest income instead of paying it out. The reinvested income is still taxed each year and must be added to your Section 104 cost, or you overpay CGT on sale. is taxed as income but also raises your pool cost - our guide to CGT on shares covers this, plus RSU and foreign-share cost basis, in full.

Not sure what acquisition cost to enter for shares you got through work? Include the amount already taxed as income at acquisition, not just what you paid - see our employee share scheme tax guide.

Frequently Asked Questions

What is the "Bed and Breakfasting" rule?

The "Bed and Breakfasting" rule prevents you from selling shares to crystallise a capital gain (to use your allowance) and immediately buying them back. If you buy the same shares back within 30 days of selling them, the new purchase is matched with the sale, bypassing the Section 104 Pool. In full transaction history mode this calculator applies the 30-day matching to every sale for you.

Can I deduct buying and selling costs?

Yes. You can deduct "incidental costs of disposal" such as stockbroker fees and Stamp Duty Reserve Tax (SDRT) from your gain. In quick mode, include these costs in your "Total Cost" entry for purchases or deduct them from your "Sale Proceeds". In full transaction history mode, enter them in the fees column - imported fee columns are picked up automatically.

Do shares held with different brokers go into one pool?

Yes. The Section 104 pool is per person and per security across all your taxable accounts, not per broker. If you hold the same share on two platforms, HMRC treats it as one pooled holding, and the "book cost" each platform shows you may not follow HMRC rules. Import the history from every account together so the calculator builds the combined pool.

I am a Scottish taxpayer - which tax bands apply to my CGT?

Capital Gains Tax is not devolved, so the split between the 18% and 24% rates uses the UK-wide 50,270 pound threshold even if you pay Scottish income tax, whose higher rate starts above 43,662 pounds in 2026/27. A Scottish higher-rate income taxpayer can still have part of a gain taxed at 18%.

Does the 30-day rule apply if I rebuy inside an ISA?

No. Shares bought inside an ISA or a pension are not matched against a sale in your general account, because those wrappers sit outside Capital Gains Tax entirely. That is why bed-and-ISA works as a way to crystallise a gain and stay invested, where simply rebuying in the same account would not.

Which broker CSV files can I import?

The importer reads four formats: Trading 212 trade exports, Interactive Investor statement exports, files exported from this page, and simple hand-built files with columns for Date, Type (buy or sell), Security, Quantity, Amount and optional Fees. Anything else is refused rather than guessed at, because a misread column means a wrong tax figure - if your file is not recognised, the page offers to email us its column headings (only the headings, shown in full first - your figures never leave your browser) and we will look at adding the format. Every import shows a read-back of what it found - trade count, first rows, per-security totals - before anything is added. Where your broker caps each export at 12 months, as Trading 212 does, import each file in turn and duplicate rows are skipped automatically by order ID. Nothing is uploaded - the file is read entirely in your browser.

Do I pay tax on shares held in an ISA?

No. Shares held within a Stocks & Shares ISA are completely free from Capital Gains Tax and Dividend Tax. You do not need to report ISA gains to HMRC.

Can I use a capital loss from a previous year?

Yes. Capital losses carry forward indefinitely once claimed, and you must claim a loss within 4 years of the end of the tax year it arose. Brought-forward losses reduce gains only down to the 3,000 pound annual exempt amount, so you keep the benefit of the allowance.

Do I report share gains within 60 days?

No. The 60-day report-and-pay deadline applies only to UK residential property. Report share gains through your Self Assessment return or HMRC real-time CGT service. You must report if your gains exceed 3,000 pounds or, if you already file Self Assessment, when your total proceeds exceed 50,000 pounds.