Point-radius bounding box
A 5000 m radius around 40.7128, −74.006 becomes the minimum and maximum latitude and longitude of a box that fully encloses the circle, ready for a quick range filter before the exact distance check. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Latitude
- 40.7128
- Longitude
- -74.006
- Radius
- 5,000
- Radius m
- 5,000
- Earth radius m
- 6,371,000
- Delta lat deg
- 0.0449660803
- Min lat
- 40.6678339197
A point-radius bounding box calculator turns a geographic center and a distance into the smallest axis-aligned rectangle in latitude and longitude that fully encloses the circular search area. Map tiles, Overpass queries, database spatial prefilters, and mobile geofence previews all need that same min/max envelope before they refine results with a true great-circle distance check.
What a point-radius bounding box is and when you need one
A geographic bounding box is the rectangle defined by a southern latitude, a northern latitude, a western longitude, and an eastern longitude. When the only specification you have is a center point and a radius—store locator radius, delivery range, event search, or wildlife collar buffer—you still need that rectangle for systems that index or query by latitude and longitude ranges rather than by circular distance.
The conversion uses a spherical Earth of mean radius 6,371,000 meters: the angular radius is the physical radius divided by that constant; the latitude half-width is that angle in degrees; the longitude half-width is the same angle divided by the cosine of the center latitude so meters stay approximately equal in east-west extent.
Near the poles cosine shrinks and longitude spans widen; if the circle reaches a pole or the longitude half-width reaches or exceeds one hundred eighty degrees, this tool reports a full longitude span of minus one hundred eighty to plus one hundred eighty so the box never under-covers the circle. Teachers, GIS students, and backend engineers care that a negative radius is a hard error: a signed distance is not a search radius, and silently taking an absolute value would hide client bugs.
What you can do with it
Store-locator and delivery-radius prefilters
Convert a shop center and delivery radius in meters into min/max lat/lon for SQL BETWEEN clauses, then refine with a true distance check on the shortlist.
Map viewport and tile prefetch windows
Given a pin and a buffer distance, compute the bounding box used to request map tiles, markers, or Overpass features without under-covering the circle.
FAQ
What units is the radius in?
Meters. Convert kilometers by multiplying by 1000 (for example 5 km → 5000).
Is the bounding box the same as the circle?
No. The box fully encloses the circle on a spherical Earth model; corner points of the rectangle can lie outside the radius. Use the box as a prefilter, then apply a distance test if you need a hard circular cut.
Is the point-radius bounding box calculator free?
The browser tool is free and runs locally.
Why does the box get much wider near the poles?
Because meridians converge. The east-west half-width is the latitude half-width divided by the cosine of the centre latitude, so it grows as you move poleward. If the circle reaches a pole, the box spans every longitude, from −180 to 180.
Why is a negative radius refused?
Because a signed distance is not a search radius. Quietly taking the absolute value would hide a bug in the system that sent it, so a negative radius is rejected, while a radius of zero is accepted.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/geo/bounding-box \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"lat":40.7128,"lon":-74.006,"radius":5000}'const res = await fetch("https://api.kit.forhosting.com/geo/bounding-box", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"lat": 40.7128,
"lon": -74.006,
"radius": 5000
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/geo/bounding-box",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"lat": 40.7128,
"lon": -74.006,
"radius": 5000
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/geo/bounding-box", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"lat":40.7128,"lon":-74.006,"radius":5000}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"lat":40.7128,"lon":-74.006,"radius":5000}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/geo/bounding-box", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"lat": 40.7128,
"lon": -74.006,
"radius": 5000
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "geo.bounding_box",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
min_lat | -90 |
max_lat | 90 |
min_lon | -180 |
max_lon | 180 |
max_radius_m | 20037508.342789244 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Enter decimal-degree latitude and longitude for the center, plus a non-negative radius in meters; the tool returns min_lat, max_lat, min_lon, max_lon, a GeoJSON-style bbox array [west, south, east, north], angular latitude offset, and step-by-step notes for the mean-Earth spherical model. Negative radius values are rejected with invalid_input so callers never ship an inverted or meaningless search window.
What a point-radius bounding box is and when you need one
When the raw west or east edge crosses the antimeridian, longitudes are normalized into the closed interval from minus one hundred eighty to plus one hundred eighty and a flag marks that min_lon may be greater than max_lon after wrap—the classic antimeridian case map libraries already handle.
How to call the API and what comes back
Absolute latitude and longitude outside those closed ranges fail validation before any trig runs. Send a JSON body with three required finite numbers: lat (aliases latitude and center_lat) in degrees from minus ninety to ninety, lon (aliases longitude, lng, and center_lon) in degrees from minus one hundred eighty to one hundred eighty, and radius (aliases radius_m and r) in meters, non-negative and not larger than half the Earth circumference. On success the response echoes rounded lat, lon, and radius_m; sets earth_radius_m to the constant 6371000; sets delta_lat_deg to the latitude half-width in degrees; sets min_lat, max_lat, min_lon, and max_lon for the enclosing box; sets bbox to the four-tuple min_lon, min_lat, max_lon, max_lat in west-south-east-north order; sets full_longitude and crosses_antimeridian booleans; sets message to a short English summary; and sets steps to an ordered array of derivation lines you can show in logs or UI. Failed validation—missing fields, non-finite numbers, latitude or longitude out of range, negative radius, or an oversized radius—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item and zero marginal unit price.
Practical tips, limits, and related searches
Keep the center inside published latitude and longitude ranges; do not send web-mercator or projected coordinates. Remember that an axis-aligned degree box is a prefilter: points in the corners of the rectangle can be farther than the radius from the center, so refine with haversine or geodesic distance if you need a hard circular cut. Prefer this capability when you already have a center and meters and only need the rectangular envelope; if your source is a polygon or multi-point set, compute a true multipoint bbox instead. Prefer meters for radius so clients do not mix kilometers and statute miles; convert kilometers by multiplying by one thousand before the call. Near the poles expect full_longitude true for modest radii because longitude degrees shrink to zero meters. For Pacific-centered queries near the antimeridian, check crosses_antimeridian and split the query into two longitude intervals when your database cannot express a wrapped range. Pair examples: New York at about 40.71 latitude and minus 74.01 longitude with a five-kilometer radius for a city-scale store search; a zero-radius call that returns equal min and max to the center; and a deliberately negative radius that demonstrates the hard invalid_input path. This landing targets people searching for a point radius bounding box, lat lon min max from radius, or geofence envelope calculator; it is not a great-circle distance tool, not a geohash encoder, and not a polygon buffer. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when learners deliberately send negative radii. Round-trip checks are easy: for mid-latitudes recompute delta latitude as radius over R times one hundred eighty over pi and confirm min_lat and max_lat match within the published twelve-decimal rounding.
Integration use cases
Unit tests for geofence and spatial APIs
Generate deterministic positive, zero-radius, polar, and negative-radius cases for golden fixtures in mobile and backend geofence code.
Technical questions
What happens near the poles or antimeridian?
If the circle reaches a pole or the longitude half-width is at least 180°, full_longitude is true and longitudes span −180 to 180. If the box wraps the antimeridian, crosses_antimeridian is true and min_lon may be greater than max_lon after normalization.
Which Earth model is used?
A mean sphere with R = 6,371,000 m. That is the common GIS default for fast envelopes; it is not a full WGS84 ellipsoid geodesic buffer.