Hi cp3,
If the share are of the same company and same kind, you can pool them together and use an average value for the acquisition cost. This will be deducted from the disposal value, along with broker fees etc, to work out your gain/loss. In this way it does not matter whether the share disposed of is older or newer than any other disposed at the same time. This is known as a section 104 holding.
Please have a look at the guidance at helpsheet HS284 for more information.
Shares and Capital Gains Tax (Self Assessment helpsheet HS284).
Thank you.