FORMULA for a LOAN

This is a discussion on FORMULA for a LOAN within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I need to know how to calculate loan payments... like if i borrow $100,000 at 6.5% APR for 15years- what ...

  1. #1
    UNBANNED OneStiffRod's Avatar
    Join Date
    Jan 2002
    Posts
    669

    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...
    My Avatar says: "Stay in School"

    Rocco is the Boy!
    "SHUT YOUR LIPS..."

  2. #2
    Registered User
    Join Date
    Nov 2002
    Posts
    1,109
    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.
    Last edited by alpha; 03-21-2003 at 11:38 PM.

  3. #3
    UNBANNED OneStiffRod's Avatar
    Join Date
    Jan 2002
    Posts
    669
    Thank you very much sir!!!
    My Avatar says: "Stay in School"

    Rocco is the Boy!
    "SHUT YOUR LIPS..."

  4. #4
    Registered User
    Join Date
    Nov 2002
    Posts
    1,109
    You're welcome.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Resource ICONs
    By gbaker in forum Windows Programming
    Replies: 4
    Last Post: 12-15-2003, 07:18 AM
  2. Loan calculation formula
    By C++Nerd in forum C++ Programming
    Replies: 1
    Last Post: 10-06-2002, 01:57 PM
  3. Formula string conversion
    By Gr3g in forum C++ Programming
    Replies: 2
    Last Post: 04-12-2002, 09:28 PM
  4. Calculation Help
    By reddtee in forum C Programming
    Replies: 19
    Last Post: 11-24-2001, 04:17 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21