# Derivation of the Formula for Mortgage Payments

Derivation of the Formula for Mortgage Payments

Copyright (C) April, 2012 by Bob Day. All rights reserved.

A while ago, I wanted to know the reasoning behind the amount of my payments on my home mortgage. I looked in some accounting books, and all they gave was the formula. None of them gave the rationale behind it. So I sat down and derived it myself. It's not too hard.

Say we borrow an amount "A" at an interest rate of "r" per payment period. (If the payments are made monthly, "r" is the annual interest rate quoted by the bank divided by 12.) We pay back the loan in "N" payments or periods.

For example, for a 30 year mortgage on which payments are made monthly, N would be 30×12 or 360. After N payments, each of the amount "P", the loan is paid off and the amount we owe is reduced to zero.

Derivation of the Formula
The Initial amount we owe is A. At the end of the first payment period, the amount we owe has increased by rA, one payment period of interest, and we make a payment, P. So the total amount we owe after one period is
: A + rA – P, or A(1 + r) – P. We note that this A(1 + r) – P is not only an amount, but also an operator; that is, given the amount of principal outstanding at the beginning of any period, we can apply it to determine the amount of principal remaining at the end of the period.

So applying the operator A(1 + r) – P to the amount A(1 + r) – P remaining at the end of the first period, we get (A(1 + r) – P)(1 + r) – P as the amount remaining at the end of the second period. Similarly, at the end of the third period, the amount of principal remaining is: ((A(1 + r) – P)(1 + r) – P)(1 + r) – P. After N periods (applying the operator and then expanding), the amount remaining will be:

A(1 + r)^N – P( (1 + r)^(N-1) + (1 + r)^(N-2) + (1 + r)^(N-3) + … + 1 ) = 0  [Equation 1].

It equals zero, because after N periods the loan is paid off. Considering just the (1 + r)^(N-1) + (1 + r)^(N-2) + (1 + r)^(N-3) + … + 1 portion, we can reverse the order of its terms and rewrite it as: 1 + (1 + r) + (1 + r)^2 + … + (1 + r)^(N-1)

Representing this series by "S", and letting "R" equal (1 + r), we get:
S = 1 + R + R^2 + … + R^(N-1)
So, RS = R + R^2 + … + R^(N-1) + R^N
Subtracting: S – RS = 1 – R^N, and so S = (1 – R^N) / (1 – R)
Inserting this value for S back into Equation 1:

A(1 + r)^N – P( (1 – R^N) / (1 – R) ) = 0

Finally, Solving for P, the amount we pay each period, we get:

P = rA / (1 – (1 + r)^(-N))

I checked this formula against my own mortgage amount and payments and it agreed exactly! Voila! For example, for a 30 year mortgage for \$300,000 at an interest rate of 6% per year paid monthly, the parameters are: A = 300000 (the mortgage amount) r = 0.06 / 12 = 0.005 (the monthly interest rate) N = 30 x 12 = 360 (the number of payments) And the monthly payments would be: 0.005 x 300000/(1 – 1.005^(-360)) = 1798.65 dollars per month.

Another Way: Approximation with a Differential Equation
We can also use a differential equation to get a very close approximation of the payments on a mortgage.  A while ago I was trying to figure out how long it would take a bug walking along a stretching rubber band to get to the end.  After I solved that problem, it occurred to me that the problem of mortgage payments could be solved in a similar way.  It's a nice example of how a differential way of thinking can be used to solve a real-world problem.  Perhaps many problems in finance and economics can be solved using a differential approach.

We start by looking at how fast the mortgage is being paid off:  We now let A(t) be the amount we owe on the mortgage as a function of time.  Note that A(0) is the amount of the mortgage, the amount we borrowed.  Each month, the bank adds an interest amount of r * A to the mortgage and we make a payment of P.  Consequently, the amount we have remaining to pay on the mortgage changes by: dA/dt = r * A – P each month.

To solve this equation for A requires a little bit of mathematical gymnastics, but it's strictly cookbook.  It can be very easily solved by entering "solve (dA/dt = r * A – P)", without the quotes, into WolframAlpha at www.wolframalpha.com and clicking on the = sign.

