Skip to main content

How to calculate an estimated quote price with variables and logic

Build a dynamic quote form where the total estimated price is calculated in real-time using logic based on user responses.

Updated this week

In this tutorial, you will learn how to create a job estimation form with logic to calculate the total estimated price based on user inputs.

The form includes variables for job type, hours, number of people needed, and urgency, and each of these fields contributes to the final cost calculation.

💡 Pro Tip: If your form is connected to an online payment method like Stripe or PayPal, make sure to use the default price variable for price calculations.

This variable is automatically available and usable in logic when you have a product field or have enabled payment settings with a selected payment method.

For forms without online payment integration, feel free to use custom variable fields for your price calculations.

Follow this step-by-step guide about creating an estimate form with price calculation:

Step 1: Log in to your Formaloo dashboard

  • Create your form either by clicking + New → Form to start from scratch, or use the Job estimation form template from the gallery and customize it to match your needs.

Step 2: Add and Customize Your Fields

With Formaloo’s intuitive drag-and-drop builder, you can quickly add all the fields you need for your estimation form.

In this example, we'll include fields such as:

  • Type of Service (Dropdown):
    Let users pick the service they need (e.g., “Repairing,” “Cleaning,” etc.).

  • Describe Your Service Requests (Text Field):
    Add a long or short text field for users to explain special needs or specific details.

  • Estimated Hours (Number Field):
    Collect an estimated number of hours needed for the job.
    Tip: You can set minimum/maximum values if typical jobs have expected timeframes.

  • People Required (Number Field):
    Enable users to enter how many people are needed to complete the job.

  • When? (Single Choice):
    Let users indicate urgency with options like “ASAP,” “This week,” “This month,” or “Later.”
    Tip: You can use logic later to adjust pricing based on urgency.

  • Total Payable (Content Field):
    Use a content block to display the total payment due. Pulling in the calculated amount from the variable field using answer piping (e.g., “Your total is: {{total}}”).
    Tip: Place this field at the end of your form to give users clear, instant feedback before submission.

Step 3: Add a variable field for the total payment amount

This variable field acts as a container that holds the total estimated price as it is calculated in real-time.

By assigning it an ID, you ensure that all logic calculations (such as adding or subtracting values based on the user's selections) update this field.

This way, when the form reaches the final step or displays the total price, the field will show the correct amount, making the estimation process seamless and dynamic.

  1. Add a Variable field:
    In the form editor, add a integer variable field that will store the total payment amount.
    Name this field something like "Total Payment Amount" to make it clear that this is where the final price will be calculated and stored.

  1. Assign an ID to the field:
    Give this field an ID (e.g., "total") so that you can reference it easily when applying logic.
    The ID allows the system to know where to store the calculated values based on the conditions you will set in the logic.

💡Tip:

To avoid unexpected values, make sure to initialize your variable by setting its default value to 0. This ensures the total score is calculated correctly, even if some questions are left unanswered.

📝 Additional insights:

You can edit a variable field’s name or ID anytime by clicking on the field in the right sidebar. If you update the ID, make sure to update it everywhere you’ve used it.

This ID can be used for answer piping, which lets you display the value of that variable inside messages, success pages, emails, PDFs and more.

Step 4: Set up logic to calculate the price

  1. Open Settings → Advanced Logic, then use the Field tab.

  2. Set up logic based on job type:

    • Add a condition:
      If the Type of Service is "Repairing," then add $20 to the Total payment amount.

    • Add another condition:
      If the Type of Service is "Cleaning," then add $15 to the Total payment amount.
      Repeat for each service you offer..

  3. Set up logic based on hours:

    • Add a condition:

      If Hours is greater than 10 → Add 30 to Total Payment Amount

    • If Hours is less than or equal to 10 AND greater than 5 → Add 20 to Total Payment Amount

    • If Hours is less than or equal to 5 → Add 10 to Total Payment Amount

  4. Set up logic based on the number of people:

    • Add a condition:

    • If People is greater than 5 → Add 50 to otal Payment Amount

    • If People is less than or equal to 5 → Add 20 to total Payment Amount

  5. Set up logic based on urgency:

    • Add a condition:
      If When? is "ASAP," add $25 to the Total payment amount.
      If When? is "This week", add 5 to the Total payment amount.

Step 5: Display the total estimated price

  1. Create a content field to display the total price:
    Add a Content field at the end or the beginning of the form where the total price will be displayed.

  2. Use answer piping to show the price:
    In the description of the section field, use the answer piping feature by inserting {{total}} or @total.
    This will automatically display the calculated price based on the logic you've set.

📝 Additional insights:

  1. How to add a currency to the product field: Learn how to add a currency to the product field in your form settings and enable payment features.

  2. How to create a new payment method: Connect your payment gateways to Formaloo by creating a payment method in profile settings and enabling payments in your form settings.

Final step: Preview and test your form

Once you've added all the logic and connected the payment gateway, preview your form to ensure everything works as expected.

The form will now automatically calculate the total estimated price based on user inputs and allow clients to proceed to payment if needed.

Did this answer your question?