🗓️ May 2024👀  loading

Deriving the Mortgage Payment Formula

Presenting how the formula for monthly mortgage payments is mathematically derived from the definition of an annuity loan.

poster for: deriving the mortgage payment formula
financemortgagepaymentmathexcel

I'll show you how to derive the mortgage formula for monthly payments:

A=PR12(1+R12)n(1+R12)n1A = P\frac{\frac{R}{12}(1 + \frac{R}{12})^n}{(1 + \frac{R}{12})^n - 1}

where

A=the monthly payment amountP=the mortgage principalR=the fixed annual interest raten=the mortgage duration, in months\begin{aligned} A &= \text{the monthly payment amount}\\ P &= \text{the mortgage principal}\\ R &= \text{the fixed annual interest rate}\\ n &= \text{the mortgage duration, in months}\\ \end{aligned}

For example, for a 30 year $500,000 mortgage, with a fixed annual interest rate of 6%, we'd have:

A=PR12(1+R12)n(1+R12)n1=500,0000.0612(1+0.0612)360(1+0.0612)36012997.75\begin{aligned} A &= P\frac{\frac{R}{12}(1 + \frac{R}{12})^n}{(1 + \frac{R}{12})^n - 1}\\ &= 500,000 \cdot \frac{\frac{0.06}{12}(1 + \frac{0.06}{12})^{360}}{(1 + \frac{0.06}{12})^{360} - 1}\\ &\approx 2997.75\\ \end{aligned}

Which means that the described mortgage incurs monthly payments of $2,997.75.

This number corresponds with Microsoft Excel's built-in PMT function.

microsoft excel's PMT payment function yielding a result of -2997,752626 for the parameters Rate equal to 6% / 12, Nper equal to 360, and Pv equal to 500.000

So let's see where this formula comes from.

Table of Contents

Annuity Loan Characteristics

We'll be looking at so-called annuity loans, which are characterised by the following properties:

