Thanks for replying to my question.
So what I think your saying is, the amount of capital gains tax is calculated for the period when it wasn't your primary residence so it's not an all or nothing calculation. So if I owned a property for 10 years and for one year it was not my primary residence I would have to pay 10% of the 18% or 28% capital gains tax as a whole so basically either 1.8% or 2.8%. If my house is sold in six months time then this would roughly be the calculation because after adding on the 18 months grace period it would be around 1 year out of probably 12 by then which as you say would be below my capital gains allowance for that year.
Could you confirm if the above is correct, a one line reply would be plenty.