Can someone explain to me how this equation works?

archcommus

Diamond Member
Sep 14, 2003
8,115
0
76
Last night I was playing around with those calculators online that let you enter amount being financed for a loan, the interest, and an amount of months, and it'll spit out your monthly payments. Being the inquisitive math person that I am, I didn't like the fact that it was doing this for me, and wanted to know what equation would accomplish this. So, with some Google searching, I found one. It is:

( P ( r / 12 ) ) / ( 1 - ( 1 + r / 12 ) ^ -m )

where P = principle, or amount being financed, r = interest rate, like .07 for 7%, and m = amount of months, like 36. Problem is, I can't figure out HOW this equation works, i.e., what's going on inside of it. Can anyone explain it logically?
 

chuckywang

Lifer
Jan 12, 2004
20,133
1
0
I think I remember this. The equation you are talking about, I think, is the solution to a differential equation.

EDIT: The solution requires you to compute a difference equation, NOT a differential equation.
 

KLin

Lifer
Feb 29, 2000
30,344
662
126
the numerator is calculating interest paid per month on the principal. the denominator is calculating the % of the total payment that the interest is. So you take the first part divided by the 2nd part to come up with the total monthly payment.
 

jagec

Lifer
Apr 30, 2004
24,442
6
81
Originally posted by: chuckywang
I think I remember this. The equation you are talking about, I think, is the solution to a differential equation.

not nearly as complicated as that.

the basic equation for compound interest is
F=P(1+r)^n

F=future value, P=present value, r=interest, n=# of years
If you are doing it monthly, you divide the interest rate by 12 to get monthly.

The equation he posted is for calculating annuities, but it's been adjusted to calculate monthly payments.
 

chuckywang

Lifer
Jan 12, 2004
20,133
1
0
Originally posted by: jagec
Originally posted by: chuckywang
I think I remember this. The equation you are talking about, I think, is the solution to a differential equation.

not nearly as complicated as that.

the basic equation for compound interest is
F=P(1+r)^n

F=future value, P=present value, r=interest, n=# of years
If you are doing it monthly, you divide the interest rate by 12 to get monthly.

The equation he posted is for calculating annuities, but it's been adjusted to calculate monthly payments.

No! That equation calculates interest. The OP's equation calculates monthly payments.
 

dullard

