> This page is for Glide Classic.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://www.glideapps.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://www.glideapps.com/docs/_mcp/server.

# Distance

> Calculate the distance between two locations.

The **Distance** computed column calculates the distance between two locations.

## Adding and Configuring a Distance Column

#### Distance Column Arcade

## Creating a Distance Column

In the [Data Editor](/docs/getting-started/introduction-to-the-data-editor), open the table you want to edit.

Add a new column by clicking the plus (+) symbol to the right of the table

* New columns added with the plus button will always appear on the right of the table. If you'd like to add a column somewhere else in your data, you can select the dropdown menu on an existing column and choose **Add column right.** You can also click and drag columns to rearrange them.

Name the column.

For **Type**, search for **Distance** or navigate to **Computed → Distance**.

The **From** and **To** fields contain the locations between which you want to calculate the distance. One of the values needs to be from a column in your table. This can be an address or latitude/longitude pair. The second can be another location in your table, or the device's current location.

* When you choose **Current Location** in the To column, Glide will ask to know the user's location. This is because Glide needs the user's browser's location in order to make a calculation.
* The calculation will be specific to each device, so each user will see their own value based on their own location and distance to the address you specify.

In the **Unit** field, select whether to display the distance in kilometers or miles.

You can change the **Precision** of the calculation and only show the rounded distance, or you can show the distance with up to 4 decimal places.

The calculation of distance is in kilometers and the column defaults to showing the **Units** after the calculation, e.g. 8,469 km. You can change the units label and/or move it to before the calculation.

![Distance - Image](/docs/_fern-img/8394bd8c836547799f2a3814c26936f25bdc20202186291a876749ea56fbb1d8.webp)