You won't pay CGT on the proportion of the time that you lived in it. In addition, since you lived in it at some point, the final 3 years are treated as though you lived in it even if you didn't. So to put some figures on it:
Say you bought it for £50,000 10 years ago
You sell it for £200,000 now
So you have 5.5 years living in it, and 4.5 years not living in it. Of those 4.5 years, the last 3 are treated as though you did live in it for tax purposes - leaving 1.5 years of the 10 to pay tax on.
So you would pay capital gains tax on 1.5/10 of the gain or 15% of it.
You'd take off any sales fees (e.g. estate agent fees) and also any capital improvements - e.g. if you spent £15,000 on an extension, off the gain itself:
Calculation of gain:
Sales price £200,000
Estate agent fees £(2,000)
Purchase price £(50,000)
Extension cost £(15,000)
This would leave you with a gain of £133,000 (calculated as 200,000 - 2,000 - 50,000 - 15,000. Obviously if you didn't do extensions etc just miss out that last figure. You can't include repairs/painting etc)
£133,000 x 15% = £19,950
You can then take off that the tax-free Capital Gain allowance for the year - for 2011-12 this is £10,600. So 19,950 - 10,600 = 9,350. You then pay CGT at the appropriate % on this - 18% if you're a lower rate taxpayer, 28% if a higher rate (40%) taxpayer. I'm not sure of the rules if the taxable gain takes you over the threshold for earnings....would need to check.