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.

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

## Step 1: Log in to your Formaloo dashboard

Open your dashboard, or sign up for free if you don't have an account yet.

You can either create a new form from scratch or use a pre-made template like the Job estimation form and customize it to match your needs.

## Step 2: Set up your form fields

Use the drag-and-drop interface to add the necessary fields to your form.

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

**Type of service (Dropdown)**: List options like "Repairing" and "Cleaning.", etc.**Describe your service requests**: A text field for users to provide more details.**How many hours approximately? (Number field)**: Allows users to input the estimated hours.**How many people are needed? (Number field)**: Users can enter the number of people required.**When? (Single choice)**: Options like "ASAP," "This week," "During this month," or "Later."**Total payment amount (Variable field)**: Add a variable field to store the total calculated price.

This field will hold the sum of the logic-based calculations and display the final estimated price.**Total Payable (Content field)**: This will display the final estimated price using answer piping to show the value stored in the variable field.

## 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.

**Add a Variable field**:

In the form editor, add a 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.**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.

## Step 4: Set up logic to calculate the price

**Open the logic tab**:

Navigate to the**Logic**tab to start adding conditions that will calculate the total price.**Set up logic based on job type**:**Set up logic based on hours**:**Set up logic based on the number of people**:**Set up logic based on urgency**:

## Step 5: Display the total estimated price

**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.**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.

## 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.