After making nn annuity payments of exactly AA dollars (euro's, pounds, whatever), your loan will be completely paid off. Put differently: the principal repayment component of each of those nn annuities will add up to your original principal amount PP.

Below you'll find a typical loan repayment diagram with 12 annuities, showing how the monthly annuity AA remains constant from start to finish.

12 vertical bars of the same height of A units, where each bar contains the colors blue (for principal repayment) and pink (for interest), where the blue part makes up for about 10% in the first bar, and steadily increases until it makes up for about 95% in the twelfth bar

The sum of all blue bars is equal to PP.

This diagram also shows that the total amount of interest can easily surpass the principal payment amount PP, depending on the interest rate rr.

Take our 30 year mortgage from the introduction, for example. We calculated that a $500,000 principal at an annual interest rate of 6% corresponds to a monthly annuity of $2,997.75. So when you've paid off your mortgage after making 360 of these $2,997.75 payments, you would've paid the bank a grand total of $1,079,190, consisting of the $500,000 principal and $579,190 of interest.

It's good to be a bank 🙂

Principal Payment Formula

The main goal of this article, is to find a formula for the monthly annuity amount AA.

In preparation, we'll start by studying the following sequence

(Pk)k=0n=(P0,P1,P2,P3,,Pn)(P_k)_{k=0}^n = (P_0, P_1, P_2, P_3, \dots, P_n)

with PkP_k defined as the remaining principal after making kk annuity payments.

From this, it immediately follows that P0=PP_0 = P.

But what is P1P_1? In other words: how much do we owe the bank after making our first annuity payment?

Well, since the annuity amount AA remains constant throughout the loan's entire duration, this first payment has reduced our loan principal by some amount less than AA:

In other words:

P1=P(ArP)=P0(ArP0)\begin{aligned} P_1 &= P - (A - rP)\\ &= P_0 - (A - rP_0) \end{aligned}

We can capture this notion in a more general sense.

The remaining principal Pk+1P_{k+1} after making a total of k+1k+1 annuity payments is equal to the previous remaining principal PkP_k minus the principal repayment component of the (k+1)(k+1)-th annuity:

Pk+1=Pk(ArPk)=Pk(1+r)A\begin{aligned} P_{k+1} &= P_k - (A - rP_k)\\ &= P_k(1 + r) - A \end{aligned}

This recursive identity for Pk+1P_{k+1} in terms of PkP_k will eventually give us a formula for AA.

So, how can we turn this recursive identity Pk+1=Pk(1+r)AP_{k+1} = P_k(1 + r) - A into a single, non-recursive formula for PkP_k?

It usually helps to write out the first few terms, to see if a pattern can be detected.

P0=PP1=P0(1+r)A=P(1+r)AP2=P1(1+r)A=(P(1+r)A)(1+r)A=P(1+r)2A(1+r)AP3=P2(1+r)A=(P(1+r)2A(1+r)A)(1+r)A=P(1+r)3A(1+r)2A(1+r)A\begin{aligned} P_0 &= P\\[10pt] P_1 &= P_0(1 + r) - A\\ &= P(1 + r) - A\\[10pt] P_2 &= P_1(1 + r) - A\\ &= \bigl(P(1 + r) - A\bigr)(1 + r) - A\\ &= P(1 + r)^2 - A(1 + r) - A\\[10pt] P_3 &= P_2(1 + r) - A\\ &= \Bigl(P(1 + r)^2 - A(1 + r) - A\Bigr)(1 + r) - A\\ &= P(1 + r)^3 - A(1 + r)^2 - A(1 + r) - A \end{aligned}

From this, it seems like the following pattern is beginning to emerge:

Pk+1=P(1+r)k+1Aj=0k(1+r)jP_{k+1} = P(1 + r)^{k+1} - A\sum_{j=0}^{k}(1 + r)^j

Please note that this formula is just a guess at this point. We'd have to actually prove that this formula satisfies the recursive identity from the previous chapter.

But if the formula above were correct, that would be great, because we recognise the last term in this expression as the geometric sum:

j=0kxj=1xk+11x\sum_{j=0}^k x^j = \frac{1 - x^{k + 1}}{1 - x}\\

for any x1x \neq 1.

So we can let x=(1+r)x = (1 + r) because rr was assumed to be greater than zero, and reformulate our proposal for the Pk+1P_{k+1} formula.

Pk+1=P(1+r)k+1Aj=0k(1+r)j=P(1+r)k+1A1(1+r)k+11(1+r)=P(1+r)k+1Ar((1+r)k+11)\begin{aligned} P_{k+1} &= P(1 + r)^{k+1} - A\sum_{j=0}^{k}(1 + r)^j\\ &= P(1 + r)^{k+1} - A\frac{1 - (1 + r)^{k + 1}}{1 - (1 + r)}\\ &= P(1 + r)^{k+1} - \frac{A}{r}\Bigl((1 + r)^{k + 1} - 1\Bigr) \end{aligned}

Now, as a special case, note what happens if we let k+1=0k + 1 = 0:

P0=P(1+r)0Ar((1+r)01)=PAr(11)=P\begin{aligned} P_0 &= P(1 + r)^0 - \frac{A}{r}\Bigl((1+r)^0 - 1\Bigr)\\ &= P - \frac{A}{r}(1 - 1)\\ &= P \end{aligned}

This suggests that we can actually put forward a single proposal for the PkP_k formula, which should allow us to calculate the remaining principal after making kk annuity payments, for any kk with 0kn0 \leq k \leq n:

Pk=P(1+r)kAr((1+r)k1)P_k = P(1 + r)^k - \frac{A}{r}\Bigl((1 + r)^k - 1\Bigr)

We set out to find a simple formula for PkP_k which would satisfy the following recursive identity:

Pk+1=Pk(1+r)AP_{k+1} = P_k(1 + r) - A

Then, in the previous section, we put forward the following proposal:

Pk=P(1+r)kAr((1+r)k1)P_k = P(1 + r)^k - \frac{A}{r}\Bigl((1 + r)^k - 1\Bigr)

But we still need to prove that our proposal indeed satisfies the recursive identity. We'll do so by checking whether the expression Pk(1+r)AP_k(1 + r) - A indeed equals Pk+1P_{k+1}.

Here we go:

Pk(1+r)A=(P(1+r)kAr((1+r)k1))(1+r)A=P(1+r)k+1Ar((1+r)k+1(1+r))A=P(1+r)k+1Ar((1+r)k+11)+ArrA=P(1+r)k+1Ar((1+r)k+11)=Pk+1\begin{aligned} P_k(1 + r) - A &= \Biggl(P(1 + r)^k - \frac{A}{r}\Bigl((1 + r)^k - 1\Bigr)\Biggr)(1 + r) - A\\ &= P(1 + r)^{k + 1} - \frac{A}{r}\Bigl((1 + r)^{k + 1} - (1 + r)\Bigr) - A\\ &= P(1 + r)^{k + 1} - \frac{A}{r}\Bigl((1 + r)^{k + 1} - 1\Bigr) + \frac{A}{r}r - A\\ &= P(1 + r)^{k + 1} - \frac{A}{r}\Bigl((1 + r)^{k + 1} - 1\Bigr)\\ &= P_{k + 1}\\ \end{aligned}

This concludes the proof that our proposal for PkP_k is indeed correct.

Annuity Payment Formula

We've proven our formula for the remaining principal after making kk annuity payments:

Pk=P(1+r)kAr((1+r)k1))P_k = P(1 + r)^k - \frac{A}{r}\Bigl((1 + r)^k - 1)\Bigr)

