Copy link to clipboard
Copied
Hi, I want this formula in pdf form. Can someone simplify, please?
I want to calculate the loan monthly payment.
https://www.calculatorsoup.com/calculators/financial/loan-calculator-simple.php
https://www.thebalance.com/loan-payment-calculations-315564
https://www.kasasa.com/blog/how-to-calculate-loan-payments-in-3-easy-steps
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;
Copy link to clipboard
Copied
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"?
Copy link to clipboard
Copied
I want to simplify it. I have three fields
TermMonths
Principal
Rate %
Copy link to clipboard
Copied
Not everything can be simplified. Just use the formula from those sites.
Copy link to clipboard
Copied
Is rate added to monthly rate?
5 years * 12 month = 60 = 20000/ 60 =333.33*1.05(5%)= 350$ monthly rate?
Copy link to clipboard
Copied
Stop trying to simplify it. Use the formula as shown. Is the problem that you don't understand how to read it? You CANNOT implement a formula that you do not understand, and this is where I sometimes get stuck and need to go do more study.
Is it that you don't understand Especially the n Superscript, also written as ^n? Which means "to the power of n"?
Copy link to clipboard
Copied
Hi, I can write the formula myself. In excel it is very easy to do this calculation but in pdf form, I do not know how can I calculate ^n value.
Copy link to clipboard
Copied
Use:
Math.pow(x,y)
to calculate x^y.
Copy link to clipboard
Copied
I will try out this.
Thank you.
Copy link to clipboard
Copied
++ In addition to the guidance provided by all others here,
Just curious, would you mind providing the formula that you're using in MS Excel?
Sometimes formulas in MS Excel have nested IF / IF ELSE functions to evaluate one or more conditions.
Copy link to clipboard
Copied
Yes, it is a monthly rate. The result of your calculation should be
Monthly Payment = $ 377.42 not $350. Thank you
Copy link to clipboard
Copied
Let's begin by defining which of the three loan payment calculation formulas do you really need to use.
In the links that you've shared, you have one formula that breaks down an example for a mortgage payment, the other one to calculate a vehicle loan.
The other link is an online loan calculator.
So first of all, which of these tasks are you inquiring about:
Copy link to clipboard
Copied
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;
Copy link to clipboard
Copied
Nesa - this forumla was very helpful. Is there a way to calculate the first payment anywhere from 30 to 90 days out?
Copy link to clipboard
Copied
This is specifically for automotive financing.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Can you explain how should formula for field "Text1" work?
Copy link to clipboard
Copied
It should calculate the total monthly payment, including principal and interest.
I have it in excel, the format is: =-PMT(E11/12,E12,G32)
E11=Interest Rate
E12=Loan Terms
G32=Loan Amount
I tried your formula above but it gave me $1,014.08 instead of $1,245.34.
Copy link to clipboard
Copied
I figured it out, I took a closer look at line:
var n = lt*12;
I deleted *12 since that term is written out in months. Thank you for your help 🙂