This part of GOV.UK is being rebuilt – find out what beta means

HMRC internal manual

Capital Gains Manual

Private residence relief: end of period of ownership

There is no special rule to determine the end of the period of ownership. So the end of the period of ownership is the date of disposal of the residence which is used in computing the gain, see CG14250+.