Blog

How to Calculate Driving Distance Between Airtable Records

FE
Filla EditorialintermediateMar 19, 2026

How to Calculate Driving Distance Between Airtable Records

If your Airtable base tracks locations -- customer sites, delivery addresses, job sites, warehouse locations, real estate listings -- you eventually need to know how far apart they are. Not the straight-line distance that looks reasonable on a map, but the actual driving distance and travel time that account for roads, highways, and real-world routing.

Airtable has no distance calculation capability. You can store addresses and coordinates in fields, but there is no formula, function, or built-in tool that computes the distance between two locations. Teams typically resort to:

  • Manually looking up routes in Google Maps for each record pair
  • Building Zapier automations that call the Google Distance Matrix API
  • Writing custom scripts that process records one at a time through external APIs
  • Estimating distances from coordinates using spreadsheet math (which only gives straight-line distance)

Filla's Distance Calculator connects directly to your Airtable table and computes distance and travel time between two locations for every record -- using either straight-line (Haversine) calculation or real driving/walking/bicycling/transit routes through Google Maps.

Need distances between Airtable records Filla's Distance Calculator computes driving distance and travel time between locations in bulk

Start free

When distance calculations matter

Field service and technician dispatch. Each work order has a customer address and a technician's current location. Knowing the driving distance and time helps dispatchers assign the nearest available technician and estimate arrival times.

Delivery routing. E-commerce and logistics teams need to know the distance from their warehouse to each delivery address for shipping cost estimation, zone pricing, and delivery time commitments.

Real estate and property management. Calculating distances from properties to schools, transit stations, city centers, or other amenities adds valuable context to listings stored in Airtable.

Nonprofit service delivery. Organizations that serve geographic areas need to measure distances between service points and beneficiary locations for route planning and coverage analysis.

Sales territory planning. Understanding the driving distance between prospects and sales offices helps assign territories and estimate travel costs for field sales teams.

Event planning. Calculating distances from attendee locations to the venue helps estimate travel logistics and identify attendees who might need accommodation.


Five calculation methods

Filla's Distance Calculator offers five methods, each suited to different needs:

| Method | What it calculates | Best for | |---|---|---|---| | Straight-line (Haversine) | Direct distance between two points | No (with coordinates) | Quick estimates, aerial distance, no routing needed | | Driving (Google Maps) | Road distance + driving time | Yes* | Delivery, field service, sales territory | | Walking (Google Maps) | Pedestrian distance + walking time | Yes* | Urban planning, walkability analysis | | Bicycling (Google Maps) | Bike-friendly route distance + cycling time | Yes* | Bike courier operations, campus logistics | | Transit (Google Maps) | Public transit distance + transit time | Yes* | Urban service planning, commute analysis |

All methods are included on every Filla plan. No API key required.

The Haversine method calculates the mathematical great-circle distance between two coordinate points. It is fast, free, and requires no API calls -- but it gives straight-line distance only, which can differ significantly from actual road distance, especially in areas with mountains, rivers, or sparse road networks.

The Google Maps methods provide real routing distances that account for the actual road network, one-way streets, highway availability, and typical traffic patterns (for driving estimates).


Step-by-step: Calculate distances in Airtable

Step 1: Prepare your location data

Your Airtable table needs two locations per record -- an origin and a destination. These can be stored as:

  • Text addresses: "350 Fifth Avenue, New York, NY" -- requires Google Maps for geocoding and routing.
  • Latitude/longitude coordinates: Stored in separate Number fields -- can use Haversine (no API needed) or Google Maps methods.

If your table has addresses but not coordinates, consider running Filla's Geocoder first to convert addresses to coordinates. This gives you the flexibility to use Haversine for quick estimates and Google Maps for precise routing.

You also need output fields:

  • A Number field for distance (e.g., "Distance (km)" or "Distance (mi)")
  • A Number field for travel duration in minutes (only needed for Google Maps methods, not Haversine)

Step 2: Create a Distance Calculator tool in Filla

In your Filla workspace, open the base containing your location data. Create a new processor tool and select Distance Calculator. Name it descriptively -- "Delivery Distance Calculator" or "Technician Drive Times."

Step 3: Choose the calculation method

Select the method that matches your use case:

  • Choose Straight-line (Haversine) for quick, free distance estimates without travel time.
  • Choose Driving (Google Maps) for accurate road distances with drive times -- the most common choice for logistics and field service.
  • Choose Walking, Bicycling, or Transit for their respective route types.

Step 4: Configure location inputs

