Where—
the part of the gain that is within subsection (3) is a chargeable gain only to the extent, if any, to which it exceeds the amount in subsection (4).
The condition is that—
The part of the gain that is within this subsection is the part that (but for subsection (1)) would be a chargeable gain by reason of the fact that, at the times in the individual's period of ownership when the condition in subsection (2) is met, the individual's only or main residence does not include the part of the dwelling-house that is being let out as residential accommodation.
The amount is whichever is the lesser of—
Where by reason of section 222(7)(a) the individual's period of ownership mentioned in subsection (1) begins with the beginning of the period of ownership of another person, any question whether the condition in subsection (2) is met at a time that is within both those periods of ownership is to be determined as if the references in subsection (2) to the individual were to that other person.