How to Perform Form Calculation in the Input Table Field?

October 5, 2021

It is now possible to use the Input Table (Matrix) field to perform form calculation.

Here in our example, we will set the matrix field similar to a survey questionnaire with ratings or value on them, we will calculate the total rating using the Form Calculation widget. You can follow the steps below on how to do that.

In Version 4.0, we call the Matrix Table from Version 3.0, Input Table. It can be found in the Quick Elements section of the Basic tab when you add Form Elements to the form.

Once you’ve added the Input Table, select an input type from its properties (cogwheel icon). 

From the same Fields tab of the Input Table properties, you will be able to set row and column headers.

After constructing the table, you now need to set calculation values for each of its cell (matrix sub-field). To do that, go to the Options tab and enter the values in the provided text area for calculation values following this simple rule, “Separate each column with a comma and each row with a new line.

In the example above, 4 Rows means 4 lines and 4 columns means 4 values separated by a comma.

Note: Choosing a different input type for the table, like a text box or number text box, if you want your respondents to define values for each cell, will not require you to set calculation values.

To get the total value of the selected cell(s) on the table, you will use the Form Calculation widget from the Widgets tab when you add Form Elements to the form.

To perform the calculation, you need to add the input table to the calculation area of the Form Calculation widget.

Clicking the “Add Field” button shown in the screenshot above lets you add fields to the computation.

Adding an Input Table field will let you select which row (radio button) or cell (checkbox field) in the table is to be included in the computation. (This is also referred as matrix sub-fields.)

After selecting the matrix sub-field(s) and clicking Done, you will see the selected sub-fields of the input table in the calculation area of the Form Calculation widget. From there, you will be able to create your own formula to get a total value. The calculation pad on the right will surely help you with the simple to complex mathematical tasks.

Sample Form that you can also clone to your account for testing:

Other references that might be helpful:

Form Calculation – Math Function Reference

How to Perform Form Calculation Using a Widget

You can check the sample form here:

Do you have questions about this guide? Please let us know in the comment box below or post it to support forum.

Was this guide helpful?
Contact Support:

Our customer support team is available 24/7 and our average response time is between one to two hours.
Our team can be contacted via:

Support Forum:

Contact Jotform Support:

Send Comment:

Jotform Avatar
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Podo CommentBe the first to comment.