Calculated fields

Calculated fields let you perform automatic calculations inside your form — think pricing calculators, quiz score totals, or lead scoring, all based on respondents' answers. You can use simple numeric and text operations, or write full formula expressions for more advanced logic.
Create a form with calculated fields
 
page icon
Calculated fields are available for free to all Tally users.
 


 

Calculated fields examples

Calculated fields enable you to dynamically calculate values based on respondents' answers. Here are some common use cases for calculated fields:
  • Pricing calculators: Build a checkout form where the total updates live as respondents choose products, quantities, or add-ons. Feed the result directly into a payment block.
  • Personality and category quizzes: Tally up answers across categories and route respondents to the matching result page. See our personality quiz guide.
  • Lead qualification: Assign a score or status label ("Hot lead," "Nurture") based on the answers someone gives, and sync it to your CRM via an integration.
  • Name and text concatenation: Combine first name and last name into a single "Full name" field, or build a custom reference string from multiple inputs.
 

Create a calculated field

Insert a calculated field in your form by typing /calculated field. In most cases, it’s best to add calculated fields on top of the form.
 
Tally form editor with the calculated field block open, showing name, type (number or text), and initial value settings
 
  1. Name your calculated field to easily retrieve it in calculations later on
  1. Choose whether the value will be text or a numeric value (number)
  1. Then, add an initial value as a starting point of your calculation. This can be zero (for numbers) or left blank (for text).
 

Insert conditional logic

Before determining the value of a calculated field, you need to add conditional logic to your form. Type/logic to insert it below your calculated field block.
Only you can see the calculated field and conditional logic blocks—respondents won’t see them on your published form.
 
Tally form editor showing a conditional logic block inserted below a calculated field
 

Add calculate action

Conditional logic allows you to perform multiple actions. When using calculated fields, you want to select the Calculate action.
 
Tally conditional logic panel with the Calculate action selected
 
You can perform several numeric and textual operations with the Calculate action:

Numeric operations

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

Textual operations

  • Assign: add a text value, for example, a label or a status, to sync contacts from your form submissions with a CRM or another tool or assign a category name to respondents based on their selected answers. Respondents won’t see this information unless it’s mentioned elsewhere in the form.
  • Concatenate values: combine values in one string. For example, if you have fields for first name and last name in your form, you can create a calculated field that combines the values entered in these two fields into a single ‘Full name’ field. To use this, you need to select Text when creating a calculated field.
 

Formulas

With formulas you write a single expression to combine multiple operations in one go, instead of chaining separate logic steps. Reference any field with @ mentions (e.g. (@price * @quantity) - @discount) and get real-time validation as you type.
Animated demo of writing a formula in Tally using @ mentions to reference form fields like price, quantity, and discount
Supported operations are + - * / and parentheses ( ) for grouping
Use case
Formula
Add tax (5%)
@price × 1.05
Total with quantity
@price × @quantity
Price after discount
(@price × @quantity) - @discount
Apply a dynamic discount % (discount set by respondent)
@price × ((100@discount) / 100)
Apply a fixed discount % (e.g. always 20% off)
@price × ((10020) / 100)
Remove a dynamic tax rate from a total (tax rate set by respondent)
@total × ((100@tax_rate) / 100)
Remove a fixed tax % from a total (e.g. always 16% VAT)
@total × ((100 + 16) / 100)
Calculate a quiz score
@score_q1 + @score_q2 + @score_q3
Build a URL with text concatenation
"https://example.com/" + @page
Combine first and last name
@first_name + " " + @last_name
Prefix a field with a label
"ORD-" + @order_id
Build an address string
@street + ", " + @city + ", " + @country
Make a certificate-style text
@first_name + " " + @last_name + " has completed " + @course_name
Tips:
  • Always use @ + autocomplete to insert a form field
  • Only type manually if you want to add text or numbers that aren’t collected in the form
  • Use parentheses () to control order of operations
  • Wrap literal text in double quotes, e.g. "https://example.com/" + @page
 
page icon
Calculations on date blocks are not available yet.
 

How to use calculated fields

By default, calculated values are not visible in your form. You can find them in the Submissions tab of your form, but you can also display the calculated values in your form, use them in a payment form, or create a dynamic redirect on completion.

Display a calculated field in your form

To mention the calculated value in your form, simply type @ and choose the calculated field from the dropdown menu. You can use this to show a final price, score or quiz result in your form.
If you want to calculate and display currency, add your currency symbol directly before the linked calculated field, like in the example below.
 
Tally form showing a calculated total price displayed inline using an @ mention of the calculated field
 

Dynamic pricing in a payment form

You can use a calculated field to calculate the price of your payment form and make it dynamic based on your respondents’ answers. This means the price will change based on other inputs and logic.
  1. Type /payment to insert a payment form.
  1. Choose your calculated field from the Price dropdown menu in your payment block.
  1. The price will now automatically update according to your respondent's answers, for example, if they select different product types or quantities.
 
Tally payment block with a calculated field selected as the dynamic price source
 
 

Redirect to different URLs and Tally forms

You can redirect respondents to different websites, landing pages, or Tally forms upon form completion. For this, you’ll need to use calculated fields and conditional logic.
You can also add hidden blocks to allow respondents to enter additional information before leaving the form for more comprehensive and trackable lead capture. As a result, the form creates an interactive landing page-like experience.
To learn more about redirecting to different URLs, read our redirect on completion guide.
 
Tally conditional logic setup for redirecting respondents to different URLs based on calculated field values
 

Dynamic email notifications

You can use calculated fields to customize the email body or recipients of your respondent or self email notifications. Learn more about dynamic email notifications here.
 

Frequently asked questions

Can I build a calculator with Tally?
Yes, use calculated fields together with conditional logic to build pricing calculators, quiz score counters, lead scoring systems, and more. Calculated fields are free for all users.
What's the difference between numeric operations and formulas?
Numeric operations (add, subtract, multiply, divide) apply one step at a time via conditional logic. Formulas lets you write a single expression combining multiple operations, e.g. (price * quantity) - discount.
Can calculated fields be hidden from respondents?
Yes. Calculated fields and conditional logic are only visible to you in the form editor. Respondents only see them if you explicitly @mention the field value somewhere in the form.