The Mathematics of Mortgage, Overpayment and Refinancing Decisions

October 7th, 2009 admin Posted in Experiences, Information, Tutorials | 4 Comments »

With mortgage interest rates at historically low values refinancing home loans is an option currently being investigated by many here in the US. I, too, considered the same issue recently and discovered that this is not an easy decision to make. I developed a spreadsheet to figure out if this was a good idea. You can download this spreadsheet by clicking on this link (Microsoft Excel 2003). In general, the spreadsheet was also intended to show how loan repayment terms are set, how banks make money on loans, when overpaying monthly payments makes sense etc. Feel free to use the spreadsheet and improve upon it or tailor it to your situation. The rest of this article is a tutorial on how to make decisions about mortgages, how mortgages work in general, whether overpayment of the monthly payment makes sense, and what to consider when refinancing. The focus will be on the mathematical aspects of the decision making.

Taking an Interest in Loan Mathematics

Let us first try to understand, in simple terms, the philosophy of any loan process. In particular, I’ll focus on the home loan process. You intend to purchase a house. Why purchase, and not continue to rent? Well, that is an interesting question in its own right. But, to not get distracted, let us say you got tired of the rent going up each year, or moving every few years, or actually figured that it was economically better to buy rather than rent. So, you decide to buy a house. You need money. You go to the bank (a mortgage lender). Say you want $200K ($200 thousand). The bank gives you the money at a certain interest rate, say, 5%. What does that really mean? Here in the US, the norm is to calculate the remaining balance every month. The 5% is actually 12*0.4166%, where 0.4166%, or 0.004166, is the monthly interest rate. That is, after the first month, the outstanding balance is $200K + $200K*0.004166. In other words, because the bank did you a favor by giving you $200K which you did not have, it wants $200K*0.004166, which is $833.33. As a quick aside, notice that because the interest is calculated monthly, the annual interest rate is, in reality, greater than the 5% we started with. The real annual interest rate would be 1.004166^12=0.0511, or in other words 5.11%. Nevertheless, the common practice is to quote this as 5% base interest rate, and that is fine, as long as we know what it means.

Now, continuing with our example, in the first month, the bank wants you to pay $833.333 as interest accrued over that month. Say you paid exactly $833.33. The outstanding balance at the beginning of the second month would then be exactly 200K again. And at the end of that second month, the interest would be $833.33 again. Say you pay the bank $833.33 again. The outstanding balance at the beginning of the third month will again be $200K. This pattern could go on endlessly. You may argue that this looks like renting. Every month you pay the rent. You don’t see any of that money. But with buying there is a fundamental difference. After 10 years of doing the above, that is, paying $833.33 each month, you decide to sell the house. The house itself, typically, appreciates in value. Say the value of the house is now $300K. You sell and make a $100K profit. You paid 10*12*$833.33 over the 10 years, which, coincidentally, comes out to exactly 100K. What that means is you basically lived in a house for 10 years for free (of course you did pay property taxes, painted the house a couple of times, bought a lawn mower, replaced light bulbs, and took care of the house in general). But overall, it sounds like a pretty sweet deal.

One word we all glossed over in this discussion is “typically”. Home prices “typically” appreciate. The bank does not gloss over that word. If the value of the house drops, say 10 years later, the value of the house drops to 150K. You have paid your “rent” for 10 years, and are ready to sell. The bank wants its 200K back, since you never paid any principal all these years. The sale, however, would only fetch you 150K. The bank has the title (ownership document) to the house. It will not let you sell. It says give us 50K first, then sell for 150K, and gives us that 150K as well. You do not have 50K to give to the bank. The loan is foreclosed – the bank keeps the title to the house, but the bank does not like this situation. The bank now owns the house. But the house is worth only 150K. The bank does not want to be in the business of selling a house, especially one that won’t bring them their original 200K back.

