# Distance

The **Distance** function calculates the minimum distance between two geographies, in specified units.

### Syntax

```
Distance(units, geog1, geog2)
```

The function arguments are:

<table><thead><tr><th width="258"></th><th></th></tr></thead><tbody><tr><td>units</td><td><p><br>Required </p><p>The unit of measurement for the distanceValid values are <code>"kilometers"</code>, <code>"meters"</code>, and <code>"miles"</code>.</p></td></tr><tr><td>geog1</td><td>Required<br>First geography of the pair between which we calculate the distance<br>Must be in valid Geography format.<br>To work from known latitude and longitude values, use the <a data-mention href="makepoint">makepoint</a> or <a data-mention href="makeline">makeline</a> functions.</td></tr><tr><td>geog2</td><td>Required<br>Second geography of the pair between which we calculate the distance<br>Must be in valid Geography format.<br>To work from known latitude and longitude values, use the MakePoint or MakeLine functions.</td></tr></tbody></table>

### Examples

```
Distance("kilometers", [Coordinates], MakePoint(0, 0))
```

```
Distance("miles", [Coordinates], MakePoint(0, 0))
```

The **Distance** function returns the following values for the **Coordinates** column, when specifying distance in either kilometers or miles from coordinates (0, 0):

<figure><img src="https://files.readme.io/19770ed-function-distance-example.png" alt=""><figcaption></figcaption></figure>
