# How to Perform Form Calculation Using a Widget

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 to do this - You can use **Conditional Logic** or you can use the **Form Calculation Widget**. In this guide, we will discuss how to use the widget to perform a calculation.

**Video Tutorial**

1. Click on **ADD FORM ELEMENT**.

2. Go to 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 by the **QUANTITY** on a number field.

NOTE:If you want to assign aCALCULATION VALUEon a radio button, drop down or check box field, then you need to check this guide: How to Assign Calculation Value

4. Click the **CALCULATION WIDGET** to highlight it then click the **WAND** icon.

5. On the widget wizard, click the **ADD FIELD** button to add the fields that will be a part of your formula.

6. Finally, once you're done with the formula, click the **SAVE** button.

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

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

The **Form Calculation Widget** is not limited to the example above - It would depend on the requirement you need or how complex your formula is.

Questions? Please let us know below!

**Contact Support:**

iamneilandrewIs there a way to calculate on multiple text fields widget? there's no option and calculation values like the ones in the multiple choice widget.

lpcamjformNoticed when I was adding product list up the last product didn't add to the total, ive got

Product 1 +

Product 2 +

.....

Product 20+

Procut 21

I thought it was becuase I didn't have a + on the last product but the operator from the previous is to add the next one so shouldn't need it. I added the + at the end and the 0 disappeared from the calculation field and a huge number appeared in the field like this 23000000e

I removed the + at the end and it fixed the addition but the last one didn't add still. Any thoughts?

sscheetz1234How can I make the number of available items in the widget match the number of items available in the form? Sometimes they match, but most of the time I have to play around with the widget to make the number on the actual form show the correct amount available,

elenmachanosckHow can I count the number of "NA" answers were given, considering all my questions have the same set of answers (NA,0, 1, 2, 3)?

TRUDIEI desperately need your help!

I seek products in quantities of 7,14,21,28 each quantity has a different price. If products are bought individually or as extras they have an individual price. How can this be calculated on the order form wheN clients chose each product ?

Thank you

yi.mzcshow to put the read only on this ? So the e result cannot be changed. thanks

nelsonicFor my products, I need a calculation that will subtract 1 product cost if 3 products are selected to purchase. Buy 3 get one Free.

cjp_pianoGreat, but how do I lock it so people can't enter their own amount?

triple21I think i did but its not calculating.

https://form.jotform.com/201295025087149

Please help

FOWHTerrible instructions. I followed them 10 times and the field would not add.

Then I looked at properties, and removed the width to zero (number of characters that could be added), and then it worked.

susanannmunroI need the form to add up a number of items, not just one with a quantity.

t shirt 10

shoes 20

bag 50

If I want to buy 1 of each... then calculate $80 with GST

agclassroomI'm having trouble with the Form Calculation Widget. I'm developing a judging rubric with tabs and I need to add up each tabbed section at the end of the rubric. It's not allowing me to do that.

Lisa Gaskalla

joe.lunaIs there a way to lock the field so the person cannot change the calculation? Im creating an expense report. The calculation sums up a total. I would not want some one to change that total.

Lisa MacKissackPlease can you tell me how I can calculate the total number of products ordered on the list

Thanks

DEEDRA MORLEY-ARTISI am trying to get the calculations back to

INVOICE AMT + 3% CC PROCESSING FEE + $150 LATE FEE. The settings will no longer calculate as before I added the late fee.

Please HELP with formula

OrganicTouchHello, is there anyway I can create seperate category when using the purchase widget?

Example:

•Apparel (1 category)

Shirts

Pants

Sweater

•Foot Wear ( 2 category)

Slippers

Sneakers

Boots

•Outer Wear (3 category)

Coat

Hats

Jackets

OrganicTouchMy total is still not showing up as $money. It says 40. I would like for it to say $40.

I added $ sign in my calculations field but still not working

taikensIf i want to select multiple items with various quantities how would I build that?

JarryHi! Is there a way in JotForm to create step-by-step forms like in stepFORM?

CSCFormHow do I change the font size for the calculation wizard only. I want to make the calculation font larger the rest of the form font?

Thanks,

forden817Hola, no estoy pudiendo integrar este campo con airtable. Al widget de cálculo lo utilizo para unificar los datos de varios campos desplegables y de texto corto. Podrán ayudarme?

