So what you get for your main property is Principle Private Residence relief. That applies for the proportion of the time that you own the property for which you live there.
If you then rent the property out once you aren't there, you are likely to be eligible for lettings relief. This only functions up to a certain increase in value I think, but my tax knowledge is a few years out of date.
Then on top of that you certainly used to get the last 18 months of increase as a relief as well. I think it's now 9 months.
Then you have your annual CGT allowance on top of all that.
So doing an imaginary scenario:
Cost bought for £200k in June 2012.
Lived in house until Dec 2017
Rented house out til June 2019
House solve in June 2022 for £400k
We'll ignore fees for now though they reduce the gain.
So the gain is £200k.
50% of that is eligible for relief under PPR - £100k.
25% may be eligible as lettings relief. £50k. This is actually then capped at £40k which is the maximum lettings relief available.
Then the remaining 2.5 years (30 months) has a total gain of £50k or £1.67k per month - 9 months will have a gain of £15k eligible for relief.
So of a total gain of £200k, £155k is eligible for relief.
So £45k is unrelieved. You then deduct your CGT allowance of £12,300 so it's down to £33k you would need to pay tax on, at 28% and very soon after the property sale - you can't just wait til the end of the next financial year.
Obviously this is an imaginary scenario and it might not be 100% right but hopefully it gives you an idea of what the process is so you can work out the scale of the risk to you.
www.gov.uk/government/publications/private-residence-relief-hs283-self-assessment-helpsheet/hs283-private-residence-relief-2022#calculating-the-gain-where-only-partial-relief-is-due