Fix an Interest Calculation Script in an Acrobat Form
Question details
The user needs a valid Acrobat JavaScript calculation for an interest field in a fillable PDF form.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Calculate interest in the Interest Earned field using the value of the Ave Bal field.
- Observed behavior
- The existing calculation produces a syntax error because it is not written as a valid Acrobat JavaScript calculation script.
Open the PDF in Adobe Acrobat and confirm that you can edit its form fields. Check the exact name of the balance field and verify that 0.001 is the intended interest factor for the calculation period.
Add a Custom Interest Calculation in Adobe Acrobat
Use a custom calculation script to multiply the Ave Bal field by the interest factor and place the result in Interest Earned.
Open the PDF in Adobe Acrobat and select All tools > Prepare a form.
Right-click the Interest Earned field and select Properties. Open the Calculate tab.
Select Custom calculation script, click Edit, and enter: event.value = Number(this.getField("Ave Bal").value) * 0.001;
Confirm that the balance field is named exactly Ave Bal in its Properties. If it has a different name, replace Ave Bal in the script with that exact name.
Close the field properties, save the PDF, and enter a numeric value in Ave Bal. Check that Interest Earned displays the expected result.

Calculate Interest in WPS Spreadsheets and Fill Your PDF
Use WPS Spreadsheets to calculate the interest and enter the result into an editable PDF field. This manual approach does not add or repair an Acrobat JavaScript calculation.
- 1. Enter the balance: Open WPS Spreadsheets, create a workbook, and enter the average balance in cell A1.
- 2. Calculate interest: Select cell B1 and enter =A1*0.001. Use a different factor if the form requires one.
- 3. Fill the PDF: Open the PDF in WPS Office and enter the result from B1 into the Interest Earned field, if that field is editable.
- 4. Save the form: Use File > Save As to save the completed PDF and check that the entered value appears as expected.

Frequently Asked Questions
Where do I enter the calculation script in Acrobat?
In All tools > Prepare a form, open the Interest Earned field's Properties, select the Calculate tab, and choose Custom calculation script > Edit.
Why does the field name in the script matter?
The name inside this.getField("Ave Bal") must match the source field's name exactly. Check the field name in its Properties and update the script if needed.
What does Number() do in the calculation?
Number() converts the Ave Bal field value to a number before multiplication. Enter a numeric balance in that field so the calculation can produce a meaningful result.
Does 0.001 represent an annual interest rate?
Not necessarily. It is a factor of 0.1% for whatever period the calculation covers. Confirm the intended rate and period before using it.




