# Distance between two places on the earth Calculator

## Calculates the distance and azimuth between two places from latitudes and longitudes.

 Calculation assumes that the Earth is a sphere with a radius of 6378km.Input negative degree for west longtitude and south latitude.

 A: Longitude Latitude B: Longitude Latitude [ Earth's radius r km ] 6digit10digit14digit18digit22digit26digit30digit34digit38digit42digit46digit50digit
 Compass from A to Bplace A(x1, y1)、place B(x2, y2)$\normal\\\hspace{10}d=rcos^{\tiny -1}(siny_{\tiny 1}siny__{\tiny 2}+cosy__{\tiny 1}cosy__{\tiny 2}cos\Delta x)\\\phi=90-atan2(sin\Delta x,\ cosy_{\tiny 1}tany_{\tiny 2}-siny_{\tiny 1}cos\Delta x)\\\hspace{30}\Delta x=x_{\tiny 2}-x_{\tiny 1}\\\hspace{30} atan2(x,y)=atan(\large\frac{y}{x})$

Distance between two places on the earth
 [1-10] /22 Disp-Num5103050100200
[1]  2019/05/11 08:13   Male / 30 years old level / Others / Very /
Purpose of use
Determining the draft order for my fantasy football league by having people pick any city in the world, then using random.org to generate a random coordinate. Draft order is assigned based on each city's distance from that coordinate.
[2]  2019/05/07 21:36   Female / 20 years old level / An engineer / Very /
Purpose of use
see how far away the northernmost point of the european electric grid is from the northernmost point of the north american electric grid
[3]  2019/03/22 23:37   Male / 50 years old level / Self-employed people / Very /
Purpose of use
Hobby
Comment/Request
Why does the compass not point exactly due east or due west when I choose the same latitude from point A to point B near the Equator?
[4]  2019/03/19 06:59   Male / 40 years old level / Others / Very /
Purpose of use
I wanted to be able to tell someone "You are literally 10 thousand miles away!" ...and actually know what I was talking about. Now I can do that. So....bragging rights? ;)
[5]  2019/01/20 21:05   Male / 40 years old level / A teacher / A researcher / Very /
Purpose of use
Wanted to compare the distance between extreme points (N/S) of two countries.
Comment/Request
Great public service and easy to use (but had to transform degrees/minutes/seconds into decimals myself).
[6]  2018/12/26 23:24   Male / 60 years old level or over / A retired person / Very /
Purpose of use
Writing a book.
[7]  2018/10/10 04:22   Male / 20 years old level / High-school/ University/ Grad student / Very /
Purpose of use
Check my distance from an earthquake epicenter.
[8]  2018/08/27 09:00   Male / 30 years old level / An engineer / Useful /
Purpose of use
Measure the distance to an earthquake epicenter and knowing the time I felt it, confirm the speed of the seismic wave
[9]  2018/08/25 11:08   Male / 20 years old level / Elementary school/ Junior high-school student / Very /
Purpose of use
research flat earth
[10]  2018/05/23 11:08   Male / 40 years old level / An office worker / A public employee / A little /
Purpose of use
Twofold. To check if you used altitude in your calculation (you don''t) and to mercilessly rip off your code or formulae if you did. Still, nice bit of code.

Sending completion

To improve this 'Distance between two places on the earth Calculator', please fill in questionnaire.
Male or Female ?
Age

Occupation

Useful?

Purpose of use?