Antique globe

Is Longitude X or Y? Coordinates Made Simple

You’re entering a location into a spreadsheet or a mapping program, and it wants an X and a Y. You’ve got two numbers from your phone, something like 40.7 and −74.0. Which goes where? Put simply, is longitude x or y in that setup? Longitude is X and latitude is Y. The trouble is that people normally say them in the opposite order.

Why longitude is X

On a graph, X runs left to right and Y runs up and down. Now picture a world map on a wall. Moving east or west shifts you sideways, and moving north or south shifts you vertically. Longitude measures how far east or west you are, so it behaves like X. Latitude measures north and south, so it behaves like Y.

The center of this graph is the point where the equator crosses the prime meridian, in the Gulf of Guinea off West Africa. Its coordinates are 0, 0. Everything to the east has a positive X, and everything to the west a negative one. North is positive Y, south is negative.

The part that confuses everyone

Longitude lines run up and down the globe, from pole to pole. So people look at a vertical line and think “vertical, must be Y.” But the line isn’t the direction you measure in. All the points on one longitude line share the same value. To change that value, you’ve got to step sideways, off the line.

It’s the same on ordinary graph paper. The line x = 3 is vertical, and it’s still an X value. Once that clicks, the rest is easy.

Spoken order against plotted order

Everyday usage says “latitude and longitude,” in that order. Phone maps usually display it this way as well: 40.71, −74.01 for New York. That’s Y first, then X.

Software is divided. Many databases and file formats, including GeoJSON, want longitude first because they follow the X, Y order. Some web mapping tools expect latitude first. Google Maps takes latitude, longitude. There’s no universal rule, so check the documentation before you load ten thousand rows.

What happens if you swap them

Sometimes you get an error, as latitude can’t go past 90 in either direction. Feed in −122 as a latitude and a good program will complain.

Often, though, you get nothing but a strange map. Swap the numbers for New York and you get a latitude of −74 and a longitude of 40.7, which lands you in Antarctica. Swap the pair for Rome, about 41.9 and 12.5, and the marker shows up near the coast of Yemen. If your pins have ended up in the sea or on ice, a swap is the first thing to check.

A quick way to tell which is which

Look at the size and the place. Latitude goes from −90 to 90, while longitude goes from −180 to 180. A number like 151.2 can only be longitude.

If both are small, use what you know about the country. In the United States the longitude is nearly always negative and larger than 65 once you ignore the sign. In India, latitude lies between roughly 6 and 37, and longitude between about 68 and 97. In most of western Europe, longitude is close to zero.

Ways to remember

“Latitude” sounds a bit like “ladder,” and you climb a ladder up and down. That’s Y. “Longitude” goes the long way around, from side to side. That’s X. Another trick is alphabetical. Lat comes before long, but when you plot, X comes before Y, so you flip them.

One small warning

Degrees aren’t true distances. One degree of latitude is always about 111 kilometers. One degree of longitude is the same at the equator, yet it shrinks to nothing at the poles. For a rough plot of nearby points that’s fine. For measuring, use a proper map projection.

If you’d like more pairs like this sorted out in simple terms, compairro.com covers several. For your spreadsheet, label the columns “X (longitude)” and “Y (latitude).” Whoever opens the file next will be grateful.