Thank you for your question..
There have been changes to how capital gains arising from sale of residential property are taxed for non residents for UK tax puposes with effect from 6 Apr 2015.
As you have owned and lived in the property for almost four years before going to live abroad, there are 3 ways to calculate your gain or loss and these are covered under "Calculate your gain or loss manually" here
In your case, you would work out the gain over the whole period and avail private residence relief to cover your gain and therefore pay no CGT.
More information on private residence relief is covered in helpsheet HS283 here
I hope this is helpful and answers your question.
If you have any other questions, please ask me before you rate my service – I’ll be happy to respond.
Thank you for your reply.
You will be able to claim private residence relief for the whole period even if the disposal takes place a few weeks after leaving the country.
If you are happy and there are no more issues I will appreciate if you would kindly rate/accept the service I provided to ensure I get credited for it by Just Answer.
I thank you for accepting my answer.