How to calculate Capital Gains on shares?
How to calculate Capital Gains on shares?
Author
Discussion

2Btoo

Original Poster:

3,792 posts

230 months

Wednesday 11th June 2025
quotequote all
Guys,

A Q about how to calculate Capital Gains (CG) on share purchases.

Imagine I buy 10 shares in a company for a given amount - perhaps £10/share. Total £100.

I later buy another 20 shares at £15/share in the same company. This is another £300, so total £400 paid for the shares.

Later again, I sell 10 of these shares for £20 each. What is the gain that I have made on those 10? Is it deemed that I have sold from the second batch of shares that I bought, meaning that the gain is £50? Or have I sold from the first batch of shares, meaning the gain is £100?

Does it make a difference if they have been purchased through the same broker, or different brokers? (In practice they are all through the same broker, but this question is for curiosity).

ALSO, what if I ALSO buy some shares in another company and sell them at a loss, within the same tax period as I sold the shares in the first company (mentioned above). Can I offset the loss on the shares in the second company against the profit made on the shares from the first company.

Thanks!


C69

1,218 posts

39 months

Wednesday 11th June 2025
quotequote all
In most cases you use the average purchase cost, as per this: https://www.gov.uk/tax-sell-shares/same-company

If you've got two separate transactions with one making a profit and one making a loss, then the latter should be able to offset the former.

CharlesElliott

2,259 posts

309 months

Wednesday 11th June 2025
quotequote all
It's called a Section 104 holding, and it means that every share is valued at the average purchase price. There are exceptions for buy / sells on the same day or within 30 days.

CharlesElliott

2,259 posts

309 months

Wednesday 11th June 2025
quotequote all
And yes, you can offset your losses against the profit.

alscar

9,099 posts

240 months

Wednesday 11th June 2025
quotequote all
And if your losses in one tax year exceed your profits for CGT purposes you can also then carry forward said loss to the next tax year.

Panamax

9,188 posts

61 months

Wednesday 11th June 2025
quotequote all
The underlying message is that to keep your CGT position simple it's best to buy holdings once and once only, otherwise the averaging process can distort your overall picture if/when you want to realise some gains/cash.

In the world of Funds this is generally easy to achieve as there are so many different funds which are fundamentally similar.

If it's CGT on funds, particularly Acc funds, don't forget that accumulted taxed dividends increase your "cost" and any equalisation received decreases your "cost".

Holdings of Inc units with "income reivested" can be particularly awkward in CGT calculations. Best avoided IMO.

Another nuance: Switching between Inc and Acc units (or vice versa) of the same fund is NOT a disposal forCGT purposes.

Mr Pointy

13,277 posts

186 months

Wednesday 11th June 2025
quotequote all
Panamax said:
Another nuance: Switching between Inc and Acc units (or vice versa) of the same fund is NOT a disposal forCGT purposes.
Is that so? I didn't know that & have held off switching some of the funds in my GIA to avoid triggering CGT.

ferret50

2,819 posts

36 months

Wednesday 11th June 2025
quotequote all
Keep them in a shocks and stares ISA, zero tax on exit.

Simples

Mr Pointy

13,277 posts

186 months

Wednesday 11th June 2025
quotequote all
ferret50 said:
Keep them in a shocks and stares ISA, zero tax on exit.

Simples
My ISA is fully contributed. The GIA is holding the excess I can't get into the ISA.

NowWatchThisDrive

1,302 posts

131 months

Thursday 12th June 2025
quotequote all
Panamax said:
The underlying message is that to keep your CGT position simple it's best to buy holdings once and once only, otherwise the averaging process can distort your overall picture if/when you want to realise some gains/cash.
I wouldn't go that far, the rules might be a little unintuitive at first but it's not rocket science. You can track it easily enough in a spreadsheet, or there are websites like http://www.cgtcalculator.com (don't use it myself but it seems pretty accurate and I've seen it recommended plenty) that take in all your transactions line-by-line and spit out all the calculations.

CambsBill

2,437 posts

205 months

Thursday 12th June 2025
quotequote all
Panamax said:
The underlying message is that to keep your CGT position simple it's best to buy holdings once and once only, otherwise the averaging process can distort your overall picture if/when you want to realise some gains/cash.
All well & good until you tick the box that says "reinvest dividends". Does the averaging rule still apply to any sales then?

Mr Pointy

13,277 posts

186 months

Thursday 12th June 2025
quotequote all
NowWatchThisDrive said:
Panamax said:
The underlying message is that to keep your CGT position simple it's best to buy holdings once and once only, otherwise the averaging process can distort your overall picture if/when you want to realise some gains/cash.
I wouldn't go that far, the rules might be a little unintuitive at first but it's not rocket science. You can track it easily enough in a spreadsheet, or there are websites like http://www.cgtcalculator.com (don't use it myself but it seems pretty accurate and I've seen it recommended plenty) that take in all your transactions line-by-line and spit out all the calculations.
It can very messy very quickly. Try tracking the CGT implications of selling shares from the utilities selloffs in the late 90s (if you see Sid, tell him). You ended up with shares in Centrica. Lattice, Aviva, Scottish Hydro, Southern Electric, SSE, National Grid, Shell A, Shell B, then just Shell plus others & then add in shares issued if you elected for DRIP schemes. You end up just estimating it & hoping HMRC don't ask to see the calculations.

Panamax

9,188 posts

61 months

