What it does
Calculate the great-circle distance between two coordinate pairs.
Syntax
DISTANCE(location1, location2, unit)Square brackets mark optional arguments; omit the brackets. Separate arguments with commas, quote text and use a point for decimals.
Arguments, in order
| Argument | Meaning |
|---|---|
location1 | Starting coordinate pair created with GEOLOCATION. |
location2 | Ending coordinate pair created with GEOLOCATION. |
unit | "km" for kilometres or "mi" for miles. |
Returns: Number.
Worked examples
Example 1
Formula
ROUND(DISTANCE(GEOLOCATION(0, 0), GEOLOCATION(0, 1), "km"), 3)Result
111.195Example 2
Formula
ROUND(DISTANCE(GEOLOCATION(0, 0), GEOLOCATION(0, 1), "mi"), 3)Result
69.093Quotes in the result indicate text; \n indicates a newline. Date results use ISO notation. The application may display dates and numbers differently according to the selected field type and interface language.
Behaviour and limits
Uses a spherical Earth with mean radius 6371.0088 km. This is an approximate surface distance, not a driving route. Missing coordinates return null. Invalid coordinates or units cause an error.
Use it with your fields
Replace example values with the relevant field API names when needed. A record formula uses names such as amount; a flow expression uses its context, such as $Datensatz.amount. Use your actual API names and a compatible return type. See expression basics and flows.

