Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wanted to know if there is a formula in Excel to convert latitudes and longitudes(in degrees) into x and y coordiantes(in km or m), a formula that takes into account the curvature of Earth. Any help will be really appreciated.

share|improve this question
Your question is a bit generic - coordinate conversions depend on a lot of parameters like the used map projection. Please describe in detail what you have and what you need in the end. – Robert Jun 27 '12 at 11:30
X and Y coordinates in which system? Which origin? – slhck Jun 27 '12 at 11:31
By X and Y you mean… ? If so, google Excel UTM formulas – golimar Jun 27 '12 at 13:57
@slhck: considering center of Earth as origin, can we calculate cartesian coordinates? I can ignore used map projections and all that since what i want to do is a bit generic. What I have is x and y coordinates of an animal's movement and I want to convert them into distance in km so that a. I can see how it is moving in time and b. calculate the distance it is moving in each time interval – Maddy Jun 28 '12 at 3:57

What you are looking for is a great circle route formula. If you could draw a perfectly straight line through a basketball from one point to the other (you will have to go through the ball) and then transpose that line to the surface you will have the great circle route. Here is a website I use to calculate such things.

Here is the Haversine Formula from that website

Haversine formula:
a = sin²(Δlat/2) + cos(lat1).cos(lat2).sin²(Δlong/2)

c = 2.atan2(√a, √(1−a))

d = R.c

Where R is earth’s radius (mean radius = 6,371km); note that angles need to be in radians to pass to trig functions!

share|improve this answer
so then what is d in terms of x and y? isn't that the distance between the 2 points? then how can i determine those 2 points? – Maddy Jun 28 '12 at 3:54
This site gives some more details on using Lat/Lon & Haversine in Excel – SeanC Jun 28 '12 at 21:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.