Skip to main content

How to sum multiple score fields (0-10) to get a total score

Learn how to calculate the total score by summing multiple score fields and display the result using answer piping.

Updated over a week ago

This is perfect for building:

  • Evaluations and onboarding flows: Automatically score responses to assess skills.

  • Health checkups and wellness assessments: Instantly add up responses across multiple areas, such as habits, symptoms, or self-assessments, and generate clear, personalized feedback.

  • Employee, student, or customer satisfaction surveys: Combine ratings and feedback into an overall score for easy interpretation and actionable insights.

No coding needed, just set up your fields, add the scoring logic, and Formaloo takes care of the math.

In this tutorial, we'll walk you through the process of calculating a total score by summing multiple score fields (0-10) in your form.

Step 1: Set up your form

Add your score fields:
In your Formaloo form, insert as many Score fields as you need.

In this example, two score fields, Score-1 and Score-2, are added to the form, each allowing scores between 0 and 10. (Each score field allows users to select a value within a range you define. )

Add a variable field for total score:
Now, add an Integer Variable field to calculate the total score.

Name it Total Score and assign an ID to it (e.g., total_score).

📝 Additional insights:
You can edit a variable field’s name or ID anytime by clicking on the field in the right sidebar. If you update the ID, make sure to update it everywhere you’ve used it.

This ID can be used for answer piping, which lets you display the value of that variable inside messages, success pages, emails, PDFs and more.

Now, you can use logic to calculate the total score.

Step 2: Set up logic to calculate the total score

Go to SettingsAdvanced Logic:

Add a rule:

  • Condition: If Score-1 is answered, add its value to the Total Score variable. Similarly, for Score-2, set the logic to add its value to the same Total Score variable.

Step 3: Display the total score using answer piping

To show the result to your users, you can use answer piping on the success page or inside a content block. Here, we’ll use a content block.

  • Add a Content Field.

  • Use answer piping with the variable ID: @total_score or {{total_score}}

  • Example message: “Your total score: @total-score"

Here’s how users rate each question and see their total score:

You can also see the calculated scores in your result table too:

💡Tip:
To avoid unexpected values, make sure to initialize your variable by setting its default value to 0. This ensures the total score is calculated correctly, even if some questions are left unanswered.

🔧 Troubleshooting:

If your total score isn’t updating correctly, double-check the following:
- Field IDs match exactly across your formula, answer piping, and logic rules.
- Logic rules are applied in the correct order.
- All score fields are either marked as required or shown conditionally based on user input.

Did this answer your question?