Video tutorial
How it works
Calculations in Fillout forms lets you compute values and respondent input, and display them. They are built using step-by-step rules rather than a single formula. Each rule performs one operation, and the result is passed to the next rule in sequence. For example, instead of writing “A + B x C” in one line, you would break it down into separate rules:- Rule 1: Start with A (initial value = @FieldA) and Add @FieldB
- Rule 2: Take the total from Rule 1 and multiply by @FieldC
- Values are shown up to 2 decimal places
- Trailing zeros are not displayed (e.g.
10.2not10.20) - No currency symbols or thousands separators are added
- Rounding to whole numbers isn’t supported directly in the form
Add a calculation
By opening the Logic modal, you can create calculations to compute values dynamically based on static values or previous respondent input.Open Logic
Click the 
In the popup, click 
Enter a Name or label and choose the Type, which can be:
Logic modal in the bottom-right of your form editor.
Calculations on top followed by + Add new calculation.
- Number - for numerical results like price or score
- Text - for dynamic text based on responses
- Duration - for intervals between dates, like age or term
number type.Enter initial value
Type the value you’d like to start with. Some common examples:
- 0 - to add to a price variable as options are selected
- 100 - to deduct points from a quiz
- Any arbitrary text - for a text calculation, or leave empty

Define rules
Click 
In our example, we’ll choose the “Appetizer” field. The calculation will start when “Mozarella sticks” is selected. Since we want customers to be able to add other appetizers if they prefer, we’ll choose “has any” as the qualifier.
Our operation will be “multiplying” the quantity (initial value) by the price of the dish (operation value), which is “$6”.
+ New rule to determine how the initial value will change. A rule is made up of 3 main parts:- Condition - a parameter, than when true, performs the calculation (e.g. add x amount when a respondents selects “yes” to a previous question)
- Operation - what to do to the calculation (e.g. add, subtract, multiply, divide)
- Operation value - the value used with the operation (e.g. add x amount to your initial value)
Set conditional logic followed by + Add condition. Select the question or field on the left, qualifier in the middle, and choice on the right.

Test your calculation
Exit Logic and click
Preview on the upper right corner to check that it works as intended.Dynamic calculation
Make the price dynamic After adding a payment page, type @ or click and click to reference a calculation. Now, the price will change depending on the customer’s order.

Compute duration
Determine age, trip duration, warranty validity, and more with aduration calculation. Simply enter a date range.

Pre-fill fields with a calculation
Much like how fields are pre-filled elsewhere in Fillout, you can reference calculations there as well.Related articles
Answer piping
Insert previous answers into upcoming questions or fields.
Pre-fill fields
Pre-populate fields based on previous inputs and more.
Integration logic
Perform an integration only when a certain condition is met.