How to Perform Form Calculation Using a Widget

Last Update: May 20, 2017

Wondering how you can calculate a total based on the option selected by the user from your form? Calculation is now possible with Jotform. There are two ways on this, you can use Conditional Logic or you can use the Form Calculation widget. In this guide, we will discuss how we can use the widget to perform a calculation. 


Video Tutorial

 

Below are the steps to help you better:

1. Click on Form Elements.

2. Click on the Widgets tab, search for "Form Calculation" and add it to your form.

3. Now as an example, we will calculate the price of the product selected on a radio button multiplied to a quantity field. Here's how it looks like:

Note: If you want to assign a calculation value on a radio button, drop down or check box field, then you need to check this guide: How to Assign Calculation Value 

4. Click on the wand icon.

5. And then click on the  "Add Field" button, in order to add fields you want to be part of your formula.

6. Finally, once you are done with the formula, click on the Save button.


If you want to perform advance mathematical operations, you can check this as a reference: Form Calculation - Math Function Reference 

Here's an example form based on our steps above: https://form.jotform.com/63404144341950  

The Form Calculation widget is not limited to the example I presented, it would depend on the requirement you need or how complex your formula is.

Questions? Please let us know below!


42 Comments...


   
Eduard Bal (January 24, 2014 at 01:54 PM)

How can I get Always two numbers behind de decimal dot? I want for example have as solution of the sum 1.50 * 3 in a total box 4.50 or 1.50 * 2 = 3.00. I see in the total box just 4.5 or 3.
I hope you have a solution for me.

View Answer


   
pennistritter (January 31, 2014 at 05:29 PM)

I am not getting a total unless all fields have a value. What if one field is left blank? How do I get the total to show then?

View Answer


   
davidburt (February 03, 2014 at 11:18 AM)

I want to create a survey form which will have a final score based on the answers. Can you set a value for each question and then display the total?

View Answer


   
ParkingRetkinia (February 09, 2014 at 11:02 AM)

Is it posible to use logical content of calculation like:

IF DATA1=X THEN DATA2=Y OR IF DATA1=XX THEN DATA2=YY OR...etc

If the answer is YES how to write it ?

View Answer


   
broytm (February 11, 2014 at 02:48 PM)

Is it possible to display the total word count in the form.. not just for the individual boxes?

View Answer


   
oranges (February 21, 2014 at 11:32 PM)

How do i associate a number value with a text option as was done in the example.

It appears that the radio buttons and drop down option have a number associated with them although they are text.

View Answer


   
supportadv (February 24, 2014 at 05:49 AM)

Hi, the "Calculate field" option is not happearing on radio button field in my form.
Is it a premium feature? Or is there some other reason?

from the guide:

"Note that the calculation function would only work with the following fields with Numeric entries/options:

1. Radio Button"

View Answer


   
MarkPutt (March 03, 2014 at 04:41 PM)

This doesn't work at all really. It only sees 4 fields that I absolutely don't need to calculate.

View Answer


   
afla21 (March 12, 2014 at 06:16 PM)

How do I get the calculator to ignore unwanted text content?
This is a new problem we just encountered today; the form was working just fine previously.
My form has a radio button that says
"Pre-registration $50". It's taking the hyphen as "negative," and adding -50 to the total field. Also I have drop down menus in the form of 1($12), 2($24), etc. It's taking the value to be $112, $224, etc., screwing up the calculation.
I guess I can change the format so that the relevant field contains just the values we want calculated, but I wonder if there is an alternative solution to this, since it did work before?

View Answer


   
demnos (May 01, 2014 at 09:34 PM)

Can I calculate the number of days between two dates (example: Today minus a date from my form)?

View Answer


   
Demond Spraberry (May 07, 2014 at 12:10 PM)

How can I calculate a form with 6 questions and each question has a different value using a check box?

View Answer


   
simonebrennan (May 27, 2014 at 01:39 AM)

