Skip to main content

Video tutorial

Add a calculation

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. Enter 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
image.pngFor 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 to reference a calculation. Now, the price will change depending on the customer’s order. Screenshot of the Logic tab of a form Display dynamic calculation in your form Anywhere in Fillout, you can type @ to reference previous answers or calculations. Screenshot of the Logic tab of a form 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 data 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.