Getting Started with Straight Line Distance Calculator

Welcome to the Straight Line Distance Calculator! This tool calculates the as-the-crow-flies distance between pairs of locations using the haversine formula and Google's Geocoding API.

What Does This Tool Do?

The Straight Line Distance Calculator takes origin-destination address pairs and returns the direct point-to-point distance between them. Unlike driving distance, straight-line distance (also called "air miles" or "as the crow flies") measures the shortest path across Earth's surface without following roads.

For each pair, you get:

  • Straight-line distance in miles or kilometers
  • Geocoded latitude/longitude coordinates for both origin and destination
  • Formatted, standardized addresses from Google Maps
  • Status indicator showing whether the calculation succeeded

Pro Tip

You can process up to 100 address pairs in a single batch. The tool automatically deduplicates locations, so if the same address appears in multiple pairs, it only geocodes it once — saving time and API calls.

What You Can Do

Batch Processing

Calculate up to 100 origin-destination pairs at once

Haversine Formula

Mathematically precise great-circle distance calculations

Miles or Kilometers

Switch units with one click before calculating

CSV Export

Download results with coordinates for mapping and analysis

File Import

Upload CSV or Excel files with your address pairs

Saved History

Access past calculations anytime from the History section

Setting Up Your Google Maps API Key

Before you can start calculating distances, you need a Google Maps API key. This is your personal key that connects the tool to Google's Geocoding service.

Watch our step-by-step video guide: How to Get a Google Maps API Key

The setup takes about 5 minutes and includes:

  1. Creating a Google Cloud account (free)
  2. Enabling the Geocoding API
  3. Generating your API key
  4. Setting up billing (Google provides $200/month in free credits — approximately 40,000 requests)

Once you have your API key, enter it on the tool setup page. Your key is encrypted and stored securely — we never see or use it ourselves.

Quick Start Guide

1

Enter Your Address Pairs

Type or paste origin-destination pairs into the input box, one pair per line. Separate origin and destination with a tab, comma, or pipe character. You can also click Load Sample Data to see the expected format.
2

Choose Your Unit

Select Miles or Kilometers from the dropdown above the input area.
3

Click Calculate

Hit the Calculate Distances button. The tool geocodes each location and calculates the straight-line distance using the haversine formula.
4

Review and Export

View your results in the table below the input area. Click Export CSV to download all results including coordinates.

Understanding Your Results

Each result row shows the origin, destination, straight-line distance, and a status indicator. Successful calculations display the distance and geocoded coordinates. Failed calculations show an error message explaining what went wrong (e.g., an address that could not be geocoded).

Free Trial vs Paid Features

FeatureTrialPaid Subscriber
Address pairs per batch10Unlimited
Calculations per day5Unlimited
CSV ExportNoYes
Saved HistoryNoYes
File Import (CSV/Excel)NoYes

Ready to Start?

Try the Straight Line Distance Calculator — 14-day free trial, no credit card required!

Next Steps

Was this article helpful?