No part of a gain to which section 222 applies shall be a chargeable gain if the dwelling-house or part of a dwelling-house has been the individual's only or main residence throughout the period of ownership, or throughout the period of ownership except for all or any part of the last 9 months of that period.
Where subsection (1) above does not apply, a fraction of the gain shall not be a chargeable gain, and that fraction shall be—
For the purposes of sections 222(5) and 222A and subsections (1) and (2) above—
shall be treated as if in that period of absence the dwelling-house or the part of the dwelling-house were occupied by the individual as a residence if conditions A and B are met.
Condition A is that before the period there was a time when the dwelling-house was the individual's only or main residence.
Condition B is that after the period—
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
In this section "period of ownership"—
Paragraph (b) of the definition of "period of ownership" does not apply in a case where paragraph 8 or 14 of Schedule 4AA applies (the individual has made an election for the retrospective basis of computation to apply).
In this section "period of absence" means a period during which the dwelling-house or the part of the dwelling-house was not occupied by the individual as a residence.
This section is subject to—