This section applies if—
the relevant interest in a qualifying dwelling-house is sold, and
a balancing adjustment falls to be made under section 513 as a result of the sale.
If this section applies, the writing-down allowance for any chargeable period ending after the sale is—
RQExAB
where—
RQE is the amount of the residue of qualifying expenditure attributable to the dwelling-house immediately after the sale,
A is the length of the chargeable period, and
B is the length of the period from the date of the sale to the end of the period of 25 years beginning with the day on which the dwelling-house was first used.
On any later such sale, the writing-down allowance is further adjusted in accordance with this section.