Excel: Calculate Distance Between Two Addresses

Montreal Jul 09, 2026

Ever found yourself wondering, "Can Excel calculate the distance between two addresses?" The answer is yes, with a bit of creativity and the right tools. Excel, while not equipped with a built-in distance calculator, can perform this task using simple formulas and add-ons. Let's dive into how you can achieve this.

How to Calculate Driving Distance between Two Addresses in Excel
How to Calculate Driving Distance between Two Addresses in Excel

Before we proceed, ensure you have Excel installed on your computer. For this task, we'll be using Google Maps API for accurate distance calculations. Now, let's explore the methods to calculate distances between two addresses in Excel.

Split Address With Excel Formulas - Contextures Blog
Split Address With Excel Formulas - Contextures Blog

Using Google Maps API and Excel

Google Maps API provides a robust way to calculate distances between two points. To use this method, you'll need to set up a project in Google Cloud Console, enable the Distance Matrix API, and obtain an API key. Once done, follow these steps:

the format calculator dialogg in windows 7 and 8 with options to select font or number
the format calculator dialogg in windows 7 and 8 with options to select font or number

1. Install the 'Google Maps Distance Matrix' add-in for Excel. You can find it in the Microsoft Store or download it from the official GitHub repository.

2. Open the add-in, enter your API key, and click 'Connect'.

Google Maps As the Crow Flies Distance Calculator - Excel
Google Maps As the Crow Flies Distance Calculator - Excel

Calculating Distance

Now that you're connected, you can calculate distances between two addresses. Here's how:

1. In your Excel sheet, enter the addresses in two columns (e.g., A2:A3 for origins and B2:B3 for destinations).

How to Calculate Hours Between Two Times in Excel (6 Methods) - ExcelDemy
How to Calculate Hours Between Two Times in Excel (6 Methods) - ExcelDemy

2. Select the cell where you want the distance result to appear (e.g., C2).

3. Click on the 'Distance Matrix' button in the add-in's ribbon. Select the origin and destination ranges (A2:A3, B2:B3), and choose the unit of measurement (miles or kilometers).

4. Click 'Calculate' to get the distance between the two addresses.

Calculate Moving Average in Excel - How To - PakAccountants.com
Calculate Moving Average in Excel - How To - PakAccountants.com

Calculating Multiple Distances

To calculate distances between multiple addresses, follow these steps:

FREE Tutorial - Excel Data Forms Mastery!
FREE Tutorial - Excel Data Forms Mastery!
Google Image Result for https://fis.uii.ac.id/weblog/wp-content/uploads/sites/11/2021/10/Ms-Excel.jpg
Google Image Result for https://fis.uii.ac.id/weblog/wp-content/uploads/sites/11/2021/10/Ms-Excel.jpg
the microsoft excel formula and calculator app
the microsoft excel formula and calculator app
an excel spreadsheet showing the time and date for each month in one column
an excel spreadsheet showing the time and date for each month in one column
a table with numbers and symbols on it, including the number of different types of operations
a table with numbers and symbols on it, including the number of different types of operations
Useful Excel tricks
Useful Excel tricks
the value function for an error in excel and excel - click to see if it is not
the value function for an error in excel and excel - click to see if it is not
How to Use COUNTIF Formula in Excel
How to Use COUNTIF Formula in Excel
the m s excel chart sheet
the m s excel chart sheet
How to merge and combine Excel spreadsheets into one
How to merge and combine Excel spreadsheets into one
Split the difference ✂️ Now rollled out in #Excel for Office 365
Split the difference ✂️ Now rollled out in #Excel for Office 365
Automate the drag 🤖 #learnexcel
Automate the drag 🤖 #learnexcel
Reorder Point Calculator | Double Entry Bookkeeping
Reorder Point Calculator | Double Entry Bookkeeping
an excel spreadsheet with the text 5 second tip on top of it in black and white
an excel spreadsheet with the text 5 second tip on top of it in black and white
an excel chart with the order date and sales person numbers highlighted in green on it
an excel chart with the order date and sales person numbers highlighted in green on it
Separate Text And Number From Mixed Data Using Go to Special | Separate Text and Number in Excel |
Separate Text And Number From Mixed Data Using Go to Special | Separate Text and Number in Excel |
a table with numbers and symbols in the top right hand corner, which is filled with data
a table with numbers and symbols in the top right hand corner, which is filled with data
How to Stop Calculating 8 Threads in Excel (14 Effective Ways) - ExcelDemy
How to Stop Calculating 8 Threads in Excel (14 Effective Ways) - ExcelDemy
How to Use AVERAGEIFS Formula in Excel
How to Use AVERAGEIFS Formula in Excel
#Excel #Tricks: Convert Numbers to Words
#Excel #Tricks: Convert Numbers to Words

1. Enter the addresses in two columns (e.g., A2:A10 for origins and B2:B10 for destinations).

2. Select the range where you want the distance results to appear (e.g., C2:C10).

3. Click on the 'Distance Matrix' button, select the origin and destination ranges, and choose the unit of measurement.

4. Click 'Calculate' to get the distances between all the addresses in the selected ranges.

Using Excel Formulas (Manual Method)

If you prefer a manual approach, you can use Excel formulas to calculate distances between two addresses. This method requires knowledge of latitude and longitude coordinates. Here's how:

1. Obtain the latitude and longitude coordinates of the addresses using an online tool like Google Maps or a geocoding API.

2. Enter the coordinates in your Excel sheet (e.g., A2:A3 for origins and B2:B3 for destinations).

Haversine Formula

The Haversine formula is used to calculate the distance between two points on a sphere given their longitudes and latitudes. Here's how to use it in Excel:

1. In the cell where you want the distance result to appear (e.g., C2), enter the following formula:

2. `=2 * ASIN(SQRT(POW(SIN((B2 - A2) * PI() / 180 / 2), 2) + COS(A2 * PI() / 180) * COS(B2 * PI() / 180) * POW(SIN((B3 - A3) * PI() / 180 / 2), 2))) * 3959`

3. This formula calculates the distance in miles. To get the distance in kilometers, replace 3959 with 6371.

Calculating Multiple Distances (Manual Method)

To calculate distances between multiple addresses using the Haversine formula, follow these steps:

1. Enter the coordinates in two columns (e.g., A2:A10 for origins and B2:B10 for destinations).

2. In the range where you want the distance results to appear (e.g., C2:C10), enter the Haversine formula (as shown above) and drag it down to copy the formula for all the addresses.

And there you have it! You've now learned how to calculate distances between two addresses in Excel using both automated and manual methods. Happy calculating!