Calculator Directory
Maps & navigation

Latitude and Longitude to XYZ Map Tile Calculator

Find the XYZ tile that contains a latitude and longitude at your chosen zoom level. The result gives the zoom, tile column, and tile row.

Inputs

XYZ tile (z/x/y)
12/772/1643

Formula & assumptions

x = floor[(λ + 180) ÷ 360 × 2ᶻ]. y = floor[(1 − asinh(tan φ) ÷ π) ÷ 2 × 2ᶻ].

The output gives zoom/column/row with a northwest origin. Longitude +180° wraps to the western tile boundary. Web Mercator truncates the poles.

OpenStreetMap tile conventions

Worked example

Latitude (°)
33.45
Point longitude (°)
-112.07
Zoom level
12
XYZ tile (z/x/y)
12/772/1643

Interpreting the result

The tile column counts eastward and the row counts southward from the northwest corner of the map at the selected zoom.