To prevent this scenario, the bank employs two interesting tactics. Firstly, it does not let you pay only the interest of $833.33 each month. It requires you to pay off some of that principal on top of the interest. Secondly, the amount of principal you pay atop the interest is calculated such that the loan is guaranteed to be paid off in a certain “term”. Further, to keep the payment terms simple for the customer, the total payment each month remains unchanged. It is important to recognize that calculation of interest depends only on the interest rate. The calculation of the monthly payment which includes both the interest and some piece of the principal requires the notion of the “term”. The payment has to at least be the interest due that month. It is a bit more than that each month because of the principal paid. (In reality it ends up being even more because you pay a part of the annual property taxes, hazard insurance etc. each month � but we can ignore that for this discussion). Paying a bit of principal each month causes the outstanding balance reduce each month; this causes the interest payment to reduce a bit each month. This allows you to pay off even more principal each month, and that cascading effect finally ends exactly when the term runs out. Throughout this period, as mentioned earlier, the actual monthly payment does not change. The reduction in interest is compensated for by the increase in principal payment, which in turn reduces the outstanding balance and causes the next month’s interest payment to reduce even further. This constant monthly payment (interest + principal) is carefully calculated to achieve this effect. “Term” is the number of months the loan is supposed to be fully paid off by. The shorter the term, the better the rates, in general, because to pay off a loan faster (shorter term), you have to pay greater amounts each month. So there needs to be an incentive for you to pay more money each month to the bank. And that incentive is the lower rate. Otherwise, wouldn’t you rather go with the longer term, pay less to the bank each month and invest that leftover in the stock market?

By forcing you to pay a bit of principal each month, the bank is earning less interest each month. But the good news is that, if after 10 years, you decide to sell the house and the value of the house is only 150K instead of the 200K you bought it for, the bank risks less. You have already paid off about 40K. So the loss for the bank is only 10K instead of 50K, if it had allowed you to only pay the interest each month. So in other words, the bank wants you to pay principal each month not to help you reduce your interest payments, but rather to help it stave off any chance of losing money on the house if prices fall.

Black Magic – Calculating the Monthly Payment

When you talk to a mortgage banker on the phone, you will notice that they like to quickly tell you that your monthly payment would be some x amount. They use the phrase, “run the numbers”, with some pride. It is interesting and empowering to understand how the monthly payment is actually calculated.

We have all the information we need. At the beginning, we have a 200K loan. Let us use L to indicate this “Loan Amount”. Say, the monthly rate, which is 0.004166 in our example, is represented by c. Say, n represents the term, n months. Say, P represents the monthly payment. We want to determine P ourselves, instead of depending on our loan officer to tell us that information.

After the first month, the outstanding balance is:
L + L*c – P
= L(1+c) – P
This is because the loan amount L increases by the monthly interest amount, L*c, but then we make the payment of P. This is the outstanding balance for the second month.
At the end of the second month, the outstanding balance is:
{L(1+c) – P}(1+c) – P
= L(1+c)^2 – P(1+c) – P
= L(1+c)^2 – P{(1+c)+1}
At the end of the third month, the outstanding balance is
= {L(1+c)^2 – {P(1+c)+P}} (1+c) – P
= L(1+c)^3 – P {(1+c)^2 + 1+c) + 1}
If you are still with me, you may start seeing a pattern emerge. After n months, the outstanding balance will be:
= L(1+c)^n – P {(1+c)^(n-1) + (1+c)^(n-2) + … + (1-c)^2 + (1+c) + 1}
Which, can be rewritten as
= L(1+c)^n – P {1 + (1+c)^2 + (1+c)^3 + … (1+c)^(n-1)}
Now. The punch line. After n months, we *know* that the outstanding balance should be 0. So
0 = L(1+c)^n – P {1 + (1+c)^2 + (1+c)^3 + … (1+c)^(n-1)}
P {1 + (1+c)^2 + (1+c)^3 + … (1+c)^(n-1)} = L(1+c)^n
P = L(1+c)^n/{1 + (1+c)^2 + (1+c)^3 + … (1+c)^(n-1)}
There you go. That is P, your payment each month. Phew! Done? Well, almost. The denominator in the above calculation is not Excel-friendly. Remember, you want this to go into a spreadsheet that can help you with decision making. The number of terms depends on n. Not good. Let’s try to find a closed form solution for the denominator. Thankfully, it is not hard. Notice that the denominator is of the form:
1 + a + a^2 + a^3 + … + a^(n-1)
where I replaced 1+c with a. Let us call the above sum X.
X = 1 + a + a^2 + a^3 + … + a^(n-1)
Adding a^n to both sides (as an aside, this kind of intuition is the reason Kavita hates math)
X + a^n = 1 + a + a^2 + a^3 + … + a^(n-1) + a^n
Shamelessly using some more of that darned intuition, we extract out a common factor, a, from the last n terms to get to:
X + a^n = 1 + a {1 + a + a^2 + … + a^(n-1)}
But notice that the stuff inside the {} is precisely what we defined X to be. So:
X + a^n = 1 + a*X
X + a*X = 1 + a^n
X * (1 + a) = 1 + a^n
Therefore,
X = (1-a^n)/(1-a)
Replacing a with (1+c),
X = (1-(1+c)^n)/(1-(1+c))
X = (1-(1+c)^n)/(-c)
X = ((1+c)^n – 1)/c
Finally, substituting this into the equation for P:
P = L.c.(1+c)^n/{(1+c)^n – 1}
Now we are seriously done with this calculation.