Thursday 12th June 2025
quotequote all
CambsBill said:
All well & good until you tick the box that says "reinvest dividends". Does the averaging rule still apply to any sales then?
Yes, the averaging rule applies - which is why my previous post strongly suggested that ticking the "reinvest dividends" box can be a bad idea for holdings in a general investment account. Unless you enjoy very detailed administration.

Even with Acc units you need to keep track of taxable dividends to avoid over-paying CGT. The annual tax free allowance is now so low that many more people find themselves with CGT liability. The old trick of using your CGT allowance to fund your £20k ISA each year is now pretty much toast.

IMO the smooth move in GIA is to buy Income units, receive the cash dividends and then from time to time buy a stand-alone investment which can in due course have its own simple calculations.

In a world where many things are possible I tend to favour the simplest solution.

Panamax

9,188 posts

61 months

Thursday 12th June 2025
quotequote all
NowWatchThisDrive said:
never had any issues or been pulled up on anything.
CGT is a very hard tax for HMRC to police, especially where detailed holdings are concerned. They're much happier raping BTL landlords and second home owners under the "report and pay" regime where their big computer in the sky can easily keep an eye on things via SDLT returns and so on.

The best they can usually do is random review of a few submitted CGT returns, and even if they find a wobble the chances of a cost-effective outcome are pretty small unless someone's seriously been taking the proverbial. I suspect the bigger enforcement question is whether things get reported at all rather than whether the calculations are 100% correct.

xeny

5,446 posts

105 months

Friday 13th June 2025
quotequote all
Panamax said:
Yes, the averaging rule applies - which is why my previous post strongly suggested that ticking the "reinvest dividends" box can be a bad idea for holdings in a general investment account. Unless you enjoy very detailed administration.

Even with Acc units you need to keep track of taxable dividends to avoid over-paying CGT. The annual tax free allowance is now so low that many more people find themselves with CGT liability. The old trick of using your CGT allowance to fund your £20k ISA each year is now pretty much toast.

IMO the smooth move in GIA is to buy Income units, receive the cash dividends and then from time to time buy a stand-alone investment which can in due course have its own simple calculations.

In a world where many things are possible I tend to favour the simplest solution.
Any online broker I have used has reported an averaged purchase price when I've made multiple dividend reinvestments, so I haven't found admin for dividend reinvested Income units so bad.

Holding Acc units in a GIA is my personal idea of hell, Inc units every time.

I still aim to harvest 3K of CGT allowance each year. Sometimes I have to sell more than £20K to do so, sometimes I sell far less, but it's at least reducing the future tax liability.

zbc

1,040 posts

178 months

Tuesday 21st July
quotequote all
I have a question about calculating gains on share sales and the first part of the answer here was quite useful and confirmed most of what I thought but I have a follow up. I only plan to sell some of my shares and I expect to receive some new shares from my employer in future. I have all the details available from when I received the shares on several different occasions and I can easily work out a weighted gain from this but what would happen next time I want to sell some. Irrespective of calculating the average weighted gain I could choose to specifically sell the shares with the biggest gain now and then next time these shares would no longer be in my account and the "fresh" average weighted gain would be much less. Or do I have to keep some sort of ongoing average weighted gain, that assumes that I sold a weighted mix of shares this time even if I didn't. Also I'm in France rather than the UK and all of the CGT is this and put them in an ISA aren't relevant but it seems the gain is calculated in the same way. And there are no dividends so the reinvestment comments aren't relevant here.

Edited by zbc on Tuesday 21st July 16:17

Granadier

1,267 posts

54 months

Tuesday 21st July
quotequote all
Interesting thread. Is each individual share in a company identifiable in some way with its own serial number? Presumably this was the case in the old days with paper share certificates. I would have assumed that when you buy some shares in a company, the company needs to keep track of who its shareholders are, so each share is registered somehow. Therefore in the OP's situation, it could be tracked whether the individual shares that he sold were from the first batch he bought, or from the second. But I expect in modern electronic trading, there is no such identification of individual shares?

Jon39

14,822 posts

170 months

Tuesday 21st July
quotequote all

It was even more complex in the 'old days', which is why I have always taken dividends as cash and never reinvested.
Yes, I know reinvestment is best for returns, if a business prospers, but not so good for mental well being.

Initial purchase cost was noted along with the RPI inflation number.
Imagine quarterly dividends, each one counting as a separate additional purchase and every RPI figures had to be recorded.

Then when selling, trying to adjust all those costs by the inflation change.
At least there was no CGT payable on inflation (unlike now).
Wonder if all that brain activity might be of help fending off dementure ?

I suppose we could forget the whole thing and hold until we are put in a box.
No CGT applicable then (THOSE ARE THE RULES AT PRESENT, BUT JUST WAIT).


Panamax

9,188 posts

61 months

Tuesday 21st July
quotequote all
Shares, like cash, are fungible.

Also, there are pooling rules for UK tax purposes.

The Gauge

7,090 posts

40 months

Tuesday 21st July
quotequote all
Jon39 said:

It was even more complex in the 'old days', which is why I have always taken dividends as cash and never reinvested.
Would the tax man see that cash income as being possibly liable to dividend tax?

I don't know if I'm up to date with current dividend tax allowances?....

£500 annual allowance
10.75% (Basic rate tax payer)
33.75% (Higher rate)
39.35% (Top rate)

Edited by The Gauge on Tuesday 21st July 17:46