Hi,
Can an 'average' function be added?
I can't simply add the values and divide, since options are 1, 2, 3, 4, 5, N/A. Currently a score of N/A affects the calculation (taking it as zero), when I want it to be ignored.

View Answer


   
thescenedramaworks (August 10, 2014 at 02:49 PM)

How can I get the "other" field in the Radio Buttons options to be a numeric field?

View Answer


   
Joanna (October 08, 2014 at 05:46 PM)

Hi,
I'm adding up fields in the form to calculate the total amount. The math works great but I would like to see a dollar sign in front of the result. $50, instead of 50. The calculation widget does not let me add any extra characters. Any ideas???

View Answer


   
seajj2 (March 26, 2015 at 08:37 AM)

I am trying to plug in this formula (quantity x 10 + 6). The formula works but in the calculation it automatically has the 6 in the total. I do not want it to show anything until they put in the quantity. How do I perform this?

View Answer


   
WOT (April 02, 2015 at 11:52 AM)

I cannot get this calculation tool to work.
1. The fields I need to add are text boxes labeled "Points max20" and so on. The fields I am offered in the calculation wizard are labeled something different.
2. I've inserted the fields, + sign as shown in the example, but the values are not calculating.

Am I missing something? Please help!

View Answer


   
escarecard (May 14, 2015 at 04:10 AM)

I'm trying to calculate a series of inputs with predefined inputs of 0-12. When calculating, the form seems to see 0 as 1, 1 as 2 even though the calculation values are set as 0-12.

Is the form calculation unable to recognise a zero value?

Thanks!

View Answer


   
Andre (May 16, 2015 at 08:05 PM)

é possivel calcular valores dos inputs dentro da Matriz criada?

View Answer


   
astankiewicz (June 11, 2015 at 09:08 AM)

So this functions is only for the form itself and can not be done on the dashboard at all - correct?

My purpose here is this: to make it so 5 viewers of the form results can rate the response from the form on the dashboard.

My Solution using these tools: Each Response is viewed and rated by each judge - the calculation field is recalculated each time and the form is submitted by each judge with each new calculation.

End result each response has a a calculated rating on the dashboard.

Will this work?

Thanks
Al


View Answer


   
cpachiasso (July 01, 2015 at 04:51 PM)

To me dropdown menu do not works for calculations

View Answer


   
strugar (August 27, 2015 at 03:04 PM)

Hi. Is there a plan to add function to calculate Poisson distribution? Similar to Excel function POISSON()? Thanks!

View Answer


   
AlanMnk (September 13, 2015 at 03:39 PM)

How does it work with dropdown menus???

How to attribute a number to dropdown options?

View Answer


   
Nic Crocker (December 09, 2015 at 04:16 PM)

I want to create a form which has 30 questions, each providing 3 potential responses phrased as a statement. I want to calculate how many answer As,answer Bs and answer Cs are selected. Is this possible?

View Answer


   
zappaaviaries (December 11, 2015 at 05:04 AM)

How do I use this for simple inventory tracking. I have an order form and it calculates the order total, but would like this...
I would like to have a beginning in stock number and as the products are ordered, have the available quantity reduced by that number.

How could I do that? Or can I do it even?

View Answer


   
buzz vaughn (January 07, 2016 at 09:47 AM)

how do i add $ and % to the answer calculated

View Answer


   
FransJanssen (February 19, 2016 at 02:43 AM)

Hi,

Using a configurable list with dropdown, I would like a calculation for each row an user fills in.

The text in the configurable list is:
Broodje : dropdown : Zacht wit broodje, Zacht bruin broodje, Hard wit broodje (€ 0.30), Hard bruin broodje (€ 0.30), Croissant wit (€ 0.55), Croissant bruin (€ 0.55) : Maak uw keuze
Beleg : dropdown : Jong belegen kaas (€ 2.35), Oude Kaas (€ 2.65), Achterham (€ 2.65), Salami (€ 2.65), Ossenworst (€ 2.65), Filet Amercan (€ 2.65), Rosbief (€ 2.80), Roombrie (€ 2.80), Gezond (€ 2.80), Huzarensalade (€ 2.35), Eisalade (€ 2.78) : Maak uw keuze
Aantal : number : aantal

