- Home
- Capital gains tax on shares
Capital gains tax on shares: a free calculator
Last updated . Written by Divisio Capital. Figures checked against GOV.UK on 15 November 2026.
In 2026/27 you can make £3,000 of gains before capital gains tax, then pay 18% on gains within your basic rate band and 24% above it. Shares in an ISA or a pension are outside it.
The calculator below works out the gain on one share the way HMRC matches a sale: shares bought the same day, then shares bought in the 30 days after, then the section 104 pool. It is free and needs no account.
HMRC's own calculator can't be used if you sold other shares in the tax year (GOV.UK, Tax when you sell shares: work out your gain). This one takes several buys and sales of one share and matches each sale in HMRC's order: the same day, the next 30 days, then the section 104 pool. Gains on other shares or assets go in as a total. It is an estimate, not a tax return.
Work out the gain on one share
Nothing you type leaves this page. The sums run in your browser: nothing is sent anywhere or saved, and it all clears when you close or reload the page.
Enter every buy and sale of the share in a general account, in pounds, in any order. Dealing costs are the broker's fee and any stamp duty for that trade. For a share priced in dollars, use the pound amounts on your broker's statement for each trade.
Buys and sales
The rest of your tax year (optional)
From other shares or assets you sold, before their losses.
Only losses you have reported to HMRC.
Salary, pension and other income, not counting these gains. It sets how much is taxed at 18% and how much at 24%.
An estimate, not a tax return. It uses GOV.UK's figures for the year you pick: the £3,000 annual exempt amount, 18% and 24%, a £37,700 basic rate band and the standard £12,570 Personal Allowance. Shares in an ISA or a pension have no capital gains tax, so leave them out.
Divisio works out every holding from a broker's file, across your accounts (ISAs and pensions left out), with the tax year's sales matched as you go. It is free while in beta. Try it with your own holdings.
What the calculator assumes
- You were UK resident when you bought each share (HS284 applies the 30-day rule only then).
- No rights issues, bonus issues, takeovers or share splits, and no shares held on 31 March 1982.
- Your basic rate band is the standard £37,700. Pension payments and Gift Aid can make it bigger (HMRC's SA110 notes); the calculator does not add them.
- If you pay Scottish Income Tax, it still uses the UK band of £37,700. HMRC's tax calculation notes for 2025/26 use that UK band for capital gains for every taxpayer, with Scottish rates on other income; GOV.UK's capital gains pages do not mention Scotland, so check with HMRC if you are unsure.
- Amounts are worked out exactly and each is shown to the nearest penny, so lines added up by hand can be a penny away from their total. HMRC's own examples round each step to the pound, so a figure can differ from theirs by £1.
Figures: GOV.UK, Capital Gains Tax rates and annual tax-free allowances, Capital Gains Tax rates, Income Tax rates and allowances, Capital Gains Tax: losses and HMRC's HS284 helpsheet and SA110 tax calculation notes. Checked against GOV.UK on 15 November 2026.
In a Divisio account the same matching runs on every holding at once, from the purchases you have recorded or imported; you can see it on the demo's example portfolios without signing up.
The 2026/27 allowance and rates
| What | 2026/27 |
|---|---|
| Annual exempt amount (tax-free allowance) | £3,000 |
| Rate on gains within your basic rate Income Tax band | 18% |
| Rate on gains above it (and for higher and additional rate taxpayers) | 24% |
Sources: GOV.UK, Capital Gains Tax rates and annual tax-free allowances and Capital Gains Tax: what you pay it on, rates and allowances. The Budget on 28 October 2026 lists the same allowance and rates for 2027/28 (Budget 2026, Annex A: rates and allowances). Checked against GOV.UK on 15 November 2026.
A worked example
You hold 1,000 shares of Company A in a general account: 400 bought for £1,000 and 600 bought later for £2,400. You sell 250 of them for £1,250, and buy none back that day or in the 30 days after, so the sale is matched with the pool.
| The pool: 1,000 shares costing £1,000 + £2,400 | £3,400.00 |
| Average cost a share: £3,400 ÷ 1,000 | £3.40 |
| Proceeds of the 250 sold | £1,250.00 |
| Cost of the 250 sold: 250 × £3.40 | £850.00 |
| Gain | £400.00 |
| Left in the pool: 750 shares | £2,550.00 |
With no other gains this tax year, £400 is inside the £3,000 allowance and no tax is due on it. Fees are left out here to keep the sums clear; in practice dealing fees and stamp duty count, and Divisio counts them where your broker's file lists them. The guide to capital gains tax on shares has a longer example with fees and a buy-back within 30 days.
How HMRC matches a sale, and how Divisio follows it
If you bought the same share more than once, the gain depends on which purchases a sale is matched with. HMRC's helpsheet HS284 sets the order, and both the calculator above and Divisio's capital gains page follow it for every sale:
- The same day. Shares bought on the day of the sale are matched first.
- The next 30 days. Then shares bought in the 30 days after the sale (often called bed and breakfasting), earliest first. Shares matched this way never join the pool.
- The section 104 holding. Everything else is matched with the pool: all your other purchases of that share together, at their average cost.
The same-day and 30-day rules guide and the section 104 holding guide work through each rule in pounds.
Source: GOV.UK, HS284 Shares and Capital Gains Tax (2026).
What goes into the figure in a Divisio account
This part is about Divisio's capital gains page in your account, not the free calculator above. The figure it gives for every holding counts:
- Your costs. Stamp duty and dealing fees that your broker's file lists for a trade are counted: the costs of buying are part of what the shares cost, and the costs of selling come off what you sold them for. GOV.UK lists stockbrokers' fees and Stamp Duty Reserve Tax among the costs you can deduct (Tax when you sell shares: work out your gain).
- Pounds throughout. A US share bought in dollars is counted in pounds: each purchase at the exchange rate of its own date, the sale at today's rate.
- The whole tax year. Sales you have already made since 6 April are counted first, from every portfolio that is not an ISA, SIPP, Lifetime ISA or Junior ISA, so the allowance is only used once.
- Losses. This year's losses are set against this year's gains before the allowance. Losses from earlier years come off after that, and only down to the allowance, so none is used up where no tax was due; Divisio fills them in from your own earlier sales.
- Your income. You enter your income for the year before the Personal Allowance, leaving out the gains, and Divisio uses it to split the gain between the 18% and 24% rates. With the box left empty, it works the tax out as if you had no income and says what it would be if your income used up the basic rate band.
What the account's figure leaves out
In a Divisio account, a portfolio marked as a Stocks and Shares ISA, a SIPP, a Lifetime ISA or a Junior ISA is left out of the figure. In the free calculator above, leave ISA and pension trades out. GOV.UK lists shares you have put into an ISA among those you do not pay Capital Gains Tax on (Tax when you sell shares). If you hold the same share in an ISA and in a general account, only the general account's purchases and sales are matched. The ISA portfolio tracking page says how each account type is treated.
Both the free calculator and the figure in your account are estimates that show what a sale would cost in tax. Neither is a tax return, and neither covers property, which has its own rules.
Which plan it is on
The calculator on this page is free for anyone, with no account: one share at a time, from what you type. Divisio's capital gains page in your account does every holding at once, from your broker's file, with the tax year's sales matched as you go. The pricing section lists that under Premium, planned at £12.99 a month and not available yet. During the beta every feature is free, the capital gains page included, and no card is asked for.
Related
The guide to capital gains tax on shares goes through the same rules in plain English. If your shares pay income as well, see the dividend tracker; for the rest of what Divisio does, see the UK portfolio tracker page.
Questions people ask
Do I pay capital gains tax on shares in a Stocks and Shares ISA?
No. GOV.UK lists shares you have put into an ISA among the shares you do not pay Capital Gains Tax on (Tax when you sell shares).
What is the capital gains tax allowance for 2026/27?
£3,000 for an individual. Gains above it are taxed at 18% within your basic rate band and 24% above it.
How do I report a gain on shares?
GOV.UK gives two ways: in a Self Assessment tax return for the tax year after the sale, or through HMRC's online service to report and pay Capital Gains Tax, where you report by 31 December in the tax year after the gain and pay by 31 January (Report and pay your Capital Gains Tax).
When do I have to report a gain on shares?
GOV.UK says you report and pay if your taxable gains for the tax year are above your allowance, which is £3,000 for 2025/26 and for 2026/27. If you are registered for Self Assessment, you also report your gains in your tax return when the total you sold the assets for was more than £50,000, even if your gains are under the allowance. That £50,000 limit applies from 2023/24 onwards (Capital Gains Tax: work out if you need to pay).
Did the October 2026 Budget change capital gains tax on shares?
Not the allowance or the rates: the Budget on 28 October 2026 lists £3,000, 18% and 24% for 2027/28, as for 2026/27. It also said Stamp Duty and Stamp Duty Reserve Tax on shares will be replaced by a Securities Transfer Tax from late 2027 (Budget 2026: Overview of tax legislation and rates, paragraph 1.64).
Is the calculator free?
Yes. It needs no account and no sign-up, and it works out one share at a time. Divisio's own capital gains page, which does every holding from your broker's file, is free during the beta.
Is what I type sent anywhere?
No. The calculator runs in your browser: what you type is not sent to Divisio or anyone else, and it is not saved. Reload the page and it is gone.
Is the figure a tax return?
No. It is an estimate from the trades you enter or record, to help you see what a sale would cost before you make it. Your Self Assessment return or HMRC's own service is where a gain is reported.
See your own shares this way
Add what you own, from any broker, in a couple of minutes. Every feature is free during the beta, and no card is asked for. Or look round the demo first: two example portfolios, no sign-up.
For informational purposes only, not financial or tax advice. Tax rules depend on your own circumstances and can change; GOV.UK has the rules in full. Prices from Yahoo Finance, which can be delayed, usually by 15 minutes and on some exchanges by more.