Skip to main content
Known Participant
April 24, 2021
Answered

Calculate Term Loan

  • April 24, 2021
  • 2 replies
  • 3958 views
This topic has been closed for replies.
Correct answer Nesa Nurani

You can use this,just change field names if neccessary:

var a = Number(this.getField("Amount").value);
var ir = Number(this.getField("Interest Rate").value);
var lt = Number(this.getField("Loan Term").value);
var n = lt*12;
var i = ir/100/12;
var total = (a*i*Math.pow(1+i, n))/(Math.pow(1+i, n)-1);
if(a == "" || ir == "" || lt == "")
event.value = "";
else
event.value = total;

2 replies

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
April 29, 2021

You can use this,just change field names if neccessary:

var a = Number(this.getField("Amount").value);
var ir = Number(this.getField("Interest Rate").value);
var lt = Number(this.getField("Loan Term").value);
var n = lt*12;
var i = ir/100/12;
var total = (a*i*Math.pow(1+i, n))/(Math.pow(1+i, n)-1);
if(a == "" || ir == "" || lt == "")
event.value = "";
else
event.value = total;
Participant
December 26, 2021

Nesa - this forumla was very helpful.  Is there a way to calculate the first payment anywhere from 30 to 90 days out?

Participant
December 26, 2021

This is specifically for automotive financing.

Legend
April 24, 2021

The formula appears complete and everything in it necessary. It can't be simplified, you now have to convert it to JavaScript. Or when you say "simplify" do you mean "please do my work for me"?

Known Participant
April 25, 2021

I want to simplify it. I have three fields

TermMonths

Principal 

Rate %

try67
Community Expert
Community Expert
April 25, 2021

Not everything can be simplified. Just use the formula from those sites.