Choose the input mode: text addresses or lat/lng coordinates.

For text addresses, map:

  • Origin Address Field: The text field containing the starting location.
  • Destination Address Field: The text field containing the ending location.

For coordinates, map:

  • Origin Latitude and Origin Longitude: Number fields for the starting point.
  • Destination Latitude and Destination Longitude: Number fields for the ending point.

Step 5: Configure output fields

Map the Distance Output Field to the Number field where the calculated distance will be stored.

Choose the Distance Unit: Kilometers or Miles.

If using a Google Maps method, map the Duration Output Field to the Number field where travel time (in minutes) will be stored. This field is not needed for Haversine calculations.

Step 6: Configure API settings (if needed)

If using Google Maps methods:

  • All distance calculations are included on every plan.

No API key is needed for any calculation method.

Step 7: Preview results

Filla provides an interactive preview showing distance calculations for a sample of your records. This lets you verify that locations are resolving correctly and distances look reasonable before processing the full table.

Step 8: Run the calculator

Click Run to start processing. The tool calculates distance (and optionally duration) for each record, writing results to the output fields. Real-time progress tracking shows processing status.


Choosing the right method

When to use Haversine (straight-line)

  • You need a quick distance estimate and exact road distance is not critical
  • Your locations are in areas with dense, direct road networks where straight-line and road distance are similar
  • You are working with coordinates and want to avoid API costs
  • You are sorting or filtering records by rough proximity (nearest records to a point)

When to use Google Maps Driving

  • Accurate road distances matter for cost calculation, pricing, or SLA compliance
  • Travel time is as important as distance (dispatch, scheduling, delivery estimates)
  • Your locations are in areas where road distance differs significantly from straight-line (mountains, rivers, islands, rural areas)
  • You need the result to match what a driver would actually experience

When to use Walking, Bicycling, or Transit

  • Your workflow specifically involves pedestrian, cyclist, or public transit movement
  • Urban planning or accessibility analysis requires mode-specific distances
  • Commute analysis for employees or attendees

Practical workflow combinations

Geocode then calculate

If your table has addresses but not coordinates, chain two Filla tools:

  1. Run the Geocoder to convert addresses to lat/lng coordinates.
  2. Run the Distance Calculator using the coordinates as input.

This approach lets you use Haversine for free distance estimates, and you have the option to run Google Maps routing later for records that need precise distances.

Fixed origin for all records

A common scenario: calculate the distance from one fixed location (your warehouse, office, or store) to every record in a table. Set the origin to a formula field that returns your fixed address or coordinates for every record. The destination is each record's unique location.

Round-trip estimates

The Distance Calculator computes one-way distance. For round-trip estimates, create a formula field that doubles the distance output: {Distance (km)} * 2. For road distances, note that the return route may differ slightly from the outbound route, so doubling is an approximation.


FAQ

What is the difference between Haversine distance and driving distance?

Haversine distance is the straight-line (as-the-crow-flies) distance between two points on Earth. Driving distance follows the actual road network, which is almost always longer due to road curves, detours, and routing constraints. In urban areas with grid road systems, the difference might be 20-40%. In rural or mountainous areas, driving distance can be 2-3 times the straight-line distance.

Does the driving time account for traffic?

Google Maps driving time estimates are based on typical traffic patterns for the time of day and day of week, not live traffic conditions. They represent a reasonable estimate of expected travel time but may differ from real-time conditions.

Can I calculate distance from one record to many records?

The Distance Calculator processes each record independently, calculating the distance between that record's origin and destination. For one-to-many scenarios (one warehouse to many customers), set the origin to a fixed value (via a formula field) and the destination to each record's address or coordinates.

What counts toward the 100-record API limit?

Each record that is processed (not skipped) and requires a Google Maps API call counts toward the limit. Haversine calculations with coordinate inputs do not require API calls and are not limited. Records skipped due to empty fields do not count.

Can I calculate distances between records in different tables?

The Distance Calculator operates on a single table. Both origin and destination must be fields in the same table. If your locations are spread across two tables (e.g., a Warehouses table and a Customers table), you would need to create a combined table or use lookups to bring both locations into the same table.


Distance and duration, directly in Airtable

Location data becomes actionable when you can measure the distance between points. Filla's Distance Calculator brings this capability directly to Airtable -- from free Haversine estimates to precise Google Maps routing with travel times.

Try the Distance Calculator → or explore all of Filla's Airtable processor tools.

Ready to build smarter Airtable workflows? Start with Filla's form builder -- forms, processor tools, and document generation, all Airtable-native.