I'm working on a project that use Google maps and i want to know: Giving 2 points with same latitude but with different longitudes, how can i calculate the distance between them in terms of longitude degrees?

For example, how can we calculate how far point 1 from point 2 in longitude degrees, the latitude degrees will be 0 since they are at the same latitude line.

I know how to calculate distance in kilometers, meters.

  • Do you have Web Mercator coordinates (with y1 = y2) and want to calculate the two lat-lon coordinates of the points? – mkennedy Mar 4 at 16:55
up vote 4 down vote accepted

If the two points are at the same latitude then the "distance" between them in "longitude degrees" will be the number of degrees between their longitudes.

This will be true no matter which software or Geographic Coordinate System you are using, as long as both points are specified using the same Geographic Coordinate System.

As commented by @Jon, if your longitudes are in degrees, minutes and seconds (DMS) then the formula for converting them to decimal degrees (DD) is:

decimal_degrees = degrees + minutes/60 + seconds/3600
  • How can i find approximate number of degrees between their longitudes? Is their any formula for this – developer Mar 4 at 5:13
  • 2
    @developer Subtract one longitude from the other. To get decimal degrees, the formula is decimal_degrees = degrees + minutes/60 + seconds/3600. – Jon Mar 4 at 5:18

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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