Calculate prices for order forms, compute the score of a quiz, and much more with your Fillout forms. Dynamic variables let you do math and logic in your form, fully responsive to respondent input.
Create a new calculation
Open the Logic
modal in the bottom-right of your form editor.
Click Calculations
followed by + New calculation
. Here, you’ll be able to add, edit, and delete calculations in your form.
Enter the necessary details
Add your calculation by giving it a Name and Type. The name refers to how you’ll refer to it in-app, whereas the type can either be one of these:
Then, provide an Initial value for your calculation.
Every calculation has some value that it starts with, e.g. defining what a variable starts out as. Some common examples:
Define rules
Specify the rules that determine how the calculated value changes.
A rule is made up of 3 main parts:
You can drag and drop conditions using the handle on the right-hand side to reorder them. Rules will take effect in the order that they appear on this screen. For example, you can add 5, and then multiply by 2, instead of doing it vice versa.
Set the price for your Payment page
After adding a payment page, type @
or click the +
icon to reference a calculation instead of a static price for your payment page.
Now, the price will change depending on the customer’s order.
Display the calculation in your form
Anywhere in Fillout, you can type @
to reference previous answers or calculations. You can style this text by highlighting it and changing the font size, weight, or color.
Determine age, trip duration, warranty validity, and more
When making a new calculation, choose duration
as the type. Select Start and End dates in your calculation followed by the measurement for Units.
Much like how fields are pre-filled elsewhere in Fillout, you can reference calculations there as well.
Insert respondents’ prior input into fields for a personalized experience.
Set a default value based on previous inputs, URL parameters, and more.
Perform an integration only when a certain condition is met.