Answers after your questions:
Can you tell me if the flat is still owned solely by your wife or it is now in joint names. How long has the flat been owned? Solely owned by my wife
If you can let me have the following information, I'll do some calculations for you:
1 The month and year the flat was bought and what it cost to buy.
About 15 years ago and cost £150k
2 Did you wife move in right away?
3 The month and year she moved out and when the flat was first let. Has it been let more or less continuously since?
Moved out 5 years ago and mostly rented since
4 Was it ever your (not your wife's as I know that) main home?
Before we married we lived there together but I had a rented flat too
5 The month and year the flat was put into joint names if that is the case. If it si were you living there at the time?
Never put into joint names
5 The value of the flat now.
Just so you understand, I know that there is a calculation of how much capital gains we would have to pay based on the number of years lived in compared to rented etc. However, what we are trying to understand is if there is a legal way to completely avoid the tax. If we moved in and lived there for 6 month then sold it, would that count as our main residence and therefore avoid the tax.