WholeArtedHi,

I looked at the videos that were given in response to the question below, but I don't see how the answer relates. I have spent days trying to finalize a form to allow parents to can add details & book classes for multiple children. I have worked it out so parents can book in siblings for the same class or for different classes (which cost different amounts)

What I can't work out is how to limit the sales of each class so I don't overbook them.

I would really appreciate your assistance.

Thank you,

D

Question asked on October 04, 2018 at 02:25 PM:

'Is there a way to add Inventory Quantities to items? (for example - if I only have 5 shirts to sell -- I don't want the 6th person to be able to buy it.. )'

Kevin_G

Answered on October 04, 2018 at 03:21 PM

The response was:

Unfortunately, it's not possible to do that through the payment field settings, you will need to use the inventory widget instead, here is the link: https://widgets.jotform.com/widget/inventory

You may perform calculations based on this and get the total, then you may pass the total to the payment field, here are some guides that will help you doing so:

https://www.jotform.com/help/259-How-to-Perform-Form-Calculation-Using-a-Widget

https://www.jotform.com/help/275-How-to-Pass-a-Calculation-to-a-Payment-Field

I hope this helps.

seamankimHi! I wanted to create a form for my husband and I to fill out when we spend money in certain budget categories. With each submission that has a dollar $ amount entered, I wanted the total to be subtracted from the budget we have. I can figure out how to do the calculation one time from the total budget amount; however, I was hoping to have that number change for future forms in that same category. For example, on DAY 1 I spend $100 of my $500 grocery budget. But, then on DAY 5, I spend another $100 - I want that new $100 to be taken out of the $400 we had left after DAY 1's submission. Is there a way for 1 form to calculate based on previous form submissions answers? Thanks!

MikeSacker1Can you set up this for me.

A = Selling Price

B = Other Agencies (calculation is 6% of A)

C = Our fee (calculation is 2% of A)

D = Saving (calculation is B minus C)

TheIICI am using the Jotform Quiz App and am having a problem with my form correctly calculating the score. There are 5 questions, each is worth 20% and the result I am getting is 2080! I can't figure out what I missed. Please help!

https://form.jotform.com/91716033692155

sergesanHow can I put $ sign onteh calculation result -- I followed the suggestion to add $ sign from the keyboard before the added field - please advise

astaglianoI'm trying to do a simple calculation.

I am having my members enter dollar amounts into each cell and I would there to be a running total as they enter amounts. I can't figure out how to get the widget to do simple addition.

Is that possible?

Thanks

FirstGenLifehow to do I run he wizard for payments without products, but using conditional logic to add up the cost?

David M ReidI am working with the PayPal form I cannot see where or how this integrates to our specific PayPal account. If I put our PayPal account email under PayPal Integration this may be a possibility however when I test the form and pretend to purchase something and click on the 'Go to payment page' what comes up is not the email I entered as a purchaser but the email I placed in the Integration which is our business PayPal email.

How do I get the payment button to go to the purchaser's PayPal payment? and how does this form integrate with our actual business PayPal account?

God Bless

David Reid

johnkiyaka11very helpfull

shujunhi

i am currently doing a form like this:

Products Daily Sales Price (RM) Total sales Commission (%) Total commission (RM)

A 9 9.4 84.6 5% 4.23

B 5 10 50 3% 1.5

C 10 5 50 3% 1.5

7.23

i just able to set the formula for the 1st row, but i have no idea how to set the formula for the remaining rows, Is it able to set the formula of the auto calculation for each row?

Thank you.

JuliaGrubbsThank you for your quick response.

Carol CarterI am currently building a website. I am an editor; I charge clients per word(ie, word count).

I need a calculator that will

1. Accept the word count entered by the client. The number must be between 1000 and 5000. If the number is lower than 1000 or 5000, it should generate a message (eg, "Please see ...") or simply grey out.

2. The calculator must then multiply the word count by the cost per word (eg, 0.10).

3. The calculator must immediately produce the result on the same page with the currency symbol (US$) in front of it.

4. The actual calculator and calculation must be hidden from sight.

Can your calculator do this?

Khalid2030and how I can apply format mask , example :

100,000.00 USD

Khalid2030Hello,

This is fine, how I would make it read-only, so no one can modify the calculated field?

