geoprimsField-grade geospatial math

Map tiles, zoom levels, and quadkeys explained

How web map tiles are numbered, why TMS flips the y axis, what a quadkey is, and the ground size of a pixel at each zoom.

For developers and gis · updated 2026-09-23

A web map tile is a square image, usually 256 pixels across, that covers one piece of the world at one zoom level. At zoom 0 a single tile covers the whole map. Each zoom level splits every tile into four, so zoom z has 2^z tiles across and 2^z down. A tile is named by its zoom, column, and row, written z/x/y, or by a single string called a quadkey.

Why it matters

Tile names show up everywhere: in tile server URLs, in offline map caches, in vector tile pipelines, and as a cheap spatial index. Three numbering schemes are in common use, and they disagree about which way the rows run. Mix them up and you fetch a tile from the wrong hemisphere. Knowing the ground size of a pixel at each zoom tells you which zoom to render, cache, or download.

How it is worked out

Web Mercator and the 85.05° limit

Nearly all web map tiles use the spherical Web Mercator projection (EPSG:3857). Mercator stretches toward the poles without end, so the square world map is cut off where it would stop being square: about 85.0511° north and south. Bing’s documentation gives the limit as 85.05112878°. Points closer to the poles are not on the map. The tile tool clamps them to the edge and says so.

XYZ, TMS, and quadkeys

Ground resolution

The ground size of one pixel is:

Ground resolution = cos(latitude) × 2π × 6,378,137 m ÷ (tile size × 2^zoom)

It halves with every zoom level and shrinks toward the poles. Map scale follows from it at a screen resolution of 96 dots per inch.

A worked example

Downtown Pittsburgh, 40.446111°, −79.982222°, at zoom 12:

Form Value
XYZ tile 12/1137/1544
TMS y 2551
Quadkey 032001112001
Ground resolution 29.08 m per pixel
Map scale at 96 dpi about 1 to 109,900

The tile bounds tool shows that 12/1137/1544 spans latitude 40.3800284° to 40.4469471° and longitude −80.0683594° to −79.9804688°.

Now the classic mistake. Read the TMS row, 2551, as if it were XYZ, and tile 12/1137/2551 lands at latitude −40.4469471° to −40.3800284°: the same distance south of the equator, in the Pacific Ocean off Chile. The bounds tool’s “detect” mode shows both readings side by side, so you can tell which convention a file uses.

Ground resolution by zoom

At Pittsburgh’s latitude, with 256-pixel tiles:

Zoom Meters per pixel Scale at 96 dpi, about 1 to
0 119,100 450,300,000
6 1,861 7,035,000
10 116.3 439,700
12 29.08 109,900
15 3.636 13,740
18 0.4545 1,718
20 0.1136 429.4

Latitude matters. At zoom 12 a pixel covers 38.22 m at the equator and 19.11 m at 60° N. With 512-pixel tiles, common for vector tiles, each pixel covers half as much ground: 14.54 m at zoom 12 over Pittsburgh.

How many tiles?

Tile counts grow four times per zoom level. A small box over downtown Pittsburgh, 40.43° to 40.45° N and 80.02° to 79.98° W, takes 9 tiles at zoom 14 and 54 tiles at zoom 16. The tile cover tool lists them, which is useful for sizing an offline cache before you download it.

The tile family tool goes up and down one level. The parent of 12/1137/1544 is 11/568/772, with quadkey 03200111200: the child’s quadkey minus its last digit.

Rules of thumb

Common mistakes

Where the numbers come from

Tile math follows the OpenStreetMap wiki’s slippy map page and Microsoft’s Bing Maps Tile System article. The TMS row order comes from the OSGeo Tile Map Service specification. The tile tool gives all three names for any point, and the ground resolution tool gives meters per pixel and scale at any zoom and latitude. For string-based cells, see geohash explained.

Try it: Map tile for a point (XYZ, TMS, quadkey)

The calculator below is the real tool, running its worked example. Change any value; nothing leaves your device.

12/1137/1544

The tile is 12/1137/1544, quadkey 032001112001.

x
y (XYZ)
y (TMS)
Quadkey
Ground resolution (per pixel)
Provenance
Computed by
indexing.tile.from-point 1.0.1, core 0.1.0
Model
Spherical Web Mercator (EPSG:3857) tile grid
Accuracy
Exact tile; resolution on the Web Mercator sphere
Notes
None
Cites
OpenStreetMap Wiki, Slippy map tilenames; Microsoft, Bing Maps Tile System

Open the full tool, with your values →

Your values

Showing an example. Change anything.
More options 1

Tools for this

Sources

Every number on this page comes from the tools above, which cite their sources on their own pages under "How we got this." Found a mistake? Use "Report a problem" at the bottom of the page.