28 Feb in  How-to tutorials

How to Create Form Field Calculations


how to create form field calculations thumbnail


It may come off like a broken record to point out that these days the paper version of documents (like forms) are fading away. This actually makes life way simpler in many cases. Instead of receiving files full of bad math, you could learn how to create form field calculations.


You may wonder what we mean when we say, “create form field calculations”. When you are creating your form, in a good PDF editor, you can create relationships between these form fields. With a little bit of configuration, you can create form fields that calculate data that will make filling out your forms a breeze.


Soda PDF is an app, which provides all the functionality you need, to make forms that include dynamic calculations.


On that note, let’s get to it.


Step 1 – Adding a Text Form Field


You’ll need to use text form fields when you create form field calculations. You’ll need at least three text fields in your document to perform a calculation.

  1. Open the Forms Tab.
  2. Choose Text Field.
  3. Move your mouse cursor into your document.
  4. Hold down the left mouse button and drag the mouse.
    1. You’ll see the outline of your form field adapt as you move your cursor.
  5. Release the mouse button.


add text field how to create form field calculation


If this form field is the perfect size, you can easily copy and paste it to add more fields to your document.

  1. Click into Edit Mode.
  2. Right-click on the field and choose Copy.


copy text field how to create form field calculation


  1. Then right-click anywhere and choose Paste.


paste text field how to create form field calculation


In the Properties section you can configure the aesthetic of your form field, but in this article, we’ll focus on how calculations work.


Step 2- Name your form fields


Every form field has its own name that is used to make sure that the data is tracked correctly. When you create form field calculations, you’ll need these field names to make sure any relationships between them are set up correctly.


It’s very easy to check the name, and even change it to something custom.

  1. While in Edit Mode select your field.
  2. Click on the Properties tab.


Your field name will be found here:


open properties how to create form field calculations


You can easily update the name.

  1. Click into the name field.
  2. Type in your new name.
  3. Press the Enter key on the keyboard to confirm.


change name how to create form field calculations


We recommend you name each field in a way that makes it quick and easy to recognize later on.


Step 3- Configure your field type


When you create form field calculations, a good rule of thumb is to format the field to make sure a user enters the information you need. You can restrict a field to only accept numbers or format the field to be a specialized number like a date.

  1. Choose the Format
  2. Click on the option next to Category.
  3. Choose one from the list.
    1. For this example, we’ll choose Number.


format number how to create form field calculations


You can configure the following options.

Decimal Places – Click here to change how many numbers will appear after the decimal place in a number. For example, if you set it to 4, you’ll see numbers appear like 3.0001.

Separator Style – Some locations prefer commas, others prefer periods. In this option you can customize your number style.

Currency Symbol – Money is a key thing that gets calculated in forms. You can set any currency symbol you’d like to use.


configure format how to create form field calcuulations


We advise that each field involved in your calculation be configured in the same way, so that there are no future formatting surprise.


Step 4 – Setting up your calculations – Quick n’ Easy method


When you create form field calculations you will configure the field that will display the results of this calculation. You’ll establish which fields it interacts with and what kind of calculation you’d like to perform.

There is a very quick way to set up a calculation.

  1. In the Properties open the Calculations
  2. Next to Category choose Predefined from the list.


set predefined how to create form field calculations


Next to Predefined, you can choose the calculation you want to use.

  1. Click the dropdown.
  2. Choose one from the list.


choose predefined how to create form field calculation


Then, you’ll pick the fields you want to calculate.

  1. Click Select next to Fields.
  2. Check the boxes next to the field.
  3. Click OK


et fields how to create form field calculations


Now it’s time to test everything works.

  1. Head into View Mode.
  2. Click into the relevant fields and enter numbers.


You’ll see the calculation automatically appear in the answer field.


math time how to create form field calculations


Step 5 – Setting up your calculations – Multiple Calculations


You can have more control, so we’ll show you how to create field calculations beyond the predefined options.

  1. Choose Simplified field notation next to Category.
  2. A box will appear where you can enter your math equation.
    1. Following the order of operations, you can create equations. Enter each field name (make sure all capitalization matches) and separate the field names with the correct math symbol.
    2. As an example: to perform division it would be field1/field 2.
    3. Another example can set it up like field1/field2+field3*field4 and in this case it will add the product of field 3 & 4 with the results of dividing field 1 by field 2.
  3. Click OK when you are ready to proceed.


set complicated math how to create form field calculations


You can again test this by entering numbers while in View Mode.


If you are comfortable with JavaScript, you can enter your own code.

  1. Choose Custom calculation script next to Category.
  2. Then click Set next to Script.
  3. Enter your code into the box.
  4. Click OK.


javascript how to create form field calculations


We encourage you to download Soda PDF now that you know how to create form field calculations. Test out the free trial and let us know what kind of forms you made.



  1. Pingback: How to Collect Form Data From PDF Documents (For Beginners)

Add your comment

Your e-mail will not be displayed

Like this blog? Spread the word!