R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

you have 2 columns and 2 rows.

column A equals the latitude in decimal degrees

column B equals the longitude in decimal degrees

all of the rows equal the coordinates of a certain bldg

example

column A (lat) Column B (long) Column C(distance between skating rink and

mall)

skating rink 36.009900 -79.727086 (desired result)

mall 35.090909 - 78.789899

my coordinates are in decimal degrees

Column C will have the distance between skating rink and mall

to answer this requires some serious math i think.

like sin and cosine type stuff

column A equals the latitude in decimal degrees

column B equals the longitude in decimal degrees

all of the rows equal the coordinates of a certain bldg

example

column A (lat) Column B (long) Column C(distance between skating rink and

mall)

skating rink 36.009900 -79.727086 (desired result)

mall 35.090909 - 78.789899

my coordinates are in decimal degrees

Column C will have the distance between skating rink and mall

to answer this requires some serious math i think.

like sin and cosine type stuff

Experts Exchange Solution brought to you by

Enjoy your complimentary solution view.

Get every solution instantly with Premium.
Start your 7-day free trial.

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

easy way of doing this is to calculate the difference between the coordinates in both dimentions. Then you convert those to the metrics you need (miles, meters,...) Than you actually calculate the distance with Pytagora. (lat. dif.)^2 + (long. dif.)^2 = distance^2...

The correct answer would involve Spherical cosinus and sinus and so on... Very hard math and in this case the difference in result would be a few meters...

Good luck

36.084945 -79.770744

those are my test coordinates.

with the equation you gave me my answer came out to be 17.6

i confirmed the coordinates are 2.44 miles away..... any ideas?

Strangely, when I try a variation on the formula (haversines), the haversine formula now gives 17.6, and the original formula switches to 6370.976, which is about 3.95 miles – still very wrong.

The haversine version of the formula is:

=(ASIN(SQRT(((SIN((A2-A1)/

See the attached screenshot.

I'm still fiddling with this...

GreatCircleDistance.png

This is giving the answer in kilometers. If you want it in miles, instead, use this:

=ACOS(SIN(RADIANS(A1))*SIN

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trialthis site rocks

never would have thunk someone on here would figure that out for me

Glad I was able to help. Thanks for the points!

Microsoft Excel

From novice to tech pro — start learning today.

Experts Exchange Solution brought to you by

Enjoy your complimentary solution view.

Get every solution instantly with Premium.
Start your 7-day free trial.

Can we assume that we have a perfectly spherical world, with no hills between point A and point B?

If so, the math is relatively easy. If not, your best bet would probably be to make an Internet connection to the Google Earth API and get Google to calculate a distance for you, though that's not likely to be speedy.

If you can assume a sphere, here's your formula:

=ACOS(SIN(A1)*SIN(A2)+COS(