I've used this a few times, both to check my home-brew calculations and now as a standalone calculator.
http://www.cgtcalculator.com/
It's been around for over a decade and has some good reviews.
https://www.accountingwe...r-gainslosses-on-shares
https://www.lemonfool.co.uk/viewtopic.php?t=2300
Of course you do need to know what you bought and sold the shares for. You do keep records, right? (^_-)
Tip:
play around with the examples in
http://www.cgtcalculator.com/ first so you understand its data format.
Then use a spreadsheet/Google sheets to format your own data in the required manner.
Once happy you know what you're doing, copy and paste your data from the spreadsheet into
http://www.cgtcalculator.com/ and give it a whirl.
Don't just start by entering your precious data into the online calculator. A fat finger can delete the lot !
Start as you mean to go on, with a spreadsheet.