s 509 Calculation of allowance after sale of relevant interest
(1) This section applies if— (a) the relevant interest in a qualifying dwelling-house is sold, and (b) a balancing adjustment falls to be made under section 513 as a result of the sale. (2) If this section applies, the writing-down allowance for any chargeable period ending after the sale is— 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. (3) On any later such sale, the writing-down allowance is further adjusted in accordance with this section.