JotForm User Guide / Form Calculations /

How to Perform Form Calculation Using a Widget

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



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

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!

Send Comment


See all comments
  • seamankim

    Hi! 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!

  • MikeSacker1

    Can 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)

  • TheIIC

    I 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!

  • sergesan

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

  • astagliano

    I'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?


  • FirstGenLife

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

  • David M Reid

    I 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

  • johnkiyaka11

    very helpfull

  • shujun

    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
    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.

  • JuliaGrubbs

    Thank you for your quick response.

  • Carol Carter

    I 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?

  • Khalid2030

    and how I can apply format mask , example :
    100,000.00 USD

  • Khalid2030

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

  • smartbizacademy

    I have obtain in a field at the end of my form, this calculation:
    where n=numerbs of answers i get by my form

    How can i manage it pls?


  • VolACRS

    Hi, I cannot get the form calculation field to show the calculations I'm asking for. You can find this sample form here:

  • dwfw

    Using 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

  • tiind


    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

  • TSComix

    I 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 ?



    Hi, I am having issues just getting a total at the bottom using the Form Calculation Widget for the form below:

    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?

  • eastoho

    I followed these instructions to update my form 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)

  • kgerhard

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

  • asecowens

    I need help with this widget. My form ( 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 Petrou

    I 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...

    Thanks in advance for any help.

  • killko

    I 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?

  • PPTS

    I'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


  • stephoir

    Figured it out! Thanks

  • stephoir

    Hi 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:

  • Stumpy917

    I was scrolling down trying to figure out the answer to my question which coincides with this question a little further down:
    "The checkbox show empty decimal from the option menu has no effect on the calculated value. Also the option swap dot for a comma has no effect, it will always show a dot as a separator. For accounting calculations it is important to show the empty values such as 457,00 € and also here in europe it would be nice to have the comma instead of a dot. any idea why both checkboxes have no effect?

    thanks in advance"

    I read the reply and I've toggled the checkbox and saved the widget settings but it still isn't working. Any idea on how to fix that?


  • Ron Anstis

    I have spent four hours trying to get the calculation Widget to work on my form, without success!. I have inserted either a drop-down or a multiple choice menu (3 choices for 3 different classes of membership), I have activated and assigned calculation values to each choice, I have created a calculation field to display the results, I have clicked on the Widget icon, and selected the desired field for which I wish to display results, I have placed a plus sign after the 0-9 field, then I have omitted the plus sign. I have selected my desired field three times, so that each choice is available for calculation, and I have added + signs on one occasion after each field on the next occasion after the first two only. At each attempt, I have saved the widget, then done a form preview, (eleven times!!!), entered values in the multi-choice fields but at no time does the calculation work, nor do I get displayed results! I feel that I have followed all of the pertinent instructions carefully. Where do I go from here?

  • asexuality

    There is a problem with the system that cannot be calculated

  • rbexe

    I have a multiple choice list and would like the selected items to be totaled at the end. up to 4 of the 5 lines could be selected or minimum of one.

  • ipwebmexico

    how I calculate the impression of 1.50 m by 1.50 meter and its base value is 180 pesos

  • islandmaid

    I have many items in my list that I want to be added up. Is there a way to create a batch addition equation so that I dont have to add plus sings for all items. Thank you

  • jescala

    My total field is pre populated with a "1" before even entering scores:


  • Glasspoint

    my product identity has numbers:
    Glass door thickness 6mm cost 77 Euro

    The calculator takes 6+77= 677 together how can i block this?

  • lejohn05

    Hi, why sometimes a submission is not calculated ? l i have 70 submissions but 3 or 4 submissions don't perform the calculation ?

    Thanks for your help

  • kmattlage

    I'm trying to do some calculations on a grant application form, where I want it to calculate if the applicant has enough in matching funds (33%). How would the formula be entered?
    On the form, the applicant is required to fill in these numbers: Requested Grant Funds, Matching Funds, Total Project Cost
    Total Project Cost x .33 = Y
    Then I would like if "Y" equals more than the number they filled out for Matching Funds, a message pops up that reads: You do not have the required amount of Matching Funds for this project. Please reduce your Requested Grant Funds or increase your Matching Funds.

  • fsholm

    Hi, is there any way to make the calculation field "view only"? At the moment the customer can change the calculated field manually by clicking inside it and entering a different number, and thereby overriding the calcualtion.

  • rcharrison

    Is there a way to format the calculated field so it displays for currency? My calculated field is named Order Total and it gets values from 2 user supplied drop down boxes. Thanks

  • Soheir

    I tried it with my registration form and it was good but now Im trying to but another one in a (test your level) form but it doesn't plz

  • milladesignmaccom

    Does the form calculation count the hidden fields? I have some hidden fields that shall go in my calculation but only when they are shown ... so it depends on other choices the customer makes.

  • Toptechjam

    Help.. how do i get the form calculator to work with the Dynamic Textbox Widget with multiple boxes. i am trying to create a bill payment form where customers can enter there bill(s) amount.

  • edorathy

    I am at a loss. Please help.

    I have a calculation that works until I add in "level of activity" which is a radio button. The entire calculation up to that point should be multiplied by the value associated with each answer. Somehow the answer comes in lower than it should be.

  • espleyk

    I am completely bewildered. For each question in my quiz there is a yes or no answer and depending on each question I have put in a score of 0 or 1.
    I have added the form calculation wizard and added a calculation for each question, but I don't think that's right! But I still can't get it to add it all up. I want to do a conditional logic for the thank you page which gives them a response that depends on the total scored. But when I go to the conditions menu to add conditional logic on the thank you page - I don't have a line that says - Total sum like you have in your example. How do I get a total score at the end in order to then be able to add this conditional logic. Thank you

  • Whudafuq

    I'm sure I'm missing it somewhere, but what is the best method to store and/or submit results via email?

    Thanks in advanced

  • tipi

    The checkbox show empty decimal from the option menu has no effect on the calculated value. Also the option swap dot for a comma has no effect, it will always show a dot as a separator. For accounting calculations it is important to show the empty values such as 457,00 € and also here in europe it would be nice to have the comma instead of a dot. any idea why both checkboxes have no effect?

    thanks in advance

  • ameliabuttress

    Hi there! I have created a form with 24 questions. Each is answered with a radio button rating the answer from strongly disagree to strongly agree. I'd like to make it so that there is a different display depending on what answer is input - if someone agrees or strongly agrees with one of the items, I'd like to recommend they look at different material. I added values to the matrix but when I added the calculation field, it seems to add a bunch of zeros to the total. Including a link to the form for review:

    How do I get rid of these extra zeros?

  • thomasmccullagh

    If I am using the form calculation widget, alongside the matrix dynamique how do I make sure it only calculates one column of the matrix.

  • deweese

    How can you get the decimal correct for result from two times? For example, total hours/mins from a start and end time.