DISTANCE functions

This article explains how to use our unique DISTANCE functions in combination with the Place element

We have created powerful bespoke functions that allow you to calculate using the outputs of the Place-question. The following functions are now available:


These functions were already available in the background of our Places-question. The DISTANCE functions will give you more flexibility.


The distance function returns the distance between two coordinates (places) in a selected unit (as the crow flies). A coordinate contains the latitude & longitude, giving the DISTANCE function a total of 5 arguments:

DISTANCE(lat1, lng1, lat2, lng2, unit)
  • 'lat1': the latitude of the first place
  • 'lng1': the longitude of the first place
  • 'lat2': the latitude of the second place
  • 'lng2': the longitude of the first place
  • 'unit': The unit in which you want to express the output. Available units: "m", "ft", "km", "mi", "in" (default "m"). Make sure you include quotation marks around the unit since the function will otherwise throw an error.

You can either use raw longitude and latitude data or use the lat and long from a Place-question:

DISTANCE(51.91670188501261, 4.488032213665693, 51.89402927794878, 4.52355382345693, "mi") DISTANCE(51.91670188501261, 4.488032213665693, QA_lat, QA_lng, "mi") DISTANCE(51.91670188501261, 4.488032213665693, QA_latitude, QA_longitude, "mi")


The driving distance function has a similar syntax to the distance function. The difference between both functions is the output since the driving distance takes the road distance into account.

DRIVINGDISTANCE(lat1, lng1, lat2, lng2, unit)


The driving duration returns the duration in seconds, minutes, or hours.

DRIVINGDURATION(lat1, lng1, lat2, lng2, unit)
Where 'unit' is "s", "min", "h", (default "s").

Learn more about how Google determines the distance, driving distance, and driving duration here.

Latitude/Longitude Calculator

Use the below calculator to retrieve the latitude and longitude of your location of choice.

Related articles

Learn more about distance in one of the following articles