Amortization Calculations

Comments

15 comments

  • Faisal Velani

    Sorry the formula was entered wrong. It is P((r(1+r)^n)/((1+r)^n-1)). P = principal, r = rate period, n = total number of payments or periods.

    0
    Comment actions Permalink
  • Hamid

    Hi Faisal,
    Try with this :

    
    var p = @principal
    var r = @rate period
    var n = @total number of payments
    var r1 = 1+r
    var r2 = r*r1
    var n1 = n-1
    var c1 = pow(r2, n)
    var c2 = pow(r1, n1)
    var result = p*(c1/c2)
    result
    
    0
    Comment actions Permalink
  • Faisal Velani

    comes back with "pow is not defined"

    1
    Comment actions Permalink
  • Faisal Velani

    also, I have no idea how to do java scripting. Will need some hand holding on this.

    0
    Comment actions Permalink
  • Hamid

    Sorry,
    Try to replace 'pow' by 'Math.pow' like this :

    var c1 = Math.pow(r2, n)
    var c2 = Math.pow(r1, n1)

    0
    Comment actions Permalink
  • Hamid
    
    var p = @principal
    var r = @rate period
    var n = @total number of payments
    var r1 = 1+r
    var r2 = r*r1
    var n1 = n-1
    var c1 = Math.pow(r2, n)
    var c2 = Math.pow(r1, n1)
    var result = p*(c1/c2)
    result.toFixed(2)
    
    
    1
    Comment actions Permalink
  • Faisal Velani

    "the script resulted in infinity" error

    1
    Comment actions Permalink
  • Faisal Velani

    for c1= Math.pow (r2, n)

    0
    Comment actions Permalink
  • Hamid

    Have you added .toFixed(2)
    (2) is the number of digits after comma

    0
    Comment actions Permalink
  • Faisal Velani

    This worked. Thank you.

    1
    Comment actions Permalink
  • Brian Sinclair

    HELP* -- I need calculations for mortgage loans --

    If I know the following:
    1) Loan Amount = $100,000
    2) Interest Rate = 1%
    3) Loan Amortization Period = 30 years
    4) Loan Term = 5 years

    I need calculations to produce the following results:
    1) Monthly Payment
    2) Total Interest Paid during "Loan Term"
    3) Amortized Loan Balance at the end of "Loan Term"

    1
    Comment actions Permalink
  • Luke Holcomb

    Hey Gang, I have tried to use this and for some reason everything comes up 0.00 

     

    var p = @Offer
    var r = .06/12
    var n = 20*12
    var r1 = 1+r
    var r2 = r*r1
    var n1 = n-1
    var c1 = Math.pow(r2, n)
    var c2 = Math.pow(r1, n1)
    var result = p*(c1/c2)
    result.toFixed(2)

     

    I have also tried 

    var p = @Offer
    var r = .06
    var n = 20
    var r1 = 1+r
    var r2 = r*r1
    var n1 = n-1
    var c1 = Math.pow(r2, n)
    var c2 = Math.pow(r1, n1)
    var result = p*(c1/c2)
    result.toFixed(2)

    this is a bit out of my wheel house. any help is much appreciated

    0
    Comment actions Permalink
  • Rainer Grabowski

    The problem seems to be var c1

    The result .06 to be the power of 20 has to many .0000 . It seems Javascript can't handle that.

    C2 works. 

    Rainer

    0
    Comment actions Permalink
  • Luke Holcomb

    Hey gang, 

    just an update. I rewrote the equation and got it to work. I seemed to have a problem with the script and had to delete the calculation field and start over, but all in all below is my info for group benefit. 

    p = principle

    r = rate

    n = years

    The Formula that I used was:

    p * ( (r/12) / (1-(1+(r/12) )^(n*12) ) )

    The code was:

    var p = @Offer
    var r = .06
    var n = 20
    var r1 = (r/12)
    var n1 = -(n*12)
    var r2 = 1+r1
    var c1 = Math.pow(r2, n1)
    var result = (p*(r1/(1-c1)))
    result

     

    thanks guys

    1
    Comment actions Permalink
  • Joshua MIller

    This post really helped me.  Thanks!

     

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk