The Gravity Forms Number field supports basic calculations using values from other fields, like add, subtract, divide and multiply, but sometimes we really miss the possibility to convert a negative value to an absolute number (positive value). For example, when we want to calculate the difference between two values. Can this be solved using out of the box Gravity Forms functionality?
The answer is yes… 😉
But it is rather complex, as you need to add at least 4 extra fields with calculations and conditional logic. It is very easy however if you use our Advanced Number Field addon. Here you can just tick the ‘Force Absolute’ box, among some other great advanced number field features:

Still want to do it the hard way? Buckle up and we will walk you through it step by step.
How to calculate an absolute value in a Gravity Form
We achieve this using a combination of multiple number field, calculations and conditional logic. We will explain it with an example form where the user inputs his (or her) height in meters. Then the form calculates the difference in centimeters. We want this value to be a positive number in any case. We will build a form where you can input your own height in meters. The form then will calculate the absolute difference in centimeters of your height compared to the average woman height, using only Gravity Forms core functionality.
Step by step instruction
Open the form editor to create a new or edit an existing form. Add the following number fields:
- The first number field has a fixed value, which is the more or less average height of a woman in meters. We enable calculations and fill in 1.60.

- The second number field is a user input.

- In the third number field we calculate the difference like Average minus the user input. When your height is above 1.60 meter the result will be a negative value. As we don’t want the user to see this field we hide it in the field visibility settings.

- In the fourth field (hidden) we calculate the difference the other way around. When your height is above 1.60 meter the result will be a positive value. Now we have two fields which calculate the different. Now at least one of these contains a positive value. But how to determine which one? We need two more fields for this.

- Therefore we add another hidden number field, which copies the value of the ‘Average minus input’-field. But we also enable conditional logic for this field and show it only in case ‘Average minus input’ has a value greater than 0.

- And we add yet another hidden number field which copies the value of ‘Input minus average’ which also shows conditionally but now when ‘Input minus average’ has a value greater than 0. Because of this conditional logic the ‘Difference1’ and ‘Difference2’ field will never show at the same time. Note that ‘show’ is not the same as ‘visible’, the field is still invisible to the user as it is hidden in the field settings. In this case ‘show’ means the fields conditional logic evaluates to true and therefore the form will be able to use its value.

- In the last number field we add we will finally be able to calculate the difference as an absolute number. We do this by adding up Difference1 and Difference2. Only one of this fields is shown due to conditional logic. The other one will hold a value of 0, because it is hidden by the conditional logic. Finally we multiply it by 100 to convert centimeters to meters.

As you can see this is quite a lot of work te get an absolute number value in Gravity Forms, and you need quite a lot of fields to achieve this.
Demo form calculating the absolute number
You can try it out here. Click the button to show the fields hidden by the visibility setting. Note Difference1 and Difference2 being shown conditionally.
Read tutorials about
How to Replace Zapier with n8n (Using the GravityWP n8n Connector)
Tired of burning Zapier tasks on every Gravity Forms submission? This guide shows you how to replace Zapier with n8n using the GravityWP n8n Connector. You’ll learn how to move an existing Zap step-by-step into n8n, cut automation costs, and keep full control over where your data lives.
n8n vs Zapier: Which Automation Tool Actually Fits Your Work?
Trying to decide between n8n vs Zapier? This article breaks down pricing, hosting, integrations, AI features, and where self-hosted n8n on a cheap VPS can beat Zapier’s task-based plans. You’ll also see how Gravity Forms users can plug in the GravityWP n8n Connector and move key workflows off Zapier without rebuilding their forms.
Cloudflare Tunnel + n8n: Expose Local n8n for Webhook Testing (Dev Only)
This guide shows how to use Cloudflare Tunnel Quick Tunnels to put a local n8n instance on the internet for real webhook testing. It’s a dev-only recipe that lets tools like GravityWP’s n8n Connector call your local n8n over HTTPS, without renting a VPS or opening ports.
Self-Host n8n with Docker on a VPS
Learn how to self-host n8n with Docker on a VPS using a production-ready setup. This step-by-step guide walks you through configuring Docker Compose, Postgres, HTTPS, and WEBHOOK_URL so you can run reliable, secure n8n workflows on your own server.