Elite Member
May 21, 2001
25,982
4,592
126
Originally posted by: chuckywang
Originally posted by: jagec
The equation he posted ... calculate monthly payments.
No! The OP's equation calculates monthly payments.
Either I'm really sick and can't read (I think I'm developing bronchitis), or chuckywang didn't read.

Archcommus87: First of all, you didn't post an equation. An equation uses equal signs, '=', somewhere. Let Q be your monthly payment. Then you should post:

Q = ( P ( r / 12 ) ) / ( 1 - ( 1 + r / 12 ) ^ -m )

That is an equation. And it is the proper equation. Let me see if I can think of an easy way to explain it before I have to leave (not much time).
 

chuckywang

Lifer
Jan 12, 2004
20,133
1
0
Ok. Here it is. I remember this from reading my diff eq book. I just dug that book out, cleaned off the dust, and found the example that talks about it. The book is called Differential Equations and Their Applications by Martin Braun.

The example cites an author's friend who thinks the bank is overcharging him on his wife's monthly student loan. According to his friend, the bank was overcharging him by about 20%. This specific loan was to be repaid in 10 years in 120 equal monthly installments.

Stating the problem more generally, suppose that P dollars is borrowed from a bank at an annual interest rate of r. This loan is to be repaid in n years in equal monthly installments of x dollars. (Note that 12n = m in the OP's post)

We first compute the interest due to the loan. Observe the interest owned when the first payment is due is equal to I_1= (r/12)*P. The principal outstanding during the second month is (x-I_1) less than the principal outstanding during the first month. Hence the interest owned during the second month is I_2 = I_1 - (r/12)*(x-I_1).

Continuing this line of reasoning, the interest owned during the j+1st month is I_(j+1) = I_j - (r/12)*(x-I_j) = (1+r/12)*I_j - r/12*x, where I_j is the interest owned during the jth month.
The solution to this difference equation is I_j = r/12*P*(1+r/12)^(j-1). I won't go into how I derive this cause it's just math. Maybe you can verify it as an exercise!

Hence, the total interest paid to the bank is I = I_1+I_2+I_3+....+I_(12n) = r/12*P*SUM((1+r/12)^(j-1), from j going from 1 to 12*n) + 12*n*x - x*SUM((1+r/12)^(j-1), from j going from 1 to 12*n).

The summation is just a summation of a finite geometric series, which can be evaluated. Evaluating that equation and noting that I = 12*n*x - P since 12*n*x is the amount of money paid the bank and P was the principal loaned yields a solution for x.

The result is:

x = r/12*P*(1+r/12)^(12n)/((1+r/12)^(12n) - 1) = r/12*P/(1-(1+r/12)^(-12n)).

If you plug in m = 12n, then you yield the solution in the OP. Whew, that was a lot of typing.
 

chuckywang

Lifer
Jan 12, 2004
20,133
1
0
If my above post is too mathematically rigorous, then here is the main gist of it.

You need to repay a loan+interest in equal monthly installments. Therefore Total amount you repay = Loan Amount + Interest Amount.

You already know that the loan is the amount you first borrowed. The question just becomes figuring out how much interest you need to pay. The question becomes difficult in this sense. Every month, you make a payment. Hence, the loan decreases every month. Therefore, so does the interest. What the math does is figure out how much interest you need to pay in each month. Therefore, the Interest Amount is the sum of all the interest for every month (hence the summation). Once you figure this out, it becomes easy. Monthly payments = Total Amount you Repay/Total Number of Months.
 

chuckywang

Lifer
Jan 12, 2004
20,133
1
0
Oh, as an epilogue, the author says that for the student loan, the bank was right, down to the penny.
 

dullard

Elite Member
May 21, 2001
25,982
4,592
126
Chuckywang's math is correct looking (I didn't doublecheck every last detail). But it doesn't explain things very well and it is a confusing mess. Do you mind if I take a stab at it?

One thing you do need to understand is the finite geometric series that Chuckwang discussed. Basically, is there an easier way of writing and calculating this:
[*]b = 1 + a + a^2 + a^3 + a^4 + ... + a^m
If 'm' is large, this will take forever to write and forever to calculate. Luckilly there is a better method. Here is the trick. Multiply that entire equation by 'a':
[*]b*a = 0 + a + a^2 + a^3 + ... + a^m + a^(m+1)
Now, a second trick. What is b*a - b equal to?
[*]b*a - b = (0-1) + (a-a) + (a^2-a^2) + (a^3-a^3) + ... + (a^m-a^m) + a^(m+1)
Notice how almost every term goes away. Thus
[*]b*a - b = -1 + a^(m+1).
Simplify:
[*]b*(a-1) = a^(m+1) - 1
[*]b = [a^(m+1) - 1]/[a - 1]
That last form of 'b' is much easier to calculate than to use many terms in the first form of 'b'.
 

dullard

Elite Member
May 21, 2001
25,982
4,592
126
At month 0, you owe P0 (the full amount).
[*]P0 = P
At month 1 you start with P0, add in owe one month's interest on P0, and subtract off your payment Q:
[*]P1 = P0 + P0*(r/12) - Q
I'm going to simplify here.
[*]P1 = P0*(1+r/12) - Q
I don't want to type (1+r/12) too many times. So let a = (1+r/12). Thus
[*]P1 = P0*a - Q
At month 2 you start with P1, add in owe one month's interest on P1, and subtract off your payment Q:
[*]P2 = P1*a - Q = P0*a^2 - Q*(1+a)
At month 3 you start with P2, add in owe one month's interest on P2, and subtract off your payment Q:
[*]P3 = P2*a - Q = P0*a^3 - Q*(1+a+a^2)

Do you notice a pattern yet? If we just keep typing you'll eventually get
[*]Pm = P0*a^m - Q*(1+a+a^2+a^3+...+a^(m-1))
Here is where that simplification from my post above comes in handy.
[*]Pm = P0*a^m - Q*[a^m-1]/[a-1]
Well after 'm' months you should pay the thing off. Thus Pm=0:
[*]0 = P0*a^m - Q*[a^m-1]/[a-1]
Solve for Q and simplify:
[*]Q*[a^m-1]/[a-1]=P0*a^m
[*]Q=P0*a^m[a-1]/[a^m-1]
[*]Q=P0*[a-1]/[1-a^-m]
[*]Q=P0*[r/12]/[1-(1+r/12)^-m]
 

chuckywang

Lifer
Jan 12, 2004
20,133
1
0
Nice solution, dullard. If I were presented that problem, I think your method would be the one I would think of first. I guess I got a little too cutesy with my difference equations since that was the section of the textbook the example was in.

Kudos.