How to perform?

Sincerely, Frans.

View Answer


   
polishedcarz (March 11, 2016 at 07:43 PM)

I'm creating a Request a Quote for a Car Service.

Can I use the Driving Distance Calculator in order to calculate the results in mileage x $0.90/mile to equal a quote. Is this possible?

View Answer


   
agendia1 (April 02, 2016 at 09:23 PM)

Your forms service is superb. I just keep discovering every imagination and thought.


   
MGGKC (April 22, 2016 at 01:04 PM)

I would like to perform a conditional calculation. The result will then be added into a grand total using the calculation widget. How do I get the conditional calculation into a field that can be used later?

View Answer


   
hmcdowell (April 25, 2016 at 05:19 AM)

Hello, I am trying to add Calculation field and its not working out like it should. When I click on the check box of the item that I would like to calculate, it does not input the correct amount. For example if the amount is listed as $30, in the calculation field is says my total is 300000000000.00. Not sure how to current this. You should be able to view the form here, https://form.jotform.me/53191348159460

View Answer


   
globalweb (July 03, 2016 at 10:28 PM)

How can I get the calculator widget to ignore certain part of a dropdown value?

For example here are the values we plan to have:
$49 - 10 Leads
$99 - 25 Leads
etc.

It needs to use the dollar value for calculation, but ignore the total lead #.

Thank you.

View Answer


   
elaren (October 05, 2016 at 12:53 AM)

I cannot for the life of me figure out how to calculate the days between 2 dates.
It would be awesome if someone could put the formula/calculation needed to do this.

View Answer


   
supremeprincesspageants (October 15, 2016 at 06:45 PM)

On the new version of the Calculation Widget how do you make the result field read-only?

View Answer


   
JPantoine (October 24, 2016 at 10:10 AM)

I am a new user. I do not find the "advances options" in the calculation widget. How couls I do? Thanks in advance.

View Answer


   
JCP_Art (January 24, 2017 at 02:20 PM)

Is it a way to add sales tax to a product?

View Answer


   
DefenderAmmo (January 24, 2017 at 08:02 PM)

It seems like the calculations work sometimes. I have a string of calculations that I'd like to go into the "total cost" box. It seems like some add together for the total cost and some values just replace whatever is in there. Can someone help?

View Answer


   
SFDAdmissions (February 28, 2017 at 12:02 PM)

I'm attempting to simply 1/2 a total if a preceding field is marked 'yes'.
Summer camp registration and we are giving a 50% to faculty members. I am using the form calculation wizard and have all the fields being added (field 1+field 2+field 3)*.5 is how I have it currently and it is simply returning the total with out the multiplier.

View Answer


   
tiablisstbc (March 23, 2017 at 05:56 AM)

I'm trying to do this equation and it won't give me a final total... help please!
(0x0)+(0x0)+0=

View Answer


   
iondjp (April 21, 2017 at 11:28 AM)

I have used both methods of doing calculation (i.e. Conditional Logic or Form Calculation widget). Is there a benefit or drawback to one over the other? Is there any discernible efficiency as far as speed or managing the code?

View Answer


   
solidhand (May 02, 2017 at 04:22 PM)

why cam my customers write down a calculation of their own in the calculation box?!?
What is the reason for this sh...t?!?!

View Answer


   
olovesz (May 10, 2017 at 03:08 PM)

How do I calculate multiple fields in which some of them need to be multiplied.
For instance Product x quanity, + Product x quanity, + Product x Quanity, equals

View Answer


   
MandirDallas (May 18, 2017 at 08:21 PM)

My calculation works on the form but when submitted and email, the calculated value does not show in the email. Is there a fix for this?

View Answer


Send Comment