Whilst Capital Gains Tax applies to most assets that are disposed of, it does not generally apply to the disposal of the main residence.
Care needs to be taken where part of the main residence is sold. In the situation where a tax payer lives in a house on a quite large block of land and part of that land is excised and sold – e.g. to allow road widening, then the main residence has not been sold and Capital Gains Tax would be applicable on the land. In other words, it is the house that is exempt, not the whole property.
In this example costs would be allowable for proportionate costs of the land and disposal expenses, but it has become a separate asset from the house and land and therefore subject to tax.