4 Calculation of the amount of rebate
1 The amount of the rebate is the difference between the total amount of the repayments of credit that would fall due for payment after the settlement date if early settlement did not take place and the amount given by the following formula—
∑i=1mAi(1+r)aiminus∑j=1nBj(1+r)bj
where:

Ai
the amount of the ith advance of credit,

Bj
the amount of the jth repayment of credit,

r
the periodic rate equivalent of the APR/100,

m
the number of advances of credit made before the settlement date,

n
the number of repayments of credit made before the settlement date,

ai
the time between the ith advance of credit and the settlement date, expressed in periods,

bj
the time between the jth repayment of credit and the settlement date, expressed in periods, and
Σ represents the sum of all the terms indicated.
2 In calculating the rebate, where the creditor so elects, any repayment of credit made at a time or a rate other than that provided for in the agreement shall be taken to have been made at the time or rate provided for.
3 The examples set out in the Schedule to these Regulations have effect for the purpose of illustrating the calculation provided for in paragraph (1); in the case of conflict between any example and any other provision of these Regulations, that other provision shall prevail.