Calculator – an overview

In this article

What is it for?

This template is for anyone who wants to create a custom calculator to solve a specific problem. It allows you to put together your own set of custom questions, collect answers and display results based on a formula.

NOTE: This is one of our premium templates and is only available to customers on our premium plans.

How to get started

    1
    Select one of our Calculator starting points
    2
    Go to the Data tab and paste, upload or link your data containing questions and answers. Each row should represent a question and each column some metadata for that question, including the question type, answer options and fallback answers.

    Available question types

    Question type Description Use Case Example
    number input Allows users to enter numeric values within a specified range. Collecting numeric data such as age, quantity, or other numerical values within a specific range. min: 0 :: max: 10 :: step: 2
    text input Allows users to enter a string of text. Collecting open-ended responses, such as names, email addresses, or comments.
    single response buttons Presents users with multiple buttons, but only one button can be active at a time. Choosing one option from a list of mutually exclusive choices, such as selecting a preferred product or a yes/no response. apples :: pears
    multi response buttons Allows users to select multiple buttons simultaneously. Choosing multiple options from a list, such as selecting multiple interests or preferences. apples :: pears
    dropdown Presents users with a list of options in a dropdown menu. Choosing one option from a list, but the list is too long for single response buttons. Examples include selecting a country, state, or product category. apples :: pears :: bananas :: raspberries :: lemons :: kumquats
    single date picker Allows users to select a single date. Collecting date information such as birth dates, event dates, or deadlines.
    multi date picker Allows users to select multiple dates. Selecting multiple dates, such as available dates for an appointment, meeting, or event.
    range date picker Allows users to select a date range. Collecting information such as a date range for a vacation, project timeline, or any other time period.
    rating Icon-based input that requires numeric input. Users can assign a rating value, and labels can be added above or below the rating icon. Gathering feedback on satisfaction, product quality, or any other topic that requires a rating scale. 1 >> Bad :: 2 :: 3 >> Great
    single slider Requires numeric input and typically has options for minimum, maximum, step between values, prefix and suffix. Collecting information such as price preferences, age preferences, or any other type of preference that requires numeric input. min: 0 :: max: 100 :: step: 1 :: value: 20 :: prefix: $ :: suffix: USD
    range slider Allows users to select a range of numeric values. Collecting information such as price ranges, age ranges, or any other type of range that requires numeric input. min: 0 :: max: 100 :: step: 1 :: value: 20,80 :: prefix: $ :: suffix: USD
    3
    Bind your columns. Note that some question types require Answer options while others don't.

    TIP: If you're missing any column bindings or have included something of the wrong format, a small exclamation mark should display in the top right corner of your editor.

    4

    Variables and formulas

    In the Result section of the settings panel, define variables and formulas in order to calculate the results. You can then compose the results with (or without) any variables. Variable values can be:
    • Numbers
    • Text (in 'single quotes' if they have spaces)
    • References to the question responses in the format q_2 with the number representing the row number of the question in the Questions datasheet

      TIP: Keep in mind that because the question number represents the row number of the questions, your first quesiton will always be q_2, not q_1.

    • Previously defined variables (need to be wrapped into square [brackets]). Here's an example:

      interest_rate = q_4 / 100
      monthly_interest_rate = [interest_rate] / 12
      			
    • Excel functions for a wide range of calculations (see this list for all available functions)

      Warning: IFS formulas are not currently supported, we suggest using nested IF statements.

      TIP: If you're working with small values and percentages, for example in a mortgage calculator, you might need to adjust the number formatting to have at least 5 decimal places for the calculator to work. If this is not done, the calculator might rounds things to zero, leading to everything becoming zero.

    6

    Building your result view

    The final result view can be composed in the Results field with any previously defined variable or any question variable (starting with "q_") by referencing them in double curly braces ( {{}}).

    It's best to not use the q_<number> syntax with your self-created variables, as these variables are already in use for the raw answers.

    Retrieving multiple answer questions

    To retrieve multiple answer questions for use in formulas, you can use the SUBSTITUTE function. For example, if you have the question "Which of the following languages do you speak?", the answers might be "Arabic, English, Mandarin". The direct output when selecting Arabic and English will look like this: Arabic :: English. You might want to replace all double colons with whatever separator you prefer (commas in the following example): amended_result = SUBSTITUTE(q_2, " ::", ","). This will display the answer as English, Sign.

    You can also access the responses from multiple answer questions in multi-response buttons individually by using the notation q_2_0, q_2_1, q_2_2 etc., with the first number representing the question index and the second number representing the implicit answer index. It's implicit as it just depends on the order in the dataset (the first answer would be 0, the second 1, etc.). If the answer option is selected, the variable value represents the option, if it is not selected the value is set to "false".

    Finally, if you're after the number of selected options, you can retrieve that with the notation q_2_selected.

    The multi date picker results also get separated by :: (for example 2000-01-01 :: 2000-01-10 :: 2000-01-20) while the range date picker and the range slider results use the double dash -- as a separator of their start and end values (2000-01-01 -- 2000-01-10 or 10 -- 20).

    5
    Customize the look-and feel of your calculator in the settings. You can customize everything from the calculator layout to the colors. Here's an overview of all the available settings:
    6

    Saving your results to a Google Sheet

    While the calculator template doesn't store results by default, it is possible to link it up to a Google Sheet or any other source so you can collect the responses of participants. This is useful if you would like to keep a record of people's selections or further utilize them in a different visualization. Learn more about linking your calculator visualization to a Google Sheet in our help doc.