How to Calculate 15 Percent of a Dollar Amount in an Acrobat PDF Form
Question details
The user needs to create an interactive form field in a PDF that automatically calculates 15 percent of a user-entered dollar amount and displays the formatted currency result.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Designing an interactive PDF form that requires automated mathematical operations, such as calculating taxes, tips, or discounts based on user input.
- Observed behavior
- The goal is to apply a mathematical formula to a form field so it dynamically displays the correct percentage and currency format when the base amount is entered.
Ensure you are using Adobe Acrobat Pro or a similar advanced PDF editor equipped with form creation tools, as free PDF readers do not support adding or editing JavaScript calculation scripts.
Apply a Custom Calculation Script in Form Field Properties
Using a custom JavaScript calculation inside the field properties is the most accurate way to dynamically compute percentages in an interactive PDF form.
By utilizing Adobe Acrobat's Prepare Form tool, you can attach customized JavaScript formulas to individual text fields. This method ensures that the designated field automatically updates to show the 15% calculation whenever the base value is modified.
Launch your document in Adobe Acrobat, go to the Tools menu, and select the 'Prepare Form' tool to enter form editing mode.
Right-click the specific text field where you want the 15% result to appear and select 'Properties' from the context menu.
Navigate to the 'Format' tab, select 'Number' from the format category list, and configure the Number Options to use zero or two decimal places along with the dollar currency symbol.
Switch to the 'Calculate' tab, select the 'Custom calculation script' radio button, and click the 'Edit' button.
Paste the following script: if (event.value > 0) { event.value = event.target.value * 0.15; } else { event.value = ""; } then click OK and close the properties window to apply.

Manage and Fill Interactive PDF Forms Easily with WPS Office
WPS Office provides an advanced PDF editor that makes reading, filling, and editing interactive PDF forms effortless. It acts as a lightweight, highly compatible alternative to premium PDF software, helping you handle mathematical forms and documents securely.
- 1. Install WPS Office: Download and install the free version of WPS Office from the official website.
- 2. Open Your PDF Form: Launch WPS PDF and open your interactive PDF document containing the form fields.
- 3. Fill the Form Fields: Navigate to the Form tab. Click directly on the interactive fields to input your data; calculations will trigger automatically if the document contains embedded scripts.
- 4. Save and Export: Once your form is filled and the percentages are calculated, click Save or export the document securely as a flattened PDF.

Frequently Asked Questions
Can I use a validation script instead of a calculation script?
While it is technically possible to use a validation script, it is not recommended for percentage calculations. Validation scripts can trigger recalculations every time any field in the form changes, which may unnecessarily slow down the performance of your PDF document.
How do I change the calculation to 20 percent instead of 15?
To change the calculated percentage, simply update the decimal multiplier in your custom JavaScript code. For 20 percent, change the '0.15' to '0.20' so the script reads: event.value = event.target.value * 0.20;
Why is the dollar sign not appearing in my calculated field?
The dollar sign will not appear if the form field's display format isn't configured correctly. Ensure you right-click the calculated field, go to Properties > Format tab, select 'Number' as the category, and specifically choose the Dollar symbol ($) from the currency symbol dropdown.
Can I apply this 15% calculation to multiple fields at once?
Custom calculation scripts must be applied individually to each specific field that displays a result. If you need multiple fields to show calculated percentages based on different inputs, you must paste and adjust the script in the Calculation tab of each respective output field.




