Calculations
Add live calculations to your forms that update in real time as users fill in fields. Use them for order totals, quiz scoring, pricing estimates, conditional values, and any computed field.
Adding a calculation
- Open your form in the canvas builder
- Add a Calculated field (see Calculated Field)
- Write the calculation formula
- The result displays live as the user fills in the form
Formula syntax
Calculations use a formula language similar to spreadsheet formulas. Reference other fields by their field name:
{{Quantity}} * {{Unit Price}}
Operators
| Operator | Description | Example |
|---|---|---|
+ | Addition | {{Price}} + {{Shipping}} |
- | Subtraction | {{Total}} - {{Discount}} |
* | Multiplication | {{Quantity}} * {{Price}} |
/ | Division | {{Total}} / {{Quantity}} |
% | Modulo | {{Value}} % 10 |
Functions
| Function | Description | Example |
|---|---|---|
SUM(a, b, c) | Add multiple values | SUM({{Item1}}, {{Item2}}, {{Item3}}) |
ROUND(n, dec) | Round to decimal places | ROUND({{Total}} * 1.0875, 2) (tax) |
IF(cond, then, else) | Conditional value | IF({{Quantity}} > 10, {{Price}} * 0.9, {{Price}}) |
MIN(a, b) | Smaller value | MIN({{Budget}}, {{Estimate}}) |
MAX(a, b) | Larger value | MAX({{Score}}, 0) |
ABS(n) | Absolute value | ABS({{Balance}}) |
CONCAT(a, b) | Join text | CONCAT("Order total: $", {{Total}}) |
Common calculation patterns
Order total
{{Quantity}} * {{Unit Price}}
Order total with tax
ROUND({{Quantity}} * {{Unit Price}} * 1.0875, 2)
Tiered pricing
IF({{Quantity}} >= 100, {{Quantity}} * 8.99,
IF({{Quantity}} >= 50, {{Quantity}} * 9.99,
IF({{Quantity}} >= 10, {{Quantity}} * 10.99,
{{Quantity}} * 12.99
)
)
)
Quiz scoring
SUM(
IF({{Q1}} == "Correct Answer A", 10, 0),
IF({{Q2}} == "Correct Answer B", 10, 0),
IF({{Q3}} == "Correct Answer C", 10, 0),
IF({{Q4}} == "Correct Answer D", 10, 0),
IF({{Q5}} == "Correct Answer E", 10, 0)
)
BMI calculator
ROUND({{Weight_kg}} / ({{Height_m}} * {{Height_m}}), 1)
Discount based on dropdown selection
IF({{Coupon}} == "SAVE10", {{Subtotal}} * 0.10,
IF({{Coupon}} == "SAVE20", {{Subtotal}} * 0.20,
0
)
)
Estimated delivery date text
IF({{Shipping}} == "Express", "2-3 business days",
IF({{Shipping}} == "Standard", "5-7 business days",
"7-10 business days"
)
)
Display options
| Setting | Options |
|---|---|
| Format | Number, Currency ($, EUR, GBP), Percentage, Text |
| Decimal places | 0, 1, 2, or auto |
| Prefix | Text before the value (e.g., "$") |
| Suffix | Text after the value (e.g., " USD" or "%") |
| Visibility | Show to user, or hidden (used in backend logic only) |
Calculations + Logic
Calculated fields work with form logic:
- Show/hide based on calculation: If
{{Total}} > 1000, show a "Request approval" field - Validate with calculation: Require that
{{End Date}} > {{Start Date}} - Route based on score: If quiz
{{Score}} >= 80, show "Congratulations!" screen
Calculations in submissions
Calculated values are saved with the form submission. They appear in:
- The Responses tab as a regular column
- CSV/Excel exports
- Webhook payloads (
{{calculated_field_name}}) - Workflow trigger data
Use hidden calculated fields for backend logic. For example, calculate a lead score based on multiple answers, keep it hidden from the user, but use it in your workflow to route the lead appropriately.
Calculations update live as the user types. If a referenced field is empty, the calculation treats it as 0 (for numbers) or empty string (for text). Use IF({{Field}} != "", formula, "Please fill in all fields") to handle empty states gracefully.