How to Calculate Distance Between two Latitude and Longitude in Excel
How to Calculate Distance Between two Latitude and Longitude in Excel

How to Calculate Distance Between two Latitude and Longitude in Excel

To calculate the distance between two points specified by latitude and longitude in Excel, you can use the Haversine formula. The Haversine formula is a common method for calculating distances on the surface of a sphere (like the Earth). Here’s a step-by-step guide:

  1. Create a new Excel spreadsheet.
  2. Enter the coordinates:
    • In column A, enter the latitude of the first point.
    • In column B, enter the longitude of the first point.
    • In column C, enter the latitude of the second point.
    • In column D, enter the longitude of the second point.
  3. Use the Haversine formula: You can use the following formula to calculate the distance between two points in kilometers: =6371*ACOS(COS(RADIANS(90-A2))*COS(RADIANS(90-C2))+SIN(RADIANS(90-A2))*SIN(RADIANS(90-C2))*COS(RADIANS(B2-D2)))
    This formula assumes that your latitude values are in column A, longitude values are in column B, second latitude values are in column C, and second longitude values are in column D. The result will be the distance in kilometers.
    If you want the result in miles, you can use the following formula:
    =3959*ACOS(COS(RADIANS(90-A2))*COS(RADIANS(90-C2))+SIN(RADIANS(90-A2))*SIN(RADIANS(90-C2))*COS(RADIANS(B2-D2)))
  4. Drag the formula down: Copy the formula down for all the rows where you have data.
    Now, you should see the distances between each pair of points in the specified units (kilometers or miles) in the column where you entered the formula.
    Remember to replace A2, B2, C2, and D2 with the appropriate cell references for your data. Additionally, make sure that your latitude and longitude values are in decimal degrees format.
How to Calculate Distance Between two Latitude and Longitude in Excel
Example: How to Calculate Distance Between two Latitude and Longitude in Excel

Try our calculators: