There is one exception to this rule - if a property has been your main residence at any time during your ownership of it, then this exemption extends to the last 36 months before you sell it, even if in fact you have another main residence during that period.
The idea of the legislation is to take account of the fact that you may need to buy a new home before you manage to sell the old one, but it provides an opportunity for some useful tax planning.
If you have more than one āresidenceā, the law allows you to nominate which one is to be treated as your āmain residenceā for tax purposes and so enjoy the exemption from CGT. You must do this within two years of it becoming necessary to decide which is your main residence.
Once you have made this nomination, by writing to the tax office that deals with your tax affairs, you can subsequently vary that nomination at any time in the future, and the variation can be backdated by up to two years. In the case of a married couple or civil partnership, both must sign the nomination and any subsequent variation.
Donāt forget stamp duty - The rules are different here in Wales. But, if you buy a second property you pay a higher rate of stamp duty on the second property. You can claim it back if you sell one within the time limit. Itās not my field but this might be useful to consider / check.