This guide walks you through how to calculate the distance between two points in a spreadsheet using the haversine distance formula, which is also called straight-line or as-the-crow-flies distance. (It is not driving distance.)
We're using Excel here, but the same functions will also work in Google Sheets or Numbers.
This guide walk you through how to:
You can see worked examples, including formulas, in this downloadable Excel example.
Upload your spreadsheet here. We will return decimal coordinates.
Let's say you have a distribution center and you want to know approximately how far away each of your retail stores are.
Depending on the number of locations you have, you may put them in one spreadsheet. If you have a lot of locations, you might have multiple sheets within the same workbook. Our example provides templates for both. Download the example here.
You will need to choose whether you want miles or kilometers. We have provided examples for both.
We indebted to the formulas written here.
You can read more about the benefits and limitations of the haversine formula and a discussion of other formulas here.