Slippy Map Tile & Zoom Calculator

Web Mercator tile math: lat/lon ↔ z/x/y tile addresses, ground resolution and map scale at any zoom and latitude, tile bounding boxes, and ready-to-paste bbox strings. Runs entirely offline; inputs persist in this browser via localStorage.

Input

How the Numbers Are Derived

Tile math (Web Mercator / EPSG:3857)

x = ⌊(lon+180)/360 · 2^z⌋, y = ⌊(1 − ln(tan φ + sec φ)/π)/2 · 2^z⌋ — the standard OSM slippy scheme (origin top-left, y increasing southward). The inverse gives each tile's NW corner; tile (x+1, y+1) corners give the rest of the bbox. Web Mercator is defined on a sphere of radius 6,378,137 m and cuts off at ±85.0511° — the latitude where the world map becomes square.

Resolution and scale

Ground resolution = 156,543.034 · cos(lat) / 2^z meters per pixel (256-px tiles) — the cos(lat) is why a zoom level covers less ground per pixel in California than at the equator. "Map scale" for a screen is approximate by nature; the value shown assumes 96 dpi (scale ≈ resolution · 96 / 0.0254). High-DPI displays and retina @2x tiles halve the effective resolution per CSS pixel.

Field-mapping notes

References

  1. OSM wiki — Slippy map tilenames (the canonical formulas). https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames
  2. OSM wiki — Zoom levels and resolution tables. https://wiki.openstreetmap.org/wiki/Zoom_levels
  3. Overpass API language guide — bbox syntax. https://wiki.openstreetmap.org/wiki/Overpass_API