> ## Documentation Index
> Fetch the complete documentation index at: https://filla.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Distance Calculator

> Calculate distances and travel times between two locations using Haversine or Google Maps.

## What this tool does

The Distance Calculator computes the distance between two locations for each record in your Airtable table. It writes the distance (and optionally travel time) back to Airtable fields. Use it for route optimization, territory analysis, delivery cost estimation, or filtering records by proximity.

## Settings reference

### Source

| Setting                | Description                                                                                                       |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------- |
| **Source table**       | The table with records to calculate distances for.                                                                |
| **Calculation method** | Straight-line (Haversine), Driving, Walking, Bicycling, or Transit. Google Maps methods also provide travel time. |

### Location input

| Setting                              | Description                                                          |
| ------------------------------------ | -------------------------------------------------------------------- |
| **Input mode**                       | Text addresses or Lat/Lng coordinates.                               |
| **Origin address field**             | A text or Formula field with the origin address. (Address mode)      |
| **Origin latitude / longitude**      | Number fields with origin coordinates. (Coordinate mode)             |
| **Destination address field**        | A text or Formula field with the destination address. (Address mode) |
| **Destination latitude / longitude** | Number fields with destination coordinates. (Coordinate mode)        |

### Output

| Setting                   | Description                                                                        |
| ------------------------- | ---------------------------------------------------------------------------------- |
| **Distance output field** | A Number field for the calculated distance.                                        |
| **Distance unit**         | Kilometers or Miles.                                                               |
| **Duration output field** | A Number field for travel time in minutes. Only available for Google Maps methods. |

### API configuration

| Setting                              | Description                                                                                         |
| ------------------------------------ | --------------------------------------------------------------------------------------------------- |
| **Use your own Google Maps API key** | Without your own key, limited to 100 API calls per run. Hidden if using Haversine with coordinates. |
| **Google Maps API key**              | Your API key. Only shown when using your own key.                                                   |

## Calculation methods

| Method                        | What it calculates                        | Travel time | API key needed            |
| ----------------------------- | ----------------------------------------- | ----------- | ------------------------- |
| **Straight-line (Haversine)** | Straight-line distance between two points | No          | No (coordinates mode)     |
| **Driving**                   | Road distance and driving time            | Yes         | Yes (or 100-record limit) |
| **Walking**                   | Walking distance and time                 | Yes         | Yes (or 100-record limit) |
| **Bicycling**                 | Cycling distance and time                 | Yes         | Yes (or 100-record limit) |
| **Transit**                   | Public transit distance and time          | Yes         | Yes (or 100-record limit) |

## Using the preview

The Distance Calculator has a preview panel that shows a sample of records with the computed distances. Use it to verify your configuration before running on the full table.

## Common questions

<AccordionGroup>
  <Accordion title="When should I use Haversine vs Google Maps?">
    Use **Haversine** when you only need straight-line distance and don't need travel time. It is fast, accurate for geographic distance, and doesn't require an API key when using coordinates. Use **Google Maps** methods when you need real road-based distances or travel durations.
  </Accordion>

  <Accordion title="Can I use addresses without pre-geocoding them?">
    Yes. When Input mode is set to Text addresses and you choose a Google Maps method, the tool geocodes the addresses internally as part of the distance calculation. You don't need to run the Geocoder first.
  </Accordion>

  <Accordion title="What unit is travel time stored in?">
    Travel time is stored in minutes as a number. Use an Airtable formula field to convert to hours or display in a friendlier format.
  </Accordion>
</AccordionGroup>