Let us try to use L=200K, c=0.004166 and n=360 (a 30-year term, which is quite common in the US), and calculate P, your monthly payment. P comes out to $1073.64. The interest component is $833.33, and the principal is $1073.64 – $833.33 = $240.31. Because you pay off a tiny bit of the 200K principal, the outstanding balance at the beginning of the second month is $200000 – $240.31 = $199759.69. The interest for the second month is therefore going to be lesser than $833.33. In fact, it is $832.33. This $1 we pay less in interest goes towards the principal, which increases from $240.31 in the first month to $241.31 in the second. Looking a few months into this process the interest payments are $833.33, $832.33, $831.33, $830.32, $829.30, etc., and principal payments are $240.31, $241.31, $242.32 etc.

Fig1Fig2

Click on the thumbnails above to see the monthly and cumulative payment schedules. The first figure shows how much interest, principal and total payment needs to be made each month. The second figure translates that to a cumulative amount, that is, at any given point in time it tells us how much interest, principal and total payment you would have made. It is interesting to note from the first figure that in the first few years the bank makes most of the money it expects to make on the house (the interest tails off during the later years). The second figure shows that by the end of the loan term, you’d pay about 200K in interest!

Does Overpayment Make Sense?

At this point it is important to understand that by paying off the $240.31, $241.31, $242.32 etc. principal each month the benefit you are getting is in terms of reducing the interest you pay each month. By actually being vested in the house, that is, by owning that piece of the house, you do not get any direct benefit; when the house sells, its value will not depend on how much of the house you actually own. Think of it like this – the principal payments you make are investments where the rate of return is determined by the reduction in the interest payments.� Let us take an example. Say, somehow, you convince the bank to allow you to pay only the interest, $833.33, each month. You take the difference between your bank-determined payment of $1073.64 and your negotiated payment of $833.33 and invest it ($1073.64 – $833.33 = 240.31) in the stock market at 10% annual rate of return. Either way, after 10 years, we’d have invested $240.31*12*10 = $28,837.2. Since the investment is accruing a rate of return each month, we need to carefully calculate how much profit we make (I use an Excel spreadsheet to do this, however, we could use a closed form expression similar to the one we developed above). At a 10% rate of return, we make about $21,000. If we put this same $241.31 into the principal payment each month, after 10 years, our profit (the interest savings compared to the case where we do not pay any principal payment each month) is $8,478. Of course, the actual profit by investing is reduced by the tax you need to pay on that profit. Regardless, it is still a sweet deal to invest the money in the stock market, provided you can guarantee the 10% return on investment. Even if we assume a safe 6% rate of return (after taxes and everything), we stand to make $10,900 in the stock market vs. the $8,478 we “make” by putting it into the house. In any case, this is a moot point, since the bank will not allow you to make interest payments only. What this discussion is intended to drive home is that it may not make sense to overpay above the monthly payment of $1073.64, unless you intend to stay at the house for a shorter term. If you stay for a shorter term in the house, then the stock market rate of return may be too risky, whereas the paying into the house guarantees a certain rate of return.

Fig3Fig4

The figures above show monthly and cumulative payments for a 15 year loan term – that is a loan for which the monthly payment has been calculated such that is supposed to be paid off in full in 15 years. Typically, 15 year loans have a slightly better rate than a 30 year loan, to give you the incentive to give up more of your cash each month in payment. However, since I am continuing to use a 5% interest rate to plot these curves, these really indicate how your overall payment time line changes if you overpay each month. The overpayment amount is basically the difference between the monthly payment shown in this figure and the minimum monthly payment shown in the previous section. As you can see here, even in the first month you pay as much towards principal as interest, and secondly, by the end of the loan term, you pay only about $80K in interest. The advantage of this scheme is that you are required to only pay in accordance with the 30-year term, but you may choose to overpay if you wish to reduce your interest payments. That way, if you occasionally miss your overpayment target, that is fine as long as you pay the minimum payment for that month. That said, like we discussed above, it may still make sense to not overpay if you can invest that money instead.

