Hello,

In order to make optimum use of a tax-free allowance, I would like to calculate each year how many shares I need to sell in order to realise a specified profit.
The difficulty is that the data basis is a list of purchases and sales at different prices. The shares that have been in the portfolio the longest are always sold first; first in - first out. To be honest, I have no idea how to do this and would be very grateful if you could give me some pointers.

All the best!