# 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:**

bnorthupI'm a jotform subscriber. creating a spelling quiz...trying to make it calculate automatically. help.

xhrcreativeI want to calculate the number of hours spent out of my 3 employers.

If each has 40 hours and they spent 50 hours each, I have a Total of -30

How can I do that form?

dany_villasfiz o processo de inserir o wiget no formulario , mas não está saindo o resultado

https://form.jotform.com/dany_villas/avaliao-terica-emergncia--

onde estou errando ?

gradlerOn a Form, I have a question about what actions were taken today, listing 16 separate things. I designed the question using a widget called "Checkbox in Dropdown". For each day that the form is filled out, I also want the form to add up how many of the 16 actions were carried out.

Do you know how I can get JotForm to calculate this automatically (so I don't have to do it manually for each daily entry)?

Thanks!

cgibson94How do I add 10 or more cells together using this calculator? Every time I add the column, I get zeros forced in some of the columns. However, whenever I use only 9 rows everything calculates fine. Please help.

Thank you,

Chase Gibson

Joshua_Rosenthalhow do i insert this calculation into my original PDF file, because i want to keep and use that with calulated score in the file not separate in data table Jot derivative?

I don't see a way to tell the result to paste into my own PDF version from the form in the builder.

ET29hola, buenas noches. hice un formulario para anotarse en 4 clases diferentes con un cupo de 30 personas en cada uno. ¿Cómo puedo hacer para que si ya se lleno un curso con 30 alumnos, puedan anotarse en cualquiera de los otros 3? gracias

ficpasfHello -

I am trying to calculate the overall gpa from the courses and their grades submitted on a table.

anita.protichThis is my issue:

I am creating an evaluation form where there are a number of topics. For each topic, I created a table, I want to add a Heading (main topic) and subheading (general question leading to the table columns and rows. For example:

TOPIC - Educational Goals and Learning Objectives

SUBHEADING Based on the content of the course, I am able to:

TABLE containing columns and rows with radio buttons

Now I cannot attach #1 and #2 to the table. Formatting only allows me one line of input. So I have to create #1 outside of the Table. This now places makes #1 not part of the table and not part of any report I ask for. Can you create a way to allow more lines of text within a table heading?

Table: For each table there are multiples of columns and radio buttons (strongly like>>>strongly dislike (5,4,3,2,1,). For example:

1. "Knew the subject matter" with the 5 radio buttons

2. "Answered questions effectively" with the 5 radio buttons with values assigned (5,4,3,2,1,)

3. "etc "

4. "etc "

Creating a report how an I get calculations for:

1. The AVERAGE sum for each column amongst many submissions?

2. Having more than one line of heading in each table?

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?