How the property was financed, is not relevant to the Captial Gains Tax calculation; so deposits and mortgages etc can be ignored.
The Capital Gains Tax calculation is only concerned with the purchase price and purchase costs, as well as the disposal amount and disposal costs.
There is a tax calculator here:
Tax when you sell your home
This calculator will help you work out your gain.
You can save the final calculation as a PDF file and then move to the next stage on the website, which is to create a Capital Gains account.
This account will allow you to report and pay and tax due.
Please note that you need to report and pay any Capital Gains Tax within 60 days of the completion date, when disposing of UK residential property and land.