Consider the final value first, which is the market value of the sold asset.
Now, you need to subtract the initial value that you paid while purchasing or buying that particular asset.
If you spend any money on advertising and other costs such as stamp duty, dealing charges, etc. they are considered as allowable expenses. Allowable expenses can be deducted from the CGT.
Also, there are sometimes capital losses which you can use to get tax relief. Now, you need to add all the capital gains you earned in a year and subtract capital losses and annual allowances which are tax-free from that amount. This allowance was 11,300 pounds (UK) for the financial year 2017-18. Now, taxes are levied based on this amount which also differs according to the asset types. For example, capital gains are taxed at 18 per cent for basic taxpayers and 28 per cent for high-rate taxpayers when it comes to property sales.