HOme Loan Prepayment Calculator

Principal P:


Interest Rate i (in %):


Original Duration n (in months):


Monthly Repayment R:

Interest Paid:

Month of First Prepayment m:


New Monthly Repayment S:


Actual Duration n':

Actual Interest Paid:

How to use the Home Loan Prepayment Calculator

The calculator accepts the following as its inputs:

1) The Principal (P) which is the loan amount.
2) The Interest Rate (i) which is the nominal interest rate compounded monthly.
3) The Original Duration (n) which is the original duration of the loan in months. This results in n equal monthly repayments that repay the loan in full after exactly n months.

The “Monthly Repayment & Interest Paid” button, calculates the monthly repayment R and total interest paid on the loan given that no prepayment is present.

The calculator accepts a further two inputs that define the prepayment structure of the loan:

4) The Month of First Prepayment (m) is the month from which the repayments are increased from R to a constant value S. Note that m is an integer between 1 and n.
5) The New Monthly Repayment (S) is the repayment amount that is going to be paid monthly from month m onwards in order to prepay the loan. Note that S must be greater than R in order to result in prepayments and thus an early repayment of the loan.

The “Actual Duration & Interest Paid” button, calculates the duration n' in months given that prepayment is present and also the actual interest paid given that prepayment is made as defined by the inputs m and S.

Example: Suppose that we have a loan of amount 100,000 with a nominal interest rate of 3% compounded monthly that will be repaid in full in 20 years. Thus the first set of inputs for the calculator are P=100000, i=3 and n=20\times 12=240. When we click the “Monthly Repayment & Interest Paid” button, we obtain 554.60 for the Monthly Repayment and 33103.42 for the Interest Paid. This means that according to the repayment schedule, if we pay 554.60 per month, we will be able to repay such a loan in exactly 20 years (that is, 240 months). Moreover, we will paying a total interest of €33,103.42 over the whole duration of the loan.

Suppose that we are going to start the prepayments from the sixth year of the loan, where the monthly repayment is going to be 700 instead of the usual 554.60. Thus the second set of inputs consists of m=121 and S=700. When we click the “Actual Duration” button, we obtain 212. This means that at month 212 (that is, in 17\frac{2}{3} years), the loan will be repaid in full.

Mathematical Derivation of the Monthly Repayment & Interest Paid

Consider a loan which has an associated principal amount P, yearly interest rate i compounded monthly and term n months. The borrower pays back n equal monthly payments of amount R each, in order to redeem the loan. The loan repayments can be visualised with the help of a timeline:

Home Loan Repayment TimelineThe source code for drawing Timeline diagrams with ‘ggplot2’ in R is available here

The principal P is the present value of the n repayment each of amount R, using the interest rate of \frac{i}{12}. Thus:

    \begin{equation*} \begin{split} P&=R(1+\frac{i}{12})^{-1}+R(1+\frac{i}{12})^{-2}+\cdots+R(1+\frac{i}{12})^{-n}\\ &=R(1+\frac{i}{12})^{-1} \frac{1-(1+\frac{i}{12})^{-n}}{1-(1+\frac{i}{12})^{-1}}\mbox{ using the formula for the sum of a G.P.}\\ &=R\frac{1-(1+\frac{i}{12})^{-n}}{\frac{i}{12}} \end{split} \end{equation*}

By making R subject of the formula, we can see that the repayment amount R can be calculated from P, i and n by using the equation:

    \begin{equation*}R=P\frac{(\frac{i}{12})}{1-(1+\frac{i}{12})^{-n}}. \end{equation*}

The total interest paid is the sum of the total repayments made to the bank over the duration of the loan minus the principal amount P. This is calculated by the equation:

    \begin{equation*} Rn-P \end{equation*}

Mathematical Derivation of the Actual Duration

Now suppose that from the m^{th} repayment onwards, the repayment amount becomes S instead of R where S>R and 1\leq m \leq n. In the case when m=1, the prepayments starts from the first payment, that is the end of the first month. In the case where m=n, the prepayment starts from the last payment, which results in no prepayment, because the loan would have either way be closed with that last payment.

The following time line shows the repayments of the loan when prepayment is present. The variable n' describes the new duration of the loan in months, given that prepayment is present.

Home Loan Prepayment Timeline

The loan amount P is thus the present value of m-1 payments each of amount R and n'-m+1 payments of S, and thus we obtain the following equation:

P=R(1+\frac{i}{12})^{-1}+\cdots+R(1+\frac{i}{12})^{-(m-1)}+S(1+\frac{i}{12})^{-m}+\cdots+S(1+\frac{i}{12})^{-n'}.

Using the theory related to geometic progressions, the equation is simplified as:

P=\frac{R(1-(1+\frac{i}{12})^{-(m-1)})}{(\frac{i}{12})}+\frac{S(1+\frac{i}{12})^{1-m}(1-(1+\frac{i}{12})^{-(n'-m+1)})}{(\frac{i}{12})}

Making n' subject of the formula, we get:

n'=\frac{\ln(S)-\ln[(1+\frac{i}{12})^{1-m}(S-R)-(\frac{i}{12})P+R]}{\ln(1+\frac{i}{12})}

Since n' must be an integer, the duration of the loan in months given that the prepayment starts from month m, is given by:

\bigg\lceil\frac{\ln(S)-\ln[(1+\frac{i}{12})^{1-m}(S-R)-(\frac{i}{12})P+R]}{\ln(1+\frac{i}{12})}\bigg\rceil

Mathematical Derivation of the Actual Interest Paid

Let us consider the prepayment starting at month m, where the monthly repayment increases from R to S. At time n', we do not know the exact repayment amount that would close off the loan. Let us denote the repayment amount at time n' by T. The value of T could lie anywhere in the range 0< \leq S. Hence the loan, given that prepayments are present could be represented by the following timeline:

Home Loan Prepayment Timeline 2

Thus, the principal P is the present value of m-1 payments of size R, n'-m payments of size S and one payment of size T. So we obtain the following equation:

    \begin{equation*} P=R(1+\frac{i}{12})^{-1}+\cdots+R(1+\frac{i}{12})^{-(m-1)}+S(1+\frac{i}{12})^{-m}+\cdots+S(1+\frac{i}{12})^{-(n'-1)}+T(1+\frac{i}{12})^{-n'} \end{equation*}

When the equation is simplified and T is made subject of the formula, we can deduce the size of the last payment made at time n':

    \begin{equation*} T=(1+\frac{i}{12})^{n'}\bigg(P-\frac{R(1-(1+\frac{i}{12})^{-(m-1)})}{(\frac{i}{12})}-\frac{S(1+\frac{i}{12})^{-(m-1)}(1-(1+\frac{i}{12})^{-(n'-m)})}{(\frac{i}{12})}\bigg) \end{equation*}

The actual interest paid is the sum of all the repayments minus the principal, given by the formula:

    \begin{equation*} R(m-1)+S(n'-m)+T-P \end{equation*}