I am considering to buy an investment home recently and so am trying to really understand mortgage. As an engineer, I thought it should be very simple. Indeed, it is quite simple but it eventually spent me couple hours figuring it out on my own. It is a simple high school math problem but I guess my old brain was slowing me down.
Anyway, let start with a simple question. How much do I need to pay monthly if I want to borrow $30,000 for 5 years with monthly interest rate of 0.5%?
Let be the size of the loan, i.e., $30,000, be the monthly payment, be the number of period (5 12 = 60), and be the monthly interest rate, 0.005.
The question is very simple if one understands present value. The amount of money does not worth the same at different times because of interest. If I have one dollar now, my one dollar will become 1.005 dollar a month later because of interest. In reverse, the dollar that I’m paying to the bank next month will be worth only now. Therefore, the total payment in the future is worth only
which should be equivalent to the entire loan . Therefore, the monthly payment is given by
. This gives us $432.13.
Now, the more interesting question (that I was stuck) is what fraction of money is paid to the principal and the interest each month. I think it probably easier to explain it starting from the farthest future and going backward.
Let’s consider the time that we just pay for the second last payment, how much do we own the bank? You may say, dollars, right? Because in a month later, we will pay the last payment of dollars and will not owe the bank anymore. But we need to be careful that money a month later is not the same as money now, it is discounted by the factor . Another way to think about it is that we have to pay interest for the last month also. So it won’t be possible that we only need to pay dollars next month if we only owe dollar now. Instead, we actually owe dollars. So how much interest do we pay for the last payment? It will be
. Note that again is how much we owe just after we pay the second last payment. So of course the interest should be just that multiplied by . So everything adds up. Good!
Now, how about a period before that? That is, the time when we just pay for the third last payment. By similar token, we should owe
to the bank. Now, forward one month again, the amount becomes
and we have only after paying dollars for the second last payment. Great! Everything adds up again. And what is the interest in the second last payment? It is
So in general, the interest pay in the th last payment is
And what is the total interest? It will be
. Exactly what we will expect. Nice!
For our loan example, the below plot shows the fraction of principal paid over the periods. We can see that more interest is paid in the earlier periods than the later ones.
And the remaining amount over periods is shown below.
Finally, simple matlab code for generating the figures is shown below:
L=30000; % size of loan N=60; % period r=0.005; % interest rate per period %L*(1+r) = P + P/(1+r) + P/(1+r)^2 + P/(1+r)^3 % = P (1-(1/1+r)^N)/(1-(1/(1+r)) P= L*(1+r)/((1-(1/(1+r))^N)/(1-1/(1+r))); Ls(1)=L; In(1)=0; Ps(1)=0; for i=2:N+1; In(i)=Ls(i-1)*r; Ps(i)=P-In(i); Ls(i)=Ls(i-1)-Ps(i); end close all figure; plot(1:length(Ps)-1,Ps(2:end)/P); title('Fraction of principal paid at each period'); xlabel('period'); ylabel('Fraction'); figure; plot(1:length(Ls)-1, Ls(2:end)); title('Remaining loan'); xlabel('period'); ylabel('remaining loan');