5

I use the haversine formula to calculate the distance among the points. The result of this formula is in meter or in kmeter?

http://en.wikipedia.org/wiki/Haversine_formula

Anyone can help me?

helloflash
  • 2,457
  • 2
  • 15
  • 19
doflamingo
  • 77
  • 1
  • 1
  • 9

1 Answers1

3

Haversine formula is used for finding distance between to points, if latitude and longitude for both points are known.

Formula:

ACOS(SIN(Lat1)*SIN(Lat2) +COS(Lat1)*COS(Lat2)*COS(Lon2-Lon1)) *6371

Excel formula:

=ACOS(COS(RADIANS(90-Lat1)) *COS(RADIANS(90-Lat2)) +SIN(RADIANS(90-Lat1)) *SIN(RADIANS(90-Lat2)) *COS(RADIANS(Long1-Long2))) *6371

Note:

Replace 6371 with 3958.756 if you want the answer in miles.

For further detail:

http://bluemm.blogspot.in/2007/01/excel-formula-to-calculate-distance.html

  • This is not the haversine formula, it's the spherical law of cosines formula. See this: https://en.wikipedia.org/wiki/Haversine_formula – John Machin Mar 16 '17 at 06:40
  • 4
    If your Haversine formula uses... - 6,371, the units are kilometers - 6,371,000, the units are meters - 3,958, the units are miles – Corey Farwell Nov 03 '18 at 17:15