← All tools

Map Fit-Bounds Zoom Calculator

The zoom level that fits a bounding box into a map viewport, with its centre, ground resolution and tiles.

Top edge in decimal degrees; it must be above the south edge.

Bottom edge in decimal degrees.

Left edge in decimal degrees, -180 to 180.

Right edge. A west value larger than east measures across the antimeridian.

Map area in CSS pixels, without headers or sidebars.

Map area height in CSS pixels.

256 px is the usual tile; 512 px tile sets shift the zoom number by one.

The box is projected onto the spherical Web Mercator plane (EPSG:3857), where west and east become x fractions of the world and latitude becomes a stretched y fraction, and the zoom that fits both the width and the height wins. Web Mercator only, so no other projections or datums are handled; the resolution and scale are those at the centre of the box, not at its edges; and tile counts assume the whole viewport is tiles with no overlap or padding. It runs entirely in your browser with no storage, uploads or network access.