Calculate Term Loan

Explorer ,
Apr 24, 2021 Apr 24, 2021

Copy link to clipboard

Copied

Views

355

Likes

Translate

Translate

Report

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

correct answers 1 Correct Answer

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

Translate

Translate
LEGEND ,
Apr 24, 2021 Apr 24, 2021

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

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

I want to simplify it. I have three fields

TermMonths

Principal 

Rate %

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

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

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?

Likes

Translate

Translate

Report

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

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

Likes

Translate

Translate

Report

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

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. 

 

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Use:

Math.pow(x,y)

to calculate x^y.

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

I will try out this. 

Thank you.

Likes

Translate

Translate

Report

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

Copy link to clipboard

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

Translate

Translate

Report

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

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

Likes

Translate

Translate

Report

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

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:

 

  • 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

Translate

Translate

Report

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

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;

Likes

Translate

Translate

Report

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