AI Agents
How do Calculations work?
Updated October 7, 2026
Calculations let an AI Answer node collect required values from a customer, apply a formula you configure, and return the result inside the conversation.
This is useful when your business already has a clear mathematical rule for producing a result.
Common examples include:
- Price estimates
- Insurance estimates
- Service quotes
- Fees
- Quantity calculations
- Financing examples
- Shipping estimates
- Project estimates
- Other formula-based results
The AI agent handles the conversation, while the configured calculation determines the numerical result.
How Calculations work
A calculation usually has three parts:
- Variables the formula needs
- A formula that uses those variables
- A result returned to the customer
For example, a simple service estimate might depend on:
- Number of hours
- Hourly rate
- Service fee
A formula could be:
(hours × hourly_rate) + service_fee
The AI agent can collect the required values from the customer and use the configured formula to calculate the result.
Calculations run inside AI Answer
Calculations are a skill inside the AI Answer node.
You do not need a separate Calculation node in the workflow.
When Calculations are enabled and configured, AI Answer can recognize when a calculation is needed and use the appropriate formula during the conversation.
For example:
Start → AI Answer with Calculations enabled
The same AI Answer node can also answer normal questions before or after the calculation.
Variables
A variable represents a value used by the formula.
Examples include:
- Age
- Distance
- Quantity
- Number of nights
- Property size
- Engine power
- Base price
- Discount percentage
- Number of people
- Service type
Each variable should represent one clear value.
The AI agent needs the required variable values before the formula can produce a reliable result.
Example: service estimate
A cleaning company calculates an estimate using:
- Property size
- Price per square foot
- Additional service fee
The formula could be:
(property_size × price_per_sq_ft) + additional_fee
A customer asks:
“How much would it cost to clean a 2,000 sq ft property?”
If the AI agent already knows the configured price per square foot and additional fee, it only needs the property size from the customer.
Once the required values are available, it can run the calculation and return the result.
What happens when information is missing?
If a required value is missing, the AI agent should collect that information before running the calculation.
For example, if the formula requires:
- Vehicle engine power
- Location
- Bonus or malus factor
and the customer only provides the engine power, the AI agent still needs the remaining required values.
Instead of guessing, it can ask the customer for the missing information.
Example
Customer:
“Can you estimate my insurance premium?”
AI Agent:
“Sure. What is your vehicle's engine power in kW?”
The agent can continue collecting the values required by the formula until the calculation can be completed.
Use exact values when the formula depends on exact inputs
If your formula depends on specific values, do not replace missing information with assumptions unless that behavior is intentionally defined in your calculation setup.
For example, if a price changes based on engine power, age, location, or product quantity, the correct input should be collected before calculating the result.
This is especially important when a formula uses:
- Percentage factors
- Lookup values
- Multipliers
- Thresholds
- Different rates for different categories
A calculation is only as reliable as the values provided to it.
Formula inputs can come from the conversation
The AI agent can use information already provided by the customer during the conversation when it matches a required variable.
For example, a customer says:
“I need a quote for 150 guests at our venue.”
If the calculation requires the number of guests, the agent may already have that value and should not need to ask for it again.
This keeps the conversation shorter and more natural.
Formula inputs can be collected before the calculation
A calculation can also use values collected earlier in the workflow.
For example:
AI Form → AI Answer with Calculations enabled
The AI Form could collect:
- Property size
- Service type
- Location
The AI Answer node can then use those values when the customer asks for an estimate.
This is useful when several pieces of structured information are required before the calculation.
Use AI Form or Question when you need controlled input collection
Calculations can work conversationally inside AI Answer, but some workflows benefit from more structured collection.
Use Question when you need one specific value.
Use AI Form when you need several values collected in a defined sequence.
For example:
Question
- Ask for engine power in kW
AI Form
- Ask for engine power
- Ask for location
- Ask for bonus or malus
- Ask whether the vehicle is used as a taxi or rental car
The collected values can then be used later in the workflow.
Example: insurance estimate
An insurance estimate might use a formula based on:
- Base amount
- Location factor
- Engine power factor
- Bonus or malus factor
- Vehicle-use factor
A simplified formula could look like:
base × location_factor × power_factor × bonus_malus_factor × use_factor
The AI agent collects the values required by the formula and returns the calculated estimate.
If the result is only an estimate, the AI agent should make that clear in the response.
For example:
“The estimated premium is 412.50. Your final premium may vary after review by an agent.”
The exact wording should match your business process and instructions.
Example: hotel stay estimate
A hotel or property business might calculate:
number_of_nights × nightly_rate
Additional variables could include:
- Number of guests
- Cleaning fee
- Service fee
- Taxes
- Extra-bed fee
The AI agent can collect the missing information and return an estimate once all required values are available.
Example: project estimate
A service business might use:
estimated_hours × hourly_rate
The calculation can become more detailed by adding variables such as:
- Materials
- Travel fee
- Minimum service charge
- Discount
- Additional labor
The formula should reflect the business rule you already use outside AskHandle.
Calculations vs. AI-generated estimates
Use Calculations when the result should follow a defined formula.
Do not rely on the AI to invent or approximate a numerical result when your business has an exact calculation method.
For example:
Use Calculations for:
quantity × pricebase × factor- Percentage-based fees
- Fixed mathematical rules
Use normal AI Answer reasoning for:
- Explaining what affects a price
- Describing service options
- Helping the customer understand the estimate
- Asking follow-up questions
The formula produces the number.
AI Answer handles the conversation around it.
Calculations vs. Data Search
Calculations and Data Search can also solve different parts of the same workflow.
Use Data Search when the AI agent needs to retrieve an exact value from structured data.
Use Calculations when the agent needs to apply a mathematical formula.
Example
A spreadsheet contains a different rate for each vehicle engine power.
Data Search can retrieve the correct factor.
Calculations can then use that factor in the premium formula.
This is useful when part of the calculation depends on values stored in a table rather than values entered directly into the formula.
Calculations vs. Live Web Search
Use Calculations for your own defined mathematical rules.
Use Live Web Search when the agent needs current public information from the web.
For example:
- Your internal service-fee formula → Calculations
- Today's public exchange rate → Live Web Search
If a calculation depends on changing external information, make sure the source and calculation behavior are clearly defined and tested.
Keep the formula deterministic
A calculation should produce the same result when given the same inputs.
Avoid putting business judgment into the formula when that judgment cannot be represented consistently.
For example, a formula can calculate:
base_price × quantity
It should not be expected to decide:
“How difficult does this project feel?”
If human judgment is required, collect the relevant information and use Human Handoff where appropriate.
Tell the customer when a result is an estimate
If the calculation is not the final legally binding or confirmed amount, make that clear.
Examples include:
- Insurance estimates
- Project quotes
- Financing examples
- Shipping estimates
- Preliminary service pricing
You can define this behavior in the AI Answer instructions.
For example:
“Always explain that calculated premiums are estimates and that the final premium will be confirmed by an agent.”
This helps keep the result aligned with your actual business process.
Test normal and edge cases
Before publishing an AI agent that uses Calculations, test more than one example.
Check:
- A normal calculation
- Minimum values
- Maximum expected values
- Decimal values
- Missing required information
- Invalid input
- Unexpected text instead of a number
- Different categories or factors
- A customer changing an answer
- Repeating the same calculation with the same inputs
Confirm that the result matches the formula you use outside AskHandle.
Test missing information
Try starting the calculation without providing all required values.
The AI agent should ask for the missing information rather than guessing.
For example:
Customer:
“Calculate my premium.”
If engine power is required but has not been provided, the AI agent should request it before calculating.
Test invalid information
Customers may enter information in different formats.
For example:
- “150 kW”
- “150”
- “around 150”
- “I don't know”
- “one hundred fifty”
Make sure the workflow handles realistic customer responses appropriately.
If a value must be exact, configure the surrounding workflow so the agent does not silently substitute an unsupported value.
Use clear variable names
Keep variable names simple and specific.
Good examples:
engine_power_kwnumber_of_nightshourly_ratelocation_factorservice_fee
Avoid vague variable names such as:
value1factor2numberinput
Clear names make formulas easier to review and maintain.
Keep formulas as simple as possible
If a calculation can be represented with a straightforward formula, keep it straightforward.
Complexity should come from the actual business rule, not from unnecessary configuration.
When a formula becomes difficult to understand, break down the logic and confirm each input and factor separately before publishing.
Tips for using Calculations
- Use Calculations when your business already has a defined formula.
- Give each variable one clear purpose.
- Collect all required values before running the formula.
- Do not guess missing values unless that behavior is intentionally configured.
- Use Question or AI Form when inputs need more structured collection.
- Use Data Search when a required factor comes from a structured table.
- Make estimates clearly identifiable as estimates when appropriate.
- Test the formula with known examples before publishing.
- Test missing, invalid, minimum, and maximum values.
- Keep your calculation logic aligned with the process your team uses outside AskHandle.
Related guides
For more information, see:
- What are AI Answer skills?
- How to use the AI Answer node
- Which AskHandle node should I use?
- What is a Data Search node?
- What is an AI Form node?
- What are Message and Question nodes?