Adding a calculated field
Add input fields
Add the fields that will feed into your calculation (Number fields, Dropdown fields with numeric values, etc.).
Add a calculated field
Drag a Calculation or Computed element onto the form. This field displays the result of a formula.
Basic arithmetic
| Operation | Syntax | Example |
|---|---|---|
| Addition | field_1 + field_2 | Total price = base + shipping |
| Subtraction | field_1 - field_2 | Discount = price - savings |
| Multiplication | field_1 * field_2 | Total = quantity * unit_price |
| Division | field_1 / field_2 | Per-unit cost = total / quantity |
| Parentheses | (field_1 + field_2) * field_3 | Group operations for order of precedence |
| Constants | field_1 * 0.08 | Tax = subtotal * 8% |
Referencing other fields
Use the field’s ID (not the label) in your formulas. Find the field ID in the field’s settings panel. Example: If you have a Number field with IDquantity and another with ID unit_price:
Conditional calculations
Use conditional logic to apply different formulas based on user selections:Example: Tiered pricing
If a dropdown fieldplan_type has values “Basic”, “Pro”, and “Enterprise”:
- Basic: $29/mo
- Pro: $79/mo
- Enterprise: $199/mo
Example: Discount tiers
Apply different discount rates based on quantity:- 1–10 units: no discount
- 11–50 units: 10% discount
- 51+ units: 20% discount
Displaying results
| Display option | How |
|---|---|
| As a number | The raw calculated value |
| As currency | Format with $ prefix and 2 decimal places |
| As percentage | Format with % suffix |
| Hidden | Calculate but do not show (useful for intermediate values) |
Use cases
- Price calculator
- ROI calculator
- BMI calculator
- Loan estimator
- Service quote
Fields: Product dropdown, Quantity (number), Add-ons (checkboxes)Formula:
(product_price * quantity) + addon_totalShows the total cost in real time as the customer builds their order.Limitations
- Calculated fields are computed client-side (in the browser) and update in real time
- Complex multi-step formulas may need to be broken into intermediate calculated fields
- Trigonometric and advanced math functions may not be available — use basic arithmetic
- Calculated field values can be submitted with the form and stored as contact custom field values
- Precision is limited to standard floating-point arithmetic (minor rounding differences possible)
Tips
Show the calculation step by step
Show the calculation step by step
Use multiple calculated fields to show subtotal, tax, discount, and total separately. This builds trust and transparency.
Use hidden fields for intermediate values
Use hidden fields for intermediate values
Test with edge cases
Test with edge cases
Enter zero, very large numbers, and negative numbers to make sure your formula handles them correctly.