# Thread: FORMULA for a LOAN

1. ## FORMULA for a LOAN

I need to know how to calculate loan payments...

like if i borrow \$100,000 at 6.5% APR for 15years- what is my per month charge? - I need to know the math formula or just some code since I need to do this via PHP or Javascript...

It seems like a simple problem but I get stuck on this... I've seen some payment forms in javascript and they use loops that are complicated to understand...

I need to know how much I will pay in total after 15years or whatever payment period lasts and I need to know the monthly bill...

Remember, I think that the APR is calculated on the principal owed so as you pay the principal is reduced and tapers off --

I don't want 100,000 * (1.065^15), that's not how loans work... 2. the formula for monthly payments is:
Code:
```          A
-------------------
(1 - (1 + I) ^ -N
-------------------
I```
the numerator is A, and the denominator is below everything below A.

or
Code:
`A / ((1 - (1 + I) ^ ( -N)) / I)`
This is coming from my calculator, so readability is a bit tedious.

A is the loan amount.
I is the interest rate in decimal form divided by 12 (for monthly), i.e. .065 / 12 for 6.5%.
N is the number of months, i.e. 360 months for 30 yrs.

and yes, that is a negative N, just incase it is a bit small to read.

for total amount including interest, just multiply monthly payments by number of months.

edited for correctness of I. 3. Thank you very much sir!!! 4. You're welcome. Popular pages Recent additions 