The gain is always calculated by the sale price less the acquisition (or purchase) value - this forms the initial gain.
From this initial gin you can deduct the costs to buy and sell (such as legal or broker fees) and also where property is concerned - the costs of any major capital improvements.
Then if property tax reliefs are applied if this was ever your main home and also if you let t out to tenants (and declared the rental income to HMRC)
Then the first £11,100 is exempt (as this is the annual exemption allowance)
Then its a question of what rate is due on any remaining gain which is determined by you annual income.
I have added a link that details this more https://www.gov.uk/capital-gains-tax/work-out-need-to-pay but do feel free to ask any follow up question re my response