Thanks for your question - I am Sam and I am one of the Uk tax experts here on Just Answer
The capital gain would be calculated as follows -
The initial gain would be the difference between the purchase and sale price from which the costs to buy and sell (so legal fees, estate agent fees and stamp duty) can be deducted. Also you can deduct the costs of any capital improvements, such as a new kitchen or bathroom
Then with the gain left - what exemption is due is considered, as you lived there for 6 out of 16 years, then this 6 years plus the last 18 months of ownership can be exempted for private residence relief -
So 7.5/16 years x gain
Then as this was once your home and you let it out, then as long as you declared all the rental income to HMRC, then you are also due exemption called private lettings relief.
Private lettings relief is the lesser of
1) the amount of gain exempt for private residence relief
2) The amount of gain left over AFTER private residence relief has been applied OR
Then finally you deduct the annual exemption allowance of £11,100 and then if any gain remains then you consider at what rate to make the charge,
If you are a higher rate taxpayer on your annual income then the gain will be charged at 28%, if you are a basic rate taxpayer then whatever basic rate remains unused (from the basic rate band) then you can have the equivalent of this amount at 18% and any remaining gain at 28%
Now onto the purchase, if your mother remains living there - then not only she have a capital gain (on the farm itself as it would have been as used within the trade) she also will be liable to consideration for Inheritance tax as she will continue to benefits form this transfer if a gift, but if you pay full market value then this will have no impact on her INheritance tax as you would have been sold it at full market value.
Unless you expect to exceed a £250,000 profit then never use a limited company - plus then if you did, then you have issues with the farmhouse that would be exempt from capital gains (corporation tax) if held in your sole name (sole trader) as it would be your home - and then fully exempt under the private residence relief rules.