Does Refinancing Make Sense?

Now that we have understood some of the nuances of the loan process, let us consider how to make a refinancing decision. Refinancing is the process of getting a new loan in order to pay off an existing loan. If this were a free process, that is, there were no cost of refinancing, the decision would have been very simple. If the new interest rate is better than the old interest rate refinancing would make sense. However, there is, typically, a cost involved. The question then changes to how long do you need to stay in the same house after refinancing to recoup the cost of refinancing. Let us take an example. Say you currently have a 5% loan with $200K outstanding, and a different lender offers a 4% loan, with a $2000 closing cost. The current monthly payment is $1073.64. The new monthly payment is $954.83. Since the interest rate is lower, you�ll likely be paying less interest each month with the new loan. So over time the cumulative interest you pay the bank may be lesser with the new loan. For this example, after 1 year the total interest paid with the current loan is about $9900, whereas with the new loan it is $7900. This is about $2000 in savings in 1 year just from the interest rate reduction. Since the interest you pay is like the fees the bank charges for its services, you have found a low-fee option. So in 1 year you have overcome the $2000 cost of refinancing. From year 2 onward you stand to gain by doing this refinance. (Note: I am ignoring the fact that interest is tax-free money, that is, you get the taxes you paid on the interest in your next year’s tax returns. The absolute savings from interest reduction are therefore about 20 to 25% lesser than the savings I am quoting here and in the spreadsheet. It is easy to fix that though, if you choose to. Instead of saving $2000, you’d have actually only saved $1500 if you fall in the 25% tax rate bracket.)

Now, let us see what happens to the rest of the money you are paying each month, the principal. With the current loan the cumulative principal payment after 1 year is
$2950. With the new loan the cumulative principal paid in 1 year is $3522. That is, you own more of the house. But this is not important by itself. Yes, you own more of the house, but the net is you converted some cash into a bit of house. If you had not owned any of the house you’d have been left with cash which you could have invested and actually grown it. The house grows or falls equally in value regardless of whether you are invested in it or not.

But there is one more component to this equation other than the interest and principal. The overall monthly payment has reduced from $1073.64 to $954.83. That is a freeing up of $118.81 each month to be invested as you choose. Even if this was invested conservatively in a 6% rate of return investment, you end up with $1472 at the end of the first year. This is money that would not have been available at all with the current loan. So in fact, at the end of year 1, you have save $2000 + $1472, the former coming from the interest savings and the latter from investing the cash freed up. This means, the $2000 cost of refinancing will actually be made up even sooner than 1 year. Given the above 6% assumption it is more like 7 months. If you plan to live in this house for 7 months or more, go for the refinancing

Fig5

The figure above shows the time to recoup the cost of refinancing, considering only the interest savings and also considering the case where the overall reduction in monthly payment can be invested at 6%.

Acknowledgements

My understanding of the issues involved in refinancing, in particular, and mortgages, in general, is based upon my going through this decision-making process recently. Much of this understanding was developed during discussions with my friends Gordie and Srini. If you find flaws in my understanding please let me know. Some online resources that helped me were http://www.mtgprofessor.com/formulas.htm , http://en.wikipedia.org/wiki/Refinancing and http://en.wikipedia.org/wiki/Mortgage.

4 Responses to “The Mathematics of Mortgage, Overpayment and Refinancing Decisions”

  1. Great reading material. I’ve learned a lot by reading here. Thanks!

  2. Bookmarked your site. Thanks for all the good reading material. I really enjoyed it!

  3. hey,just found your Blog when i google something and wonder what webhosting do you use for your web site,the speed is more faster than my blog, i really need it.will back to check it out,thanks!

  4. @Rosie Desha: I use 1and1.com to host this site. Sorry for the late response, I somehow missed your comment.

    @loan refinance and refinance fees: Thanks for your encouragement. Glad you found the information useful. I revisited the page today because I am trying to make some decisions related to refinancing,and took the opportunity to reply to the comments.

Leave a Reply