When you sell or dispose of your own home you won't have to pay any Capital Gains Tax if you satisfy two conditions. For the whole time you've owned it both the following must apply:
You might not get the full amount of relief because you have let your home. The final 18 months that you own it will be treated as if you lived there, even if you didn't. The property must have been your only or main home at some time during the time that you owned it.
You are going to need to proarte between the gain on the time it was your main home and the time you used it for letting.
You may get another relief known as 'Letting Relief'.
The maximum amount of Letting Relief due is the lower of:
You will need to work out your gain before you can see how much CGT you would be liable for.
1 subsidiary questions: Are there any other qualifying criteria for letting relief ? I can't find any on the HMRC website.