# Calculate Term Loan

Explorer ,
Apr 24, 2021 Apr 24, 2021

Copied

Views

355

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Adobe Community Professional , Apr 28, 2021 Apr 28, 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;

Likes

12 Replies 12
LEGEND ,
Apr 24, 2021 Apr 24, 2021

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"?

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Explorer ,
Apr 25, 2021 Apr 25, 2021

Copied

I want to simplify it. I have three fields

TermMonths

Principal

Rate %

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 25, 2021 Apr 25, 2021

Copied

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

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Engaged ,
Apr 25, 2021 Apr 25, 2021

Copied

Is rate added to monthly rate?

5 years * 12 month = 60 =  20000/ 60 =333.33*1.05(5%)= 350\$ monthly rate?

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
LEGEND ,
Apr 25, 2021 Apr 25, 2021

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"?

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Explorer ,
Apr 28, 2021 Apr 28, 2021

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.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 28, 2021 Apr 28, 2021

Copied

Use:

Math.pow(x,y)

to calculate x^y.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Explorer ,
Apr 28, 2021 Apr 28, 2021

Copied

I will try out this.

Thank you.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 29, 2021 Apr 29, 2021

Copied

LATEST

++ 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.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Explorer ,
Apr 28, 2021 Apr 28, 2021

Copied

Yes, it is a monthly rate. The result of your calculation should be

Monthly Payment = \$ 377.42 not \$350. Thank you

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 25, 2021 Apr 25, 2021

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:

• Are you asking to create a script that calculates monthly payments for a mortgage?
• or a script to calculate monthly payments for a vehicle loan?
• Or are you trying to outsource for a developer in these forums to write from scratch a code for a PDF claculator entirely in Acrobat JavaScript, and with that, be able to calculate both mortgages and vehicle loans when a PDF is filled with some information?

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 28, 2021 Apr 28, 2021

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;``````

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Resources