Let's rephrase this equation to find an expression for AA:

A=rP(1+r)kPk(1+r)k1A = r\frac{P(1 + r)^k - P_k}{(1 + r)^k - 1}

Now, even though the symbol kk appears in the formula for AA, we know that it's actually independent of kk. Because it doesn't matter how many payments you've made, the annuity remains constant from start to finish. As noted before, this is a defining characteristic of annuity loans.

This means that if we knew of a particular kk and its corresponding PkP_k value, we could simply plug those into the formula above, and simplify the expression in such a way that the symbol kk no longer occurs.

One such kk is k=0k = 0, corresponding to P0=PP_0 = P. But we've already used this fact when defining the recursive relation for Pk+1P_{k+1} in terms of PkP_k. Attempting to use this fact for a second time doesn't yield anything useful:

A=rP(1+r)0P0(1+r)01=rPP11=???\begin{aligned} A &= r\frac{P(1 + r)^0 - P_0}{(1 + r)^0 - 1}\\[15pt] &= r\frac{P - P}{1 - 1}\\[15pt] &= \:??? \end{aligned}

But there's another kk we can use!

Remember how one of the characteristics of an annuity loan, is that it's completely paid off after making nn payments. This implies that k=nk = n corresponds with Pn=0P_n = 0.

Plugging these values into our formula for AA yields the following result:

A=rP(1+r)nPn(1+r)n1=Pr(1+r)n(1+r)n1\begin{aligned} A &= r\frac{P(1 + r)^n - P_n}{(1 + r)^n - 1}\\[15pt] &= P\frac{r(1 + r)^n}{(1 + r)^n - 1} \end{aligned}

where

A=the recurring annuity payment amountP=the loan principalr=the loan interest raten=the number of payments required to pay off the loan\begin{aligned} A &= \text{the recurring annuity payment amount}\\ P &= \text{the loan principal}\\ r &= \text{the loan interest rate}\\ n &= \text{the number of payments required to pay off the loan}\\ \end{aligned}

Let's take a moment to dive into a little detail of the formula we have just derived:

A=Pr(1+r)n(1+r)n1A = P\frac{r(1 + r)^n}{(1 + r)^n - 1}

But what are rr and nn, and how are they "linked" exactly?

For example, in case of a 30 year mortgage, you'll be tempted to set n=30n = 30, but that would only be true when paying your mortgage once per year, rather than monthly.

Under normal circumstances, you'd set n=360n = 360, corresponding with the number of monthly mortgage payments.

As for the interest variable, you'll be tempted to set r=0.06r = 0.06 in case of a mortgage with a fixed 6% annual interest and 360 monthly payments, but that would only be true if 6% were the monthly interest rate, rather than the annual interest.

An annual interest rate of 6% means that you're expacted to pay the bank 6% of the remaining principal, once per year.

a big blue bar labeled "remaining principal" on the left, separated by a vertical dashed line from a one-year timeline containing the months January through Februari, with a big "6%" label in the middle, and an arrow pointing from the "6%" label towards the big blue bar on the left

And so this 6% doesn't really apply to a typical mortgage with monthly payments.

In order to apply our 6% annual interest rate to a monthly payment schedule, we must somehow spread this single annual interest payment over 12 separate months.

This is done by dividing the annual interest rate by 12 in order to convert it into a monthly interest rate.

a big blue bar labeled "remaining principal" on the left, separated by a vertical dashed line from a one-year timeline containing the months January through Februari, with twelve blue vertical bars decreasing in size, with each of these twelve bars containing a "6% / 12" label and an arrow pointing to the previous blue bar on the left

This brings us to the final formula of this article, which can be used for determining the monthly payment amount for a mortgage with a fixed interest rate.

A=PR12(1+R12)n(1+R12)n1A = P\frac{\frac{R}{12}(1 + \frac{R}{12})^n}{(1 + \frac{R}{12})^n - 1}

where

A=the monthly payment amountP=the mortgage principalR=the fixed annual interest raten=the mortgage duration, in months\begin{aligned} A &= \text{the monthly payment amount}\\ P &= \text{the mortgage principal}\\ R &= \text{the fixed annual interest rate}\\ n &= \text{the mortgage duration, in months}\\ \end{aligned}