Skip to main content

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
Each step is processed in order, which ensures the final result is calculated correctly. When the result is shown in the form, it follows a fixed display format:
  • Values are shown up to 2 decimal places
  • Trailing zeros are not displayed (e.g. 10.2 not 10.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.
1

Open Logic

Click the Logic modal in the bottom-right of your form editor.Screenshot 2025-11-25 at 6.32.40 PM.pngIn the popup, click Calculations on top followed by + Add new calculation.Screenshot 2026 04 13 At 5 09 06 PMEnter a Name or label and choose the Type, which can be:
  • Number - for numerical results like price or score
  • Text - for dynamic text based on responses
  • Duration - for intervals between dates, like age or term
For example, let’s compute the price for multiple orders of our mozarella sticks dish. This would use the number type.
2

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
In our example, we’ll start with the quantity. Let’s reference this by clicking and selecting the field.Screenshot 2025-11-25 at 6.45.52 PM.png
3

Define rules

Click + 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)
First, click Set conditional logic followed by + Add condition. Select the question or field on the left, qualifier in the middle, and choice on the right.Screenshot 2025-11-25 at 7.17.23 PM.pngIn 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.Screenshot 2025-11-25 at 7.40.27 PM.pngOur operation will be “multiplying” the quantity (initial value) by the price of the dish (operation value), which is “$6”.
Rules are applied in the order they appear. For example, the first rule adds 5, the second multiplies by 2. To change the order, just drag and drop.
4

Test your calculation

Exit Logic and click Preview on the upper right corner to check that it works as intended.
5

Publish and share

Once everything’s set, Publish and share or embed your form.

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. Screenshot 2026 04 13 At 5 31 41 PM Display dynamic calculation in your form On a heading or paragraph field, you can type @ and click to reference previous answers or calculations. Screenshot 2026 04 13 At 5 31 50 PM You can style this text by highlighting it and changing the font size, weight, or color.

Compute duration

Determine age, trip duration, warranty validity, and more with a duration calculation. Simply enter a date range. Screenshot of the Logic tab of a form

Pre-fill fields with a calculation

Much like how fields are pre-filled elsewhere in Fillout, you can reference calculations there as well.

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.