Bounding box calculator around a point

Calculate a rectangle of minimum and maximum latitudes and longitudes around a point and a given radius in kilometers. Handy for building a geographic query such as WHERE lat BETWEEN min_lat AND max_lat AND lon BETWEEN min_lon AND max_lon.

Example:

How it works

The calculation uses an equirectangular approximation: it converts the radius into degrees of latitude and longitude around the central point, taking into account that a degree of longitude represents a shorter distance as you move away from the equator (correction by the cosine of the latitude).

This approximation is largely sufficient for filtering or pre-selecting points in an approximate area, but it isn't suited to precise navigation or an exact distance calculation, particularly over very large radii or near the poles.

A concrete use case

This bounding box is often used to pre-select points in a database before computing an exact distance: you first filter the rows whose latitude and longitude fall within the rectangle (a fast, indexable operation), then refine the result with a precise distance calculation only on this reduced subset. This is a common pattern for speeding up "find nearby points" queries.

100% local processing: the calculation happens entirely in your browser via WebAssembly — your coordinates are never sent to a server.