We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


Formula for the distance between 2 longitude lines on a globe at different latititudes

oxygen_728 asked
Medium Priority
Last Modified: 2012-08-14
My goal: the distance between two lines of longitude on a globe at different latitudes.

Would this be accurate?

 cosine(latitude) * pi * radius^2  = latitudinal circumference?
 then, that circumference / # of longitude lines  = space between 2 of them at this latitude?

Anything simpler or more efficient in mind?


Working on a globe program

Watch Question

Top Expert 2009
>> cosine(latitude) * pi * radius^2  = latitudinal circumference?
That whould be :

2 * cosine(latitude) * pi * radius = latitudinal circumference

when radius is the radius of the Earth and the Earth is seen as a perfect sphere.

>> then, that circumference / # of longitude lines  = space between 2 of them at this latitude

You might want to consult the link JR2003 posted though, because it explains how to calculate the distance between two points on the globe (not necessarily on the same latitude).

I suggest the haversine formula :


It's easy to calculate, and has a nice precision.

Note that the Earth is NOT a perfect sphere, so a good choice of the used radius is important (average radius should be OK for most applications).

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
If you want to add just that little bit extra of geodetic geekiness, you could make sure that your globe model conforms to the WGS84 ellipsoid.  See http://www.colorado.edu/geography/gcraft/notes/datum/datum.html

You'd probably be most interested in the ECEF <-> WGS84 lat lon height conversions in the "Datum Conversions" section.  They have the actual formulas there.


I should have some time tonight to review the comments, thanks for your input

Most Valuable Expert 2014
Top Expert 2015
When you say "the distance between two lines of longitude on a globe at different latitudes"
it sounds like you might not be wanting the great circle distance between two points.
If you are wanting the lenght of the path between two lines of longitude while traveling at a constant latitude, then you could use
 cosine(latitude) * pi * radius*2  = latitudinal circumference
assuming the globe in question is a sphere.
Although I'm not sure of the purpose of your goal, since traveling at a constant latitude can be almost pi/2 times longer than a great circle path,
e.g. from 90° East to 90° West when traveling along 89°59' North latitude instead of a direct path from 90° East 89°59' North to  90° West 89°59' North
But then, if you aren't restricted to a particular latitide, then the distance between any two lines of longitude is 0, since they all meet at the poles.  
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.