User Guide

 

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.

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

Send Comment

55 Comments...

See all comments
  • 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 work...help plz
    https://www.weebly.com/editor/main.php

  • milladesignmaccom

    Hi.
    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. https://www.jotform.com/build/72356378932163

    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: https://form.jotform.us/71796041502150

    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.

  • asesoresdi2

    ey people how can do calculation of 0.00003511 and get 10%, the problem is jotform don't show number less that 0

  • fiesensi

    How can I use "Count Rows" for a "Infinite List"?

  • MandirDallas

    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?

  • olovesz

    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

  • solidhand

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

  • iondjp

    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?

  • tiablisstbc

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

  • SFDAdmissions

    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.

  • DefenderAmmo

    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?

  • JCP_Art

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

  • JPantoine

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

  • supremeprincesspageants

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

  • elaren

    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.

  • globalweb

    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.

  • hmcdowell

    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

  • MGGKC

    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?

  • agendia1

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

  • polishedcarz

    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?

  • FransJanssen

    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.

  • buzz vaughn

    how do i add $ and % to the answer calculated

  • zappaaviaries

    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?

  • Nic Crocker

    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?

  • AlanMnk

    How does it work with dropdown menus???

    How to attribute a number to dropdown options?

  • strugar

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

  • cpachiasso

    To me dropdown menu do not works for calculations

  • astankiewicz

    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


  • Andre

    é possivel calcular valores dos inputs dentro da Matriz criada?

  • escarecard

    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!

  • WOT

    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!

  • seajj2

    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?

  • Joanna

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

  • thescenedramaworks

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

  • simonebrennan

    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.

  • Demond Spraberry

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

  • demnos

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

  • afla21

    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?

  • MarkPutt

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

  • supportadv

    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"

  • oranges

    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.