HELP?? Selling from Pies & Share Value

Looking for some help and clarity please!

I bought stock for a Pie in February - 0.1619096 @ $149.45
I bought more stock for the pie from the same company in Sept - 0.3487052 @$175.02

Stupidly and accidently trying withdraw from one particular stock on the app and I some how managed to “sell” some shares from the whole pie. Looks like it was selling them across all the stocks in the pie but I did manage to cancel it before it completed.

However, it did successfully sell 0.0205922 @ $171.90 from the above mentioned shares.

I’ve been using excel to monitor each of my purchases and updating the latest share price to see the gain/loss on that purchase.
My question / lack of understanding…
If I have the two purchases from the same company (as above) and Trading 212 has completed the “sell” of 0.0205922 shares from this company, how is this split across the two different purchases and how do I track this?

My current method of keeping a record on these in excel, in particular the above mentioned stock, is…

  • February 2023 - Purchase of (company) 0.16191 @ $149.45 = $24.20
    Latest stock price$ x 0.16191 shares = $+/- gain or loss on this purchase.

  • September 2023 - Purchase of (company) 0.3487052 @ $175.02 = $61.03
    Latest stock price$ x 0.16191 shares = $+/- gain or loss on this purchase.

How do I now show the sell of 0.0205922 @ $171.90 from this one company. Does it come from just one of my purchase (Feb or Sep), is it split across both of these and my collective stock holding? What is the best way for me to track this now and still be able to see the gain/loss from by purchases in the February and September separately?

Thank you very much!
-from a newbie!

If it’s in an invest account then it’s normally last in first out (September in your case) for capital gains tax purposes in the UK. Check the capital gains tax rules, especially if you are not a UK tax payer. Assuming UK I’d just always do last in first out for consistency. That is on a sale allocate against the latest purchase first, and then if the quantity on the sale is bigger than the quantity on the purchase then allocate any quantity that’s left against the next purchase back in time etc.

I think shares work on pooled cost now.

Yes. I was wrong and Scrooge_McCodf is right. It’s on a pooled basis now. (I think it must have changed some time.) Refer to Tax when you sell shares: Selling shares in the same company - GOV.UK.

I would track depending on how you held for tax purposes. UK is AVCO I think so possibly track that?