Private residence relief is available to the extent that the property was your only or main residence during the period relating to the gain reported on this return. If you have more than one residence at the same time, you may need to nominate the UK property as your only or main residence when claiming relief.
For disposals before 06/04/2020 if you occupied the property as your only or main residence at any time during your ownership (including before 6 April 2015) you are entitled to relief for the final 18 months of ownership, irrespective of how the property was used in that period. You may also be entitled to absence relief and lettings relief for periods when it is not your only or main residence.
For tax years starting 6 April 2015 or later, unless absence reliefs apply, a residence is not regarded as your only or main residence for the year unless between you and your spouse/civil partner you stay at the property for at least 90 days (the 'day count' test) or you or your spouse/civil partner were a UK tax resident for that year.
For further information about private residence relief, follow the link below on the GOV.UK website.