How to Automatically Multiply and Add Values in a PDF Form
Question details
The user wants to configure an interactive PDF form to automatically perform math operations, such as multiplying quantities by unit prices and adding up totals.

- Product
- PDF Editor
- Device & OS
- not provided
- Scenario
- Creating an interactive business document, such as an invoice or order sheet, where field values need to be automatically calculated based on user input.
- Observed behavior
- The user needs to set up form fields with formulas or scripts so that when a respondent enters numbers, the document calculates and displays the correct product and sum automatically.
Ensure your PDF document already contains all the necessary fillable text fields for your inputs (like quantity and price) and outputs (like the total) before configuring the calculation settings.
Use Built-in Calculate Properties
Utilize the standard calculation properties of PDF form fields to multiply and add specific field values without writing any code.
Most advanced PDF editors provide built-in functions to perform basic arithmetic like addition, multiplication, or averaging directly from the field properties window.
Open your PDF form in editing mode. Right-click the destination field where you want the result to appear (e.g., the Total field) and select 'Properties'.
In the Text Field Properties window, click on the 'Calculate' tab located at the top.
Choose the option 'Value is the [product/sum] of the following fields:' depending on whether you want to multiply or add.
Click the 'Pick...' button, check the boxes next to the fields you want to include in the calculation (like Quantity and Unit Price), and click 'OK' to apply.

Apply Custom JavaScript for Complex Form Calculations
If you need to combine multiplication and addition within a single field or apply advanced logic like tax rates, use a custom calculation script.
Easily Manage and Fill Calculated PDF Forms with WPS Office
WPS Office provides a comprehensive, user-friendly PDF editor that seamlessly handles interactive forms. Whether you need to fill out complex invoices with auto-calculating fields or review business documents, WPS Office ensures accurate data processing and full format compatibility.
- 1. Open the PDF Editor: Launch WPS Office and click on the 'PDF' tab to access the dedicated PDF toolset.
- 2. Open Your Interactive Form: Load your PDF form document that contains the calculated fields.
- 3. Enter Data: Click on the input text fields (such as Quantity or Price) and type your data. The calculation fields will automatically update and display the correct totals.
- 4. Save and Share: Click the Save icon to securely store your completed form locally or to WPS Cloud for easy sharing.

Frequently Asked Questions
Why aren't my PDF form fields updating automatically after I input numbers?
This usually happens if the form calculation order is incorrect or if auto-calculations are disabled in your PDF reader's preferences. Check the calculation order in your PDF editor's form tools to ensure that total fields calculate only after the individual input fields.
Can I format the calculated result to show as currency automatically?
Yes. In the form field properties window, navigate to the 'Format' tab, select 'Number' or 'Custom', and specify your desired currency symbol and decimal places.
Do PDF calculation formulas work when the form is opened on a mobile phone?
It depends on the specific PDF viewer application used on the mobile device. Basic calculations often work, but advanced JavaScript may require a robust PDF reader, such as WPS Office for mobile, to function properly on iOS or Android devices.




