We noticed that JavaScript is disabled in your browser. We suggest enabling it for a better experience.
We noticed you're using an older version of Internet Explorer. We suggest you update to the latest version for a better experience.
Skip to main content

Calculation examples

Pro, Business and Enterprise plans

If you need some examples to help you better understand calculations, we've got you covered. In this topic, we'll cover three different types of calculations.

A basic ticket price calculation

Kate is using a form to sell tickets to a street party. People can buy as many tickets as they want. She wants to use a calculation to work out how much her responders should be charged for their tickets.

  1. Kate adds a number field to her form. People will use this to enter the number of tickets they want to buy. She gives the field a default value of 1.

    Example 1.png
  2. Then she adds a calculation field to her form. This will be used to calculate the amount a responder will be charged.

  3. Kate goes to the dropdown menu in the calculation and chooses to add a Number, calculation or date field. She selects How many tickets do you want?, which is the name of her number field. She presses Insert. Her number field is added to the calculation.

    Example 2.gif
  4. Kate is selling 1 ticket for $50. Because she wants to calculate the total cost of all tickets, she should multiply the number of tickets by 50.
    She types *50 into the calculation. * is the symbol for multiplication, so she is multiplying the How many tickets do you want? field by 50.

    Example 3.png
  5. Finally, she adds a payment field to her form.
    She wants to Use a calculation field to determine how much to charge, so she selects her calculation field (calculation) from the menu.

    checkout.png
  6. Kate’s final form looks like this:

An advanced variable calculation

Sam works for the local government. He’s making a form for people in the community to register their pets, so they have a better chance of being found if they get lost. He wants to use a calculation to work out how much his responders should be charged based on the kind of pet they have.

  1. Sam adds a radio button field to his form. People will use this to select their pet type.

    example 5.png
  2. Sam adds another radio button field. People will use this to say if their pet is microchipped or not.

    Example 6.png
  3. Then he adds a calculation field to his form. This will be used to calculate the amount a responder will be charged.

  4. Sam goes to the dropdown menu in the calculation and chooses to add a VariableHe selects What kind of pet do you have?, which is the name of his first radio button field. He presses Create variable.

    calculation 2.png

  5. Sam can now configure the value for each pet type.
    He wants it to be more expensive to register dogs and reptiles, so he sets their value to 30 and the others to 20. 

    variables.png
  6. Sam’s local government has a rule that all cats must be microchipped. Because of this, Sam wants to make it more expensive to register a cat that isn’t microchipped. The extra fee will cover the cost of the microchip.
    He clicks Advanced next to the ‘Cat’ option to set a special calculation rule for cats.

    pets.png
    He chooses the Register and pay section from the Section menu, then chooses Is your pet microchipped? from the Field menu. He sets the answer to No, then presses Add. He gives his new rule a value of 30.
     no chip.png
    His new rule means that if someone has a cat and their answer to Is your pet microchipped? is no, the value will be 30.
    If they have a microchipped cat, the value will be the standard 20.
    Sam clicks Save to save his rule.
  7. Finally, he clicks Create and insert to add his custom configuration to the calculation.

    create and insert.png
  8. To finish his form, Sam adds a payment field.
    He wants to Use a calculation field to determine how much to charge, so he selects his calculation field (Payment calculation) from the menu.

    checkout 2.png
  9. Sam's final form looks like this:

A calculation using functions

Louise is running a food truck festival, and she's making an application form for vendors. If the vendors don't have their own food truck or marquee, they can hire one or both. It's expensive to hire a food truck, but not as expensive to hire a marquee. If a vendor wants to hire both, Louise only wants to charge them for the food truck.

  1. Louise adds a radio button for vendors to choose if they want to hire a food truck.
  2. She also adds a radio button for vendors to choose if they want to hire a marquee.
  3. She adds a calculation field. This will be used to calculate how much a vendor should be charged based on their responses to the previous questions.
  4. Like Sam in the previous example, Louise creates a variable for the Do you need to hire a food truck? field. She sets the 'No, I'll bring my own' value to 0 and the 'Yes' value to 700, because it will cost $700 to hire a truck.
     
    food truck 1.png
  5. She creates another variable for the Do you need to hire a marquee? field. She sets the 'No, I'll bring my own' value to 0 and the 'Yes' value to 75, because it will cost $75 to hire a marquee.
     marquee.png
  6. Louise doesn't want to add the values of both radio fields, because she doesn't want to charge someone who hires a food truck extra for a marquee. Instead, she wants to find the maximum value that the responder has selected, so they'll be charged for the food truck OR the marquee, but not both.
    She types max( , ) into the calculation, enclosing the two variables in the brackets, and separating them with the comma. The calculation will take the maximum value from the two radio button fields.
    max.png
  7. She doesn't want her calculation to appear on her published form, so she opens the calculation field settings and selects Always hide from the Display logic tab.
     hide.png
  8. Finally, she adds a payment field to her form. 

    She wants to Use a calculation field to determine how much to charge, so she selects her calculation field (Payment calculation) from the menu.

    checkout 3.png

  9. Louise's final form looks like this:

Need to know more about calculations? Visit Use calculations.

Was this helpful?