## Mortgages and mathematics

Wed 08 January 2014

I've had to think about mortgages lately. At first this seemed like a boring chore, but it generated a bit more interest (pun alert!) when I noticed that most mortgages are based on a mathematical series. What's more, I found it hard to find a clear explanation of the mathematics involved - hence this post.

A mortgage is a long term loan usually used to fund the purchase of a property. There are two types of mortgage. The simplest kind is interest only, and that really is rental of money. You don't have to pay anything more than the interest during the term of the loan, but at the end you must pay the loan amount back in full. You could do that by selling the house, or by using some savings or other investment. In real terms, you don't pay back the amount you borrow, because inflation will have substantially eroded it: £100,000 in 1994 bought a lot more than would £100,000 in 2014.

The more common type of mortgage is the repayment mortgage, also referred to as capital and interest. In this scheme, you pay off some of the loan, often referred to as 'capital', as well as the interest at regular intervals over the term of the mortgage so that by the end of mortgage term you owe nothing and own the property.

In this blog post, I want to consider how payments are split between capital and interest. If you appreciate that interest payments will decrease on every payment of capital, you'll soon see that this split can significantly affect the total amount of interest paid over the whole mortgage.

I'll use the example of a £100,000 mortgage for a 20 year term at a 6% annual interest rate, where the payment is made, and interest calculated, at the end of each year. In reality, most mortgage payments are made more frequently, most usually monthly. This can also affect the overall cost of the mortgage, but isn't what I want to highlight in this post. I'll give a link at the end to a good online book that deals with that and other details.

At the end of the first year, you pay interest on all of £100,000, so that £6000 of interest is due. Let's say that you choose to pay £10,000 in capital. The first thing to realise is that you will not pay any interest on that £10,000 for the next 19 years. This saves on paying £600 per year for the next 19 years, which totals to £600×19=£11,400.

Clearly, the borrower will benefit from paying as much capital as possible early on, and conversely, the lender benefits most if little capital is paid early on. But, do lenders force borrowers to pay little capital up front?

To answer the question, let's start with what I consider to be the most straightforward approach. Each year, the borrower pays back the same amount of capital £100,000/20=£5000 and pays interest on the amount outstanding. So the schedule will look like this:

Year Amount owed Interest
0 £100,000
1 £95,000 £6000
2 £90,000 £5700
3 £85,000 £5400
...
19 £10,000 £600
20 £5000 £300
21 £0 £0

The combined repayment plus interest in year 1 is £5000+£6000=£11,000 and reduces by £300 each year until in the last year it is only £5300. This is what makes most sense to me because it is the simplest mathematically, but this is not the standard schedule used by most lenders.

The standard schedule involves keeping the total payment of capital plus interest constant. I see some sense in this, in that it is easier to explain to a typical customer during the sales pitch: "You pay this amount per year, every year for the next 20 years". But, it leads to mathematics that most mortgage customers would find far from simple.

The formula from the standard schedule would give a constant payment for the above example as £8718 per annum. This is less than the starting £11,000 in my schedule but more than the final £5300. Surprise, surprise... lenders discourage paying more capital up front. Over the life of the loan, my schedule's total interest is £63,000 and the standard schedule's total is £71,708.

But, before you start finger-pointing and baying at the evil, greedy capitalist (and interestist) lenders, do bear in mind that it could be much worse. For example, the lender could just zero capital payments in, say, the first five years. Or lenders could only offer interest-only loans that would result in a total of £120,000 in interest payments. They don't do these things (normally) because they are mindful of the risk of the loan never being paid back, and because there is competition amongst lenders.

So, what is the standard way, and what is the magic formula that produces the £8718 figure? Time for a bit of maths...

Let the constant payment $$p$$ be made at the end of each year $$n$$, where

$$p=C_n + I_n \label{payment}$$

where $$I_n$$ is the interest and $$C_n$$ is the capital paid at the end of year $$n$$. Our goal is to find a formula to calculate $$p$$ from the loan amount $$L$$, the mortgage term $$N$$ in years and the interest rate $$i$$, expressed as a fraction, e.g. 6% would be $$i=0.06$$.

