Add a price or score calculation to your form

Calculations can total up prices, score leads or do anything else that requires you to use basic calculations. You can use calculations on quizzes, lead qualification forms, shopping baskets, order forms and much more.

Use the score or price variable to keep a running total of the numeric values in your form. You can assign a number value to your answer options and when respondents select their answer choices, the values you’ve assigned will be added to the score or price variable.

This guide will walk you through how to calculate a price on an order form. To use the price variable, you must use the Payment question type with Stripe or PayPal. (available on the Basic or higher plans).

The following question types are not supported when using variables with calculations:

  • Contact Info
  • Email
  • Phone
  • Address
  • Video Answer
  • Clarify with AI
  • Ranking
  • Matrix

How to add a price or score calculation

In our example below, we’ve created a simple coffee bean order form that’ll calculate the total cost based on how many units the respondent wants to order. We use the price variable for our calculations.

1. We’ll start with a Picture Choice question type to show the different coffee blends we offer with their different prices.

2. Next, we’ll add a Number question asking how many bags they would like to order.


Tip! Use Recall information to pull information from a previous form question into another question you ask later on. In the example above, we recalled the coffee blend the respondent chose from question 1 into question 2 where we ask how many bags they would like.

3. We’ll add a Payment question type that integrates with Stripe, where the respondent can complete their order. Or you can choose to integrate with PayPal.

4. Next, we want to add in our prices for the different coffee blends we have to the price variable.

Click the + button next to Logic.

You can also add and edit calculations logic from the Workflow panel. Click Workflow and then Logic. Find out more about where you can access logic here.

5. Now we'll add the cost of each item to the price variable.

Click on the question that asks which product you would like to buy on the left, then click Calculations.

Then click + Add calculation.

6. We want to add a rule where if the respondent selects the option Light roast ($20), then we want to add 20 to the price variable. The first part of the rule will determine how much you want to add to the price variable.

We'll create the following rule with the dropdowns:

+ Add Enter a number (20) to the price variable

The second part of the rule will determine when you want to add that amount to the price variable.

We'll create the following rule with the dropdowns:

When What type of roast would you like? is A Light roast ($20)

Click + Add calculation to add another rule and repeat the same process for the other 2 coffee blends we offer.

Then we'll create the following rules:

+ Add 18 to the price variable when What type of roast would you like? is B Medium roast ($18)

+ Add 16 to the price variable when What type of roast would you like? is C Dark roast ($16)

Now whenever someone selects their coffee blend, the individual price will be added to the price variable.

7. Next we’ll move on to question 2 in our form that asks for how many bags they would like to order. On the left of the logic window, click on the question that asks how many of the item they would like to order. Then click Calculations

Click + Add calculation

8. We’ll add a calculation that multiplies the price variable by how many bags they would like.

The first part of the rule will determine the calculation you want to add. We'll create the following rule:

X Multiply the price variable by #2 How many bags would you like?

The second part of the rule will determine when you want the calculation to happen. We'll select Always from the dropdown.

9. Click Save when you’re done adding in your calculations.

This rule will now always multiply the price variable (that contains the price of the coffee) by how many bags the respondents enters.

Calculation tips

After you’ve created your calculations, we recommend testing your form to confirm the calculations are correct by using preview mode.

If you’re creating an Always rule, this will trigger the rule to always happen.

You can include a decimal in your calculation with a maximum of 2 decimal places.

You can create as many variables for your form as you want and reference them in calculations. You can even perform mathematical operations between variables. Learn how to add and change variables.

Default price or score value

The default value for the score and price variable is initially set at 0. This means that everyone who responds to the form will have a starting score or price of 0 at the beginning of the form.

To change the default value, first set up at least one logic rule that changes respondents’ score or price based on their answers. Once you’ve done that, you can set the default value to any number you like.

For example, if you have a quote form asking how many units someone wants and each unit you're selling is $5, you can set the default value for price at 5. Then create calculation rules to multiply the number of units that someone wants by the default value of 5. Below is what the calculation rules could look like.

Then you can set a default value for the price or score variable in the Workflows tab by clicking the Variables icon in the Workflow panel.

Then set your default values for the variables in the fields.

Reference score values in your form

You can use Recall information to show score or price values anywhere in your form. For example, you might reference a respondent's final quiz score in the Ending screen.

The form will show updated values after a respondent answers the questions that you've created rules for. In other words, if you've set up a rule for question 2 that changes a variable's value, you can reference that variable in question 3 to show its updated value.

You can also show score values as fractions and percentages.

Show respondents different Endings based on score

Check out our article on how to show respondents different Ending screens based on their score.

Was this article helpful?

Have more questions? Submit a request

Tap into our community knowledge

Find answers

Can’t find what you’re looking for?

Contact support