Adding a calculated field
1
Open the form builder
Go to Sites → Forms & Surveys and create or edit a form.
2
Add input fields
Add the fields that will feed into your calculation (Number fields, Dropdown fields with numeric values, etc.).
3
Add a calculated field
Drag a Calculation or Computed element onto the form. This field displays the result of a formula.
4
Write the formula
In the calculated field settings, write your formula referencing other fields by their field ID.
Basic arithmetic
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
Configure the display format in the calculated field’s settings.
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.
Test with edge cases
Test with edge cases
Enter zero, very large numbers, and negative numbers to make sure your formula handles them correctly.