The interest paid at the end of a year is on the loan amount less all capital payments in previous years, so

$$I_n=i(L- \sum_{k=1}^{n-1} C_k)$$

So for $$n=1$$, the interest is just calculated on the entire loan, i.e. $$I_n=iL$$. And $$I_2=i(L-C_1)$$, and $$I_3=i(L-C_1-C_2)$$ and so on.

Next, let's look at equation (\ref{payment}) for $$n=1$$:

$$p = C_1 + i L$$

which we can re-arrange to give:

$$C_1 = p - iL$$

and then $$n=2$$ gives

$$p = C_2 + i (L - C_1)$$

and we can substitute for $$C_1$$ and re-arrange this to give

$$C_2 = (p-iL)(1+i)$$

and if we do this again for $$C_3$$ we get

$$C_3 = (p-iL)(1+i)^2$$

You can probably see the pattern emerging, so it shouldn't be a surprise to learn that it can be proved (by induction) that

$$C_n = (p-iL)(1+i)^{n-1} \label{capitalPayment}$$

The sum of all capital payments must total to the loan amount, so

$$L=\sum_{n=1}^N C_n \label{capitalSum}$$

Let's put $$r=(1+i)$$ and substitute equation (\ref{capitalPayment}) into (\ref{capitalSum}) to give

$$L=(p-iL)\sum_{n=1}^N r^{n-1}$$

The sum is that of a geometric series and so we can write this as

$$L=(p-iL)\frac{r^N-1}{r-1}$$

Now we can re-arrange to give the formula for $$p$$ we've been seeking

$$p = \frac{Li}{1-\frac{1}{(1+i)^N}}$$

This is the formula that gives the annual payment of £8718 quoted earlier, but it is not very enlightening by itself. To understand why this payment schedule is significant enough to have become the standard, it's worth reviewing how we just derived it.

First, we asserted we wanted a constant overall payment, and that for each year we could write it as a sum of a capital repayment $$C_n$$ and an interest payment $$I_n$$. Then we said that the interest payment $$I_n$$ is determined by the interest rate $$i$$ and the capital payments to date. This gives us $$N$$ equations - equation (\ref{payment}) for each year - for $$N$$ unknowns - the $$C_n$$s. We then solved this system of equations for the unknowns which let us calculate the constant payment $$p$$ in terms of $$L$$, $$i$$ and $$N$$.

So, to go back to the question posed earlier: do lenders force borrowers to pay little capital up front? The answer is no, based solely on the mathematics. If the simplicity of a constant payment is desired, then the standard formula used by lenders is mathematically justified. Further, if the discerning borrower wishes to minimise the total interest they pay out over the whole term, they can choose a mortgage that allows them to decide the schedule of capital repayment, and abandon the constant payment restriction.

There is another way to understand the standard schedule: imagine that no interest nor capital is repaid on the initial loan, and that it grows and that interest is compounded. That is, interest is added to the loan total each year and so interest is subsequently paid on previous interest. Also, imagine that the capital repayments are paid into a savings account and they earn interest which is similarly compounded. Eventually the savings catch up with the debt, resulting in the loan being paid off. You can see this approach detailed on this page, but beware, the notation used is totally different to what I've used in this post.

If you'd like to know more about the real-world details of mortgages, then the online book Mortgages Exposed is well worth consulting. I'm not sure it's been updated in recent years, but most of it is still relevant and the spreadsheet tools are very useful (and worked fine in LibreOffice).

One final note. In the UK at present, there are mortgages with interest rates under 2% and savings accounts with interest over 2%. If you are fortunate enough to have enough savings to pay off your mortgage, you'd be financially worse off to do it, because interest on your savings can exceed those of your mortgage. If the mortgage is for your home, that means a bank will be paying you rent whilst you live in your home. Some other thoughts in a similar vein can be found in my previous post Lending is good and bad.