smartbizacademyHi

I have obtain in a field at the end of my form, this calculation:

Sum(1:n)/n

where n=numerbs of answers i get by my form

How can i manage it pls?

marco

VolACRSHi, I cannot get the form calculation field to show the calculations I'm asking for. You can find this sample form here: https://form.jotform.com/83315515964158.

dwfwUsing the Form Calculation widget, it appears to be concatenating the numbers in the two fields rather than adding them together...

Field 1: 100

Field 2: 10

Total (calculated): 10010 (instead of 110).

Help please

tiindHello.

I want to do a calculation, but I want to receive a mobile number or an email adress before they get the answer. Is this possible?

Tiind, Øyvind

TSComixI would need a field with this calculation:

The first 3 characters of a field (name) +

The first three characters of a field (surname) +

random number (unique)

It's possible ?

Thanks

cfernandez@cheltenham.orgHi, I am having issues just getting a total at the bottom using the Form Calculation Widget for the form below:

https://form.jotform.com/80276047626156

I've assigned values of 0, 1, and 2 to each of the available choices and I just want it added up at the end for my view only. Each time I preview and fill the form out for submission, the results I get are all over the place and don't make any sense. Can you get into the form and tell me what am I doing wrong?

eastohoI followed these instructions to update my form https://form.jotformeu.com/83071712731350 unfortunately the results are not what I expected!

The Form Calculation Widget I created was intended to sum the VLK (Volunteer Lock Keeper) hours a volunteer the spent in the month. However adding a single hour to the matrix the Calculation results in 1e+55!

What have I done wrong?

Thanks for an excellent product. Really enjoy working with Jotform.

Best regards,

Howard (Canal River Trust Volunteer, Kenilworth, England)

kgerhardHow do you get the calculation widget to add the $ sign to the number?

asecowensI need help with this widget. My form (https://form.jotform.com/82435962995170) needs to calculate the results of scores in various sections, and the weighted results. I am able to calculate the numerical scores in each section with simple addition. I can't figure out how to calculate the weighted scores for each section.

For example, if a section total score has a weight of 15% the calculation for the section score would be:

Section Score/Max Possible Section Score x 100 x 15% = Weighted Section Score

How can I make this calculation in the section total field?

Craig PetrouI am looking to create a tuition calculator for our dance studio.

I am looking at a way in which parents would be able to add various dances classes and have the calculator figure out their monthly tuition after discounts. Here is our current tuition chart in which we use to manually figure out monthly tuition...

45 Minute Class $43.00

2 - 45 Minute Classes $60.00

3 - 45 Minute Classes $85.00

4 - 45 Minute Classes $104.00

60 Minute Classes $48.00

2 - 60 Minute Classes $65.00

3 - 60 Minute Classes $90.00

4 - 60 Minute Classes $116.00

5 - 60 Minute Classes $140.00

6 - 60 Minute Classes $160.00

45 Minute Class and 60 Minute Class $62.00

2 - 45 Minute Classes and 60 Minute Class $87.00

45 Minute Class and 2- 60 Minute Classes $88.00

2 - 45 Minute Classes and 2 - 60 Minute Classes $110.00

3 - 45 Minute Classes and 60 Minute Class $114.00

45 Minute Class and 4 - 60 Minute Classes $132.00

45 Minute Class and 5 - 60 Minute Classes $145.00

Unlimited classes (6 or more 60 minute classes) $160.00

Here is our current tuition cost page...

http://www.tapnarts.com/costs/

Thanks in advance for any help.

killkoI used calculated fields, and the linked m form to Google Sheets. When the result is positive a number appears in a Sheet cell, but when the result is negative a TEXT() is created instead (ie. =TEXT("-98.95","0")). Why, this makes calculations in Google Sheets difficult without reformatting?

PPTSI'm wanting to set up a calculation for a time sheet form with the following formula - Time in + Time Out - Lunch = Total daily hours. I then want the form to calculate the total hours for the pay period by adding up the Total daily hours. How can I set up this formula?

abhirich......Thanks

stephoirFigured it out! Thanks

stephoirHi I accidentally deleted the SUBTOTAL calculation form. I tried to add it back and insert the equation but I cannot find the "Quantity" field. Please help: https://form.jotform.com/81907050574255