With Tally's Calculator, you can add magic to your Tally forms by using your respondent’s answers to calculate (and optionally display) scores, prices or other values.

Here’s a grasp out of the wide range of possibilities this advanced feature offers:

• Calculate pricing and update costs in a payment form (read more)
• Apply a discount and update price in real time (read more)
• Calculate the prices of selected products for a quote
• Create a shopping basket and checkout page
• Calculate shipping costs
• Calculate and display quiz scores automatically (view template)
• Calculate the age of a respondent for age checks
• Show different thank you pages based on a score
• Assign a value to respondents (for example: a lead score)
• And many more…

Calculator is free to use for all Tally users.

## How it works

The calculator can perform all kinds of calculations inside your form. Each answer can be given a value, and calculations like add, subtract, multiply, divide, assign and concatenate can be made on those values.

### Calculated fields

To get started you need to define the dynamic value you want to calculate (for example a quiz score, a price or a lead status). The calculated field is available as an advanced block. Open the insert model by clicking ‘+’ or typing ‘/’ and insert ‘Calculated field’.

Give your calculated field a clear description in the name field (for example ‘Score’ when you are creating a quiz) and determine whether the value is text or a numeric value. Then add an initial value as a starting point of your calculation.

### Operations

Next, you'll want to select the operations you want to perform after the initial value. Available operations are:

Numeric operations:

• Subtract a value
• Multiply with a value
• Divide with a value

Textual operations:

• Assign: tag a respondent with a value (for example ‘hot lead’)
• Concatenate values: join values in one string

To add operations, open the insert model by clicking ‘+’ or typing ‘/’ and insert the advanced block ‘conditional logic’. First create a condition, for example: when the answer to the question ‘What is the capital of Bulgaria’ equals ‘Sofia’.

Then add an action and select ‘Calculate’ from the action dropdown. Select your calculated field (in this case ‘Score’), choose an operation (‘Add’)  and add a value (for example, ‘10’) or choose a predefined value from the dropdown menu. In this scenario 10 points will be added to the score when the respondent chooses the right answer.