Thanks for your question, I am Sam and I am one of the UK tax experts here on Just Answer.
If you sell more than 18 months after a property has ceased to be your main residence -
The gain is calculated on the sale price, less the purchase price, which forms the initial gain.
From this initial gain, then deductions can be made, such as the costs to buy and sell (such as legal fees and estate agent fees) and the costs of any capital improvements (such as new bathroom, roof etc)
The amount left over, is then considered for tax reliefs, and you would be due private residence relief for the 31 years that you lived here (so if you owned this property for 34 years, then 31/34 of any gain would be exempt due to the private residence relief due) but you also will be entitled to private lettings relief, due to the fact that this property, has been your main residence, and you have let it out to tenants.
Private lettings relief allows up to a maximum of £40,000 exemption (its the lesser of a) the amount of gain on which private residence relief has been awarded b) the amount of gain left over after private residence relief has been applied OR c) £40,000
Then you also have the first £11,000 exempt (this is the annual exemption allowance, so this is due x 2 if the property is in joint names) so you can see the gain position left over may be quite low!
But the other consideration is this, as you are due to leave the UK, if you plan to spend more than 5 years out of the UK, during which you are treated as not resident (which means visits back to the UK are less than 91 days each tax year) then as long as you sell before any plan return to the UK, then you are exempt from capital gains due to non residency!!
If you plan to spend less than 5 years out of the UK, or none of the years qualify as not resident, then the gain will be declared but the deductions and reliefs advised, can be claimed.
Finally note that any gain must be declared to the tax department in your country of residence (whether this has UK tax implications or not) and finally - that as you are due to live abroad, that rental income will need to have tax deducted from it, by either the managing agent if you plan to have one, or the tenant , unless you register for the non resident landlord scheme - link here regarding this application (which allows you to have your rents paid without deduction of tax)
Either way you will need to complete a self assessment tax return each year - to declare the rental income along with any tax deducted, from which you will have personal allowances awarded against this, and any other UK income.
Let me know if you wish any clarification on any of the advise given,