The solution is: A(t) = P/r + C e^(rt), where C is a constant we need to evaluate. After a time T, the mortgage will be paid off, so we have: A(T) = P/r + C e^(rT) = 0. Solving for C, we get, C = -P/r e^(-rT). Replacing C in the solution, A(t) = (P/r) (1 – e^(r (t-T)). So, A(0), the amount of the mortgage (the amount we borrowed) is: A(0) = P/r (1 – e^(-rT)). And finally, solving for P we get: P = r A(0) / (1 – e^(-rT)). For A(0) = 300000 dollars, i = 0.06 / 12 = 0.005 percent per month, and T = 360 months, we get: P = 1797.05 dollars per month, very close to the amount we calculated before.  (But, of course, not quite good enough for the bank!)

# How to Lose Weight: Calories Aren’t Everything

… Calories are the only thing.  If you burn more calories than you take in you will lose weight — beginning, middle, and end of story.  Maintaining a negative calorie balance is the only thing that matters for weight loss.

The therapy professions and pharmaceutical companies would have you believe that obesity is an uncontrollable disease or an addiction.  They want you to pay for therapy or buy their drug.  Both are total nonsense.

But, losing weight is difficult.  It's a long, lonely, and solitary road.  It's not just a matter of going on a diet for a while, and it requires changing much more than just your diet.  It requires a permanent change in lifestyle, including discarding friends who disparage or try to discourage your efforts.  You, yourself, inside your soul, have to decide that losing weight is something you want to do.  Not because friends said you should lose some weight; not because your doctor is on your case about it.  You look at yourself in the mirror and decide you don't like the way you are and decide that you want to change your life.

I know all this for a fact.  I've lost over 50 pounds, gone from being overweight to being a few pounds above underweight, and have kept it off for more than ten years.

Caveats
1)  Diet Programs like Weight Watchers can help you to find a weight losing diet, but not for support.  If you need support from others, you'll probably fail.  Your desire to lose weight, which requires establishing a new, permanent, lifestyle, must come from within.

2)  Gaining Weight as you get older you're older is *not* inevitable. It's just another excuse.

3)  Exercise has many health benefits, but it is not necessary for weight loss.  It can help only if you don't use exercise as an excuse to eat more.

Recommendations

1)  Eat mostly to get the nutrition your body needs, and less for enjoyment.  Establish a healthful diet and learn to enjoy healthful foods, and make eating less a part of your life.

2)  Three meals a day: breakfast, lunch, and dinner.  That's it.  No snacks, and no "in between" meals.

3)  Give up sugar.  No sugar in coffee, soda, or on cereal.  Give up fruit juice — it's mainly just another form of sugar.  Water is the only liquid you need.

4)  No alcohol.  Alcohol has no food value, alcohol is just empty calories.

5)  In the beginning, establish a very regulated moderate calorie diet.  Don't follow any sort of fad.  Just pick a selection of foods that add up to a normal balanced diet  — whole grains, veggies, fruit, dairy, a little meat, etc.  But start out by having exactly the same three meals each day — the same foods and the same amounts.  Weigh the portions on a scale.  Consider frozen dinners.  Healthy Choice, Lean Cuisine, Kashi, Smart Ones, and probably other brands have several that are low in calories (350 or less) and saturated fat, 25% daily value or less of sodium, and high in fiber — no need to weigh these.

6)  Round out your diet with supplements for nutrients that your diet does not contain enough of.

7)  Weigh yourself every day on a 0.2 lb. accuracy scale.  Your weight will fluctuate, but with a constant diet it should trend down over every two or three days.  If it doesn't, eliminate items from your diet or reduce the size of portions until your weight does go down.  (If you don't have a 0.2 lb. accuracy scale, I'd recommend the EatSmart Precision Plus Digital Scale, which is sold on Amazon.)  Don't obsess over the scale — let it be your friend and point the way to a weight losing diet.

8)  When you have achieved a weight losing diet, then you can start making adjustments to add variety, but make sure that you keep losing weight.

9)  Establish a routine of regular daily exercise.

10)  When you're down to the weight you want to be, you can adjust this diet to be a weight maintaining diet.  Make changes for variety, but keep to the approach to eating recommended here.  That can be your permanent diet for life.  Eat mainly to get the nutrition your body needs and less for pleasure  — find pleasure in other things.