X is Longitude, Y is Latitude

Caitlin Dempsey


Even though I have been working with GIS data for over two decades, I still have my moments when I go to assign the X and Y coordinate fields. When adding in data that requires me to designate if the X column is latitude or longitude, I am not ashamed to admit there have been a few times that I have inadvertently assigned it wrong.

As its minimum, all GIS data has to have geographic coordinates. Geographic coordinates are a set of values used to pinpoint any location on Earth’s surface. They are expressed as latitude and longitude values and are stored in two fields.

What are latitude and longitude?

Latitude is the location of how far north or south a point is from the equator. Latitude values range from 0° at the equator to 90° at the poles (90° N for the North Pole and 90° S for the South Pole). Latitude lines are also known as parallels as these lines run east-west around the globe and are equidistant from each other.

Two globes of the world one with up and down arrows to point to lines of latitude and with with side to side arrows point to lines of latitude.
Geographic coordinates use positive and negative values to specify positions in relation to the Equator and the Prime Meridian. Locations north of the Equator and east of the Prime Meridian are marked with positive values. Conversely, positions that are south of the Equator or west of the Prime Meridian are denoted by negative values. Maps: Caitlin Dempsey.

Latitude values are either positive or negative or designated as being north or south of the Equator. A positive latitude means the location is in the Northern Hemisphere. If the latitude is negative, it means the location is in the Southern Hemisphere.

Free weekly newsletter

Fill out your e-mail address to receive our newsletter!

Longitude is the location of how far east or west a point is from the Prime Meridian, an arbitrary line that runs from the North Pole to the South Pole and passes through the Prime Meridian ( 0°) located in Greenwich, England to 180° east and west. Lines of longitude called meridians. These lines converge at the poles and are widest at the equator.

As with latitude, longitudes values are either positive or negative or designated as being east or west of the Prime Meridian. A positive longitude has a location that is east of the Prime Meridian. A negative longitude means that the location is west of the Prime Meridian.

A map with text showing the four quadrants of the globe that are north or south of the Equator and East or West of the Prime Meridian.
X and Y values are either positive or negative depending on whether the location is north or south of the Equator and east or west of the Prime Meridian. Map: Caitlin Dempsey.

How geographic data is stored in GIS

The intersection of a line of latitude and a line of longitude is shown by a set of coordinates and is used to identify a location on Earth. Every geospatial dataset will contain two fields: one for longitude values and one for latitude. As mentioned earlier, these values are frequently designated as X and Y in GIS software programs. The X field stores longitude values and the Y field stories latitude values.

For example, this file of the highest point in each U.S. state has coordinates that are stored in latitude and longitude fields. The longitude values are negative which means that the longitude points are west of the Prime Meridian. The latitude values are positive which means that the latitude points are all north of the Equator.

A screenshot of a table of values.
The highlighted columns contain the geographic coordinates for this dataset.

Many GIS software programs identify coordinates as X and Y values. When loading in a CSV or text file so that the information can be displayed spatially, you often need to manually designated the longitude coordinate field that has the X values and the latitude field that contains the Y values.

Screenshot from QGIS showing the interface for adding a CSV file with a red circle around the dropdown menus for designated the X and Y fields.
When loading a CSV file into QGIS, you will need to indicated which field contains the X (longitude) values and which fields contains the Y (latitude values). Screenshot: Caitlin Dempsey.

Why is it confusing to remember that X is longitude and Y is latitude?

It can be understandable why some people, myself included, seem to have an issue at times with remembering whether X is longitude or latitude and vice versa.

Order of coordinates

The first is simply the order. When we reference coordinates, we always talk about them as lat/long (Y,X) but some GIS software programs like ArcGIS Pro and QGIS consistently note them as X,Y (long/lat). Other programs, like Google Maps, flip the coordinate order so that Y is first and X is second.

