# Distance Measuring

**URL:** <https://boards.straightdope.com/t/distance-measuring/433872>\
**Category:** Factual Questions\
**Created:** [January 17, 2008, 4:06pm UTC](https://boards.straightdope.com/t/distance-measuring/433872 "2008-01-17T16:06:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zonger112](https://avatars.discourse-cdn.com/v4/letter/z/f475e1/32.png) [@zonger112](https://boards.straightdope.com/u/zonger112)\
**Post date:** [January 17, 2008, 4:06pm UTC](https://boards.straightdope.com/t/distance-measuring/433872/1 "2008-01-17T16:06:10Z")

</div>

I want to measure the distance between two points on the globe (from any city in the world to another, LA to Sydney(Aus) say for example). I know the longitude and latitude for each city. Is there a formula that would convert this information to a distance in miles or Km?  
I’m interested in ballpark results (say ±10% from true distance) so the formula doesn’t have to be overwhelmingly complicated.

I know I can google each individual city and find out but it would take time. I want a formula that can be used in a spreadsheet to calculate a matrix of many cities without having to search for each one on some website.

Thanking you all in advance.

---

<div class="post-metadata">

**Author:** ![beowulff](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/beowulff/32/542_2.png) [@beowulff](https://boards.straightdope.com/u/beowulff)\
**Post date:** [January 17, 2008, 4:08pm UTC](https://boards.straightdope.com/t/distance-measuring/433872/2 "2008-01-17T16:08:58Z")

</div>

Have a look at this: [Calculate distance and bearing between two Latitude/Longitude points using haversine formula in JavaScript](http://www.movable-type.co.uk/scripts/latlong.html)

---

<div class="post-metadata">

**Author:** ![Mycroft\_H](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@Mycroft\_H](https://boards.straightdope.com/u/Mycroft_H)\
**Post date:** [January 17, 2008, 5:26pm UTC](https://boards.straightdope.com/t/distance-measuring/433872/3 "2008-01-17T17:26:30Z")

</div>

[Here](http://jan.ucc.nau.edu/~cvm/latlongdist.html) is another possibility that I found out from a different SDMB thread a while back.

The creator of that site has a separate page that lists the code used. Hopefully you can use that to come up with your own spreadsheet equations.  
Another tack would be to use the Wikipedia entry to come up with the spreadsheet formulas. [Great-circle distance - Wikipedia](http://en.wikipedia.org/wiki/Great-circle_distance)

---

<div class="post-metadata">

**Author:** ![Xema](https://avatars.discourse-cdn.com/v4/letter/x/9de053/32.png) [@Xema](https://boards.straightdope.com/u/Xema)\
**Post date:** [January 17, 2008, 6:58pm UTC](https://boards.straightdope.com/t/distance-measuring/433872/4 "2008-01-17T18:58:52Z")

</div>

I give you [Aviation Formulary](http://williams.best.vwh.net/avform.htm) - exceedingly useful (if perhaps a bit more than necessary).
