Form Calculation widget isn't calculating correctly

  • Jessica_von
    Asked on May 9, 2025 at 7:55 AM

    In the 1st Thinnings total m3 field, I have a formula that pulls from a table in the form, but it does not calculate correctly if completed and submitted. Can you please help


    The total m3 should add up to 1928.672m3 and the price should be R289 300.90

  • Reymae JotForm Support
    Replied on May 9, 2025 at 8:35 AM

    Hi Jessica,

    Thanks for reaching out to Jotform Support. I checked your form and the reason why it's not working is that the rest of the formula aside from the Table field is in String or Text version. It's really easy to convert your formula from String to Number. Let me show you how:

    1. In Form Builder, select your Form Calculation widget.
    2. Click on the digits to make them Dark Gray and turn them into Numbers for the Calculation to work.
    3. Then choose the Save button.

    Form Calculation widget isnt calculating correctly Image 1 Screenshot 50 Aldo, if you want to calculate multiple operations and multiple fields at the same time, it's better to enclose or group them inside a parenthesis. Take a look at the two formulas below and how they differ in results due to the PEMDAS rule:

    Formula 1:

    Form Calculation widget isnt calculating correctly Image 2 Screenshot 61Formula 2:Form Calculation widget isnt calculating correctly Image 3 Screenshot 72

    Check out the screencast below to see my results: Form Calculation widget isnt calculating correctly Image 4 Screenshot 83 Reach out again if there’s anything else we can help you with.

  • Jessica_von
    Replied on May 9, 2025 at 8:59 AM

    Thank you for the tips of the parenthesis, I fixed the formula like you suggested but still it is not giving the right answer. Can you please look again. From the 2nd row inputs, the formula is not calculating correctly.

  • Gian_D JotForm Support
    Replied on May 9, 2025 at 9:26 AM

    Hi Jessica_von,

    Are you referring to the second row input fields of your 1st Thinnings Logs Input Table? If so, I've cloned your form and saw that the formula for those fields still doesn't have open and close parentheses, which can cause some issues with calculation priority. Check out the screenshot below:

    Form Calculation widget isnt calculating correctly Image 1 Screenshot 20

    You can follow the steps provided by my colleague to learn how to insert open and close parentheses on your Form Calculation widget to fix the prioritization on your formula.

    Give it a try and reach out again if you have any other questions.