Side by side screenshots showing QGIS and Google Maps.
On the left, QGIS lists the coordinates in X, Y order while on the right (Lambert Conformal Conic map projection), Google Maps (Mercator web map projection) lists the coordinates in Y,X order.

Confusion with the Cartesian Coordinate System

Everyone remembers learning about the Cartesian coordinate system in school, where the X-axis represents the horizontal component and the Y-axis the vertical. Since longitude lines run vertically on a globe (from pole to pole), it seems intuitive to associate them with the Y-axis, although they actually correspond to the X-axis in geographic coordinate systems.

How to remember X is longitude and Y is latitude

Here are suggestions about how to remember that X is longitude and Y is latitude.


The obvious first strategy is to simply memorize the fact that X is longitude and Y is latitude. However, if you still find you have a mental block when it comes to remembering which is which, here are some other strategies for remembering.

Sticky note method

Sometimes you just have to put it in writing. If you deal with a lot of data and frequently need a reminder, just put a sticky note off to the side of your screen for easy access. It’s a low-tech solution guaranteed to make sure you always remember that x is longitude and y is latitude.

A photo of a yellow sticky note that says x=long and y=lat with a screen that has a map displayed.
The low-tech way is to put a sticky note that says “x=long and y=lat” near your screen. Photo: Caitlin Dempsey.

Memory aids

The other way is to use a memory aid to help you remember that “x=long and y=lat.”

One clever way to remember was suggested by a Reddit user. The user pointed out that “X’ has four end points and “long” has four letters so they go together. Likewise, “Y”has three end points and “lat” has three letters.

A large black X and Y with small red dots at the end points of each letter.
One way to remember that X stands for longitude and Y stands for latitude. Diagram: Caitlin Dempsey.

Another way is the ladder analogy for recalling latitude versus longitude with a twist, as suggested by another Reddit user. In this analogy latitude is shown as the rungs of the ladder and longitude are the side rails. The added twist is the saying “Y climbs the la[t]dder and X just runs along.

A image of a globe in blue with a black ladder leaning against the globe.
“Y climbs the ladder and X just runs along.” Image: Caitlin Dempsey using Canva elements.

By regularly applying one of the memory aids listed above, you can condition your mind to associate X with longitude and Y with latitude.

What is the difference between latitude/longitude and Easting/Northing?

Instead of latitude and longitude, you may see the terms Easting and Northing used. The latitude/longitude is a system is based on a spherical coordinate system. The Earth is approximated as a sphere or an ellipsoid, and coordinates are given in degrees. The Easting/Northing system is based on a Cartesian coordinate system, typically used in specific map projections like the Universal Transverse Mercator (UTM) or the British National Grid. Easting represents the distance (usually in meters or feet) eastward from a defined meridian (north-south line). Northing represents the distance northward from the equator (in the case of UTM) or from a defined baseline (in other grid systems). Y is designated as Northing and X is designated as Easting.

What to do if your GIS data points aren’t where you expect them to be on the map?

This happens to all of us. You designate what you think are the right fields for latitude and longitude. Yes when you zoom to the data points in your GIS software program, they aren’t mapped to region they are supposed to be.

The first thing to do is to switch the fields you designated. Most of the time it’s simply a mismatched latitude and longitude designation (or Northing and Easting designation). You should also check the convention of the country or geospatial data projection system that you are using. For example, Lantmäteriet, the Swedish Mapping, Cadastral and Land Registration Authority, explains that in Sweden and several other countries, data is typically oriented with the x-axis towards the north and the y-axis towards the east. (H/T @LaStranga)

If that doesn’t help, check whether your coordinates are supposed to be positive or negative. For example, if your data points are mapping closer to Indonesia instead of the expected California locations, your longitude values are positive instead of negative.

Photo of author
About the author
Caitlin Dempsey
Caitlin Dempsey is the editor of Geography Realm and holds a master's degree in Geography from UCLA as well as a Master of Library and Information Science (MLIS) from SJSU.