Using the formula builder
The formula builder lets you write an expression that combines your question answers into an instant price estimate. This guide covers the basics — variables, operators, and outputting the result.
How formulas work
Every question in your funnel has a variable name — a short label you choose, like area or rooms. The formula references those variables to calculate an output.
For example, if you have a question asking for square footage with variable name sqft, and your price is £12 per square foot:
sqft * 12
That is a complete formula. When a visitor enters 150, the result is £1,800.
Setting variable names
- Select any question in the builder
- In the right panel, find Variable name
- Enter a short lowercase name with no spaces — use underscores if needed (
room_count,floor_area)
Only questions with a variable name can be used in the formula.
Writing the formula
- Click the Formula tab in the builder
- Type your expression in the formula editor
- The preview updates in real time as you type
Operators
| Symbol | Meaning | Example | |--------|--------------|------------------| | + | Add | labour + materials | | - | Subtract | total - discount | | * | Multiply | sqft * rate | | / | Divide | total / rooms | | () | Grouping | (a + b) * rate |
Numbers
You can mix variables and fixed numbers freely:
(rooms * 150) + 200
This would charge £150 per room plus a £200 fixed fee.
Conditional values
Use IF to apply different prices based on an answer:
IF(property_type == "flat", sqft * 10, sqft * 14)
This charges £10/sqft for flats and £14/sqft for everything else. The condition uses == for equality.
Variable names and string values are case-sensitive. Make sure they match exactly what is set on the question.
Formatting the output
In the Output panel you can:
- Set a currency prefix (e.g.
£) or suffix (e.g.per month) - Choose the number of decimal places
- Add a minimum or maximum display value
- Show a range (e.g. £1,200–£1,600) by adding a percentage buffer
Testing your formula
Use the Preview panel to enter test values for each variable and confirm the output is correct before publishing.
Troubleshooting
The formula editor shows an error. Check for unmatched brackets, mistyped variable names, or a missing IF closing bracket. Variable names are case-sensitive and must match exactly.
The result shows NaN or Infinity. This usually means a variable has no value (a question was skipped) or a division by zero. Add a guard using IF:
IF(rooms > 0, total / rooms, 0)