About portfolio and taxes

I’m reading that capital gain generated by the selling of a portfolio (not ISA/SIPP) is counted using FIFO (First in First out) in the context of taxation.

This translates, as I understand into something e.g. like this:

1st Jan - I invest £ 1000
1st Feb - I invest £ 1000
1st March - At this point my portfolio is worth say £ 2100
I could withdraw £ 2000 tax free, as this was the initial investment.

However, if I mix and match investments and return (like the an old portfolio I own for a decade) the situation becomes blurry. Because it will have a stack of Investment/return/investment/return/investment/etc

Is there any way I can predict the tax due planning to sell “a” given amount from my portfolio? Something that would take into account the FIFO approach and any interest in between?

Thanks

Gordon Brown replaced the FIFO with “section 104” investment pool. All the shares in the Section 104 holding are regarded as indistinguishable; there is no matching after holding 30 days. It is your responsibilty to maintain pool records. I suggest you Look “section 104” up on the HMRC website.