Maps & Surveying
Web Map XYZ Tile, Pixel & Resolution Calculator
Locate a coordinate inside an XYZ web-map tile grid at a chosen zoom level.
How the calculation works
Tile column X = min(2**zoom-1,floor((longitude+180)/360*2**zoom)) index. Tile row Y = max(0,min(2**zoom-1,floor((1-(log1p(sin(latitude*pi/180))-log1p(-sin(latitude*pi/180)))/2/pi)/2*2**zoom))) index. Global horizontal pixel coordinate = (longitude+180)/360*2**zoom*pixels pixels. Global vertical pixel coordinate = max(0,min(2**zoom*pixels,(1-(log1p(sin(latitude*pi/180))-log1p(-sin(latitude*pi/180)))/2/pi)/2*2**zoom*pixels)) pixels. Local ground resolution at latitude = cos(latitude*pi/180)*2*pi*6378137/(2**zoom*pixels) m/pixel.
Worked example
Example inputs — Latitude (degrees): 0; Longitude (degrees): 0; Zoom level: 2; Pixels per tile edge: 256. Expected results — Tile column X: 2 index; Tile row Y: 2 index; Global horizontal pixel coordinate: 512 pixels; Global vertical pixel coordinate: 512 pixels; Local ground resolution at latitude: 39135.75848 m/pixel.
Assumptions and limits
Educational geometry with an explicit coordinate convention. Not a cadastral boundary, certified survey or navigation service. XYZ convention with row zero at north, unlike TMS. Uses Web Mercator’s 6378137 m sphere and latitude clamp. Continuous pixel positions are reported; this tool downloads no tiles or map imagery.
Reference and further reading
Read the underlying subject reference. Calculith is an independent implementation; the reference does not endorse or certify this tool.
Related calculators
- Spherical Great Circle Distance, Bearings & Interpolation Calculator
- Spherical Constant-Bearing Rhumb Route Calculator
- Great Circle Cross-Track & Along-Track Offset Calculator
- WGS84 Cartesian & Local East-North-Up Calculator
- Spherical Cylindrical Map Projection Calculator
Example values are editable. Results are estimates where assumptions apply. Calculations run in your browser. Updated 2026-11-16.