In a formula-type column, the DISTANCE() function displays the straight-line distance (as the crow flies, not a driving route), in meters, between two points. Ideal for routing, logistics, field operations, or mileage calculations.
Syntax
DISTANCE(Coordinate A, Coordinate B)
Prerequisites:
- Two columns of type Coordinate (for example Coordinate A and Coordinate B). You can select points on the map (long press to move them).
- One column of type Formula (for example Distance (m)).
Parameters
Examples
Measure a distance in meters
DISTANCE(Coordinate A, Coordinate B)
Get a result in kilometers
For a result in kilometers, divide by 1000:
DISTANCE(Coordinate A, Coordinate B) / 1000
→ DISTANCE() then returns a value in km (as the crow flies). Column options: Output Number, Decimals 0, Symbol km.
Return type
The function returns a number (the distance in meters, or in kilometers when divided by 1000).
The output type format of the result can be configured in the output field options of the formula editor. For more details, see Output format options in the Formula Column article.
Business use cases
DISTANCE() measures straight-line distance: proximity of a client to an agency, sorting interventions by distance, base for mileage allowance calculations.
Best practice
Obtain coordinates with GEOLOC() (from an address) or COORDINATES() (from X/Y values). The distance is as the crow flies, not driving distance.
Go further
GEOLOC()
Geolocate an address to get its coordinates.
Or continue with
Formula glossary
All available operators and functions, sorted by category.