⭐ Available in the following bundle: Conversion Bundle (incl. in Growth, Scale)
⭐ Available on the following plans: Pro, Agency, Business
👀 Not sure which plan you're on? Check your subscription here.
Add calculations to your flow by using variables to assign lead scores to your leads, or to tailor your sales process to each prospect. Whether you need custom offers or ROI calculators, create anything that delivers genuine value to your users.
The Calculation feature presents an excellent opportunity to offer your prospects a helpful tool, fostering increased trust in your brand, a proven method to boost conversion and lead rates.
Setup
General
- Under Content in the block's settings, highlight the text that you want to turn into a formula. In the toolbar, select “Formula”. 
 
- Specify how many decimal places should be displayed in the results. Currently, a maximum of two decimal places is supported. 
 
- Set a fallback content and enter the message that will be shown to flow visitors if the calculation fails. 
 
- Adjust the System label if you want to see the results in your responses. 
 
💡 Looking for more complex calculations? The entire math.js syntax is supported. If functions should be used, just omit the Math, i.e. Math.min(x,y)  needs to be min(x,y) in Heyflow.
❗Calculations are only visible in live mode and the published flow.
Using variables
If you want to use prefilled content by the user to create a calculation, follow these steps:
- The information you want to add as a variable needs to be asked on a page that comes before your calculation 
- Use input fields that ask for a numeric value (you might want to consider using a mask to restrict the input to numbers only) 
- (Set the respective input field as required to make sure the formula will have the necessary values to work with) 
- Set the variable of the input field 
- When setting up your formula, type "@variable" to use the respective input field's value in the calculation 
 
💡 Multiple selection, like in multiple choice and picture choice, will result in an addition of the variables, e.g. if your options are 1,2,3,4 and the user selects option 2 & 4, in the calculation it results as a value of 6.
This does not affect the variable replacement in the text.
❗ If you're working with variables, you have to ask for all inputs previous to the calculation page. At the moment, it doesn't work on one the same page and would show an error message to the user.
Calculations in Responses & Integrations
There's one thing to do, if you want to show flow visitors the results of your formula after they submitted their contact information but also want to see them in your response dashboard. Add the formula twice, once before and once after the submit event.
Also, when adding a system label you're able to see the results in your response and map them within our native integrations, such as HubSpot, Salesforce, or Airtable.

💡 Tip: If you want to show the calculation only in your response, but not to your flow visitors, simply hide the block under appearance.
Example: Lead Scoring
You can add calculations to your flow to assign lead scores to your leads by previous inputs, even if they are not numeric, and send them to your integrations for your team to prioritize their leads better.
If you want to give a score to a not numeric input, simply add the value in the system label for each of the options. If you then use that variable, the text gets ignored in the calculation and only the numeric input will be used for the calculation.
❗ In your response, the whole system label including the numeric input will show up, though.







