What County Am I In?
Your device's location, checked against Census county boundaries in your browser, with a warning when you are near a county line.
For US locations, including DC, Puerto Rico and the US island areas.
How this is calculated
Your position is a latitude and longitude. When you press the button, your browser asks for permission and reports a position and an accuracy value. MDN defines that accuracy as a radius in metres at 95% confidence, so the true position is probably, not certainly, inside that circle.
- The page loads a small file for the one-degree square around your position. It is a slice of the Census Bureau's 1:500,000 county and equivalent boundaries, with the rest of the country left out.
- It runs a point-in-polygon test (ray casting): a line is drawn from your position and the page counts how many county edges it crosses. An odd count means inside that county.
- It measures the distance from your position to the nearest edge of every other county in that slice. The distance uses the haversine formula with a mean Earth radius of 6,371.0088 km, and a local flat projection for the point-to-edge step.
- If another county's edge is closer than the accuracy your browser reported, the page says you are near a county line and names that county. If no accuracy was reported, no warning is shown, because the page has no basis for choosing a distance.
All of this happens in your browser. The only requests are for the boundary file of your square, which does not carry your position, though the request itself shows our host which one-degree square you asked for. If the accuracy radius is wider than the area the slice covers, the page says so instead of giving a warning it cannot check.
Typed coordinates use the same steps. A point in open water, or outside the 50 states, DC, Puerto Rico and the US island areas, returns an error rather than a guess.
What a county is, and why the answer matters
A county is the main administrative division inside most US states. It is the answer many forms, fee schedules, court filings and local-service questions ask for, so people often need it when they are away from home or unsure which side of a line they are on. This page tells you which county contains a position. It does not tell you which county's rules apply to a given matter; ask the office involved if that matters.
Not every state uses the word county. The Census file behind this page has 3,235 records, and their official names include parishes, boroughs, census areas, municipalities, municipios, islands and districts, independent cities, and planning regions in Connecticut. The result line shows the exact name from the file, and the Type line shows the word it ends with.
Why county lines are tricky
There are two separate sources of error, and they add up. The first is your device: a phone using GPS can report a small accuracy radius, while a laptop that guesses from Wi-Fi or its network address can be off by much more. Why your location may be wrong covers the causes. The second is the map: the Census 1:500,000 file is simplified for map display, so a county line in it is close to the real one, not a surveyed legal boundary.
That is why the page reports the near-line note instead of just a name. If you are told you are near a line, treat the answer as one of two counties and check it another way.
How to double-check
For anything official, look up the street address on the county assessor or county GIS website, or ask the office you are filing with. If you do not have a position but know a ZIP code, the ZIP to county lookup lists every county a ZIP area overlaps. For the rest of your location card, go to the home page; state, city and ZIP each have their own page.
Where the figures come from
- Data.gov catalogue entry for the 2024 county and equivalent cartographic boundary file (1:500,000). Checked 9 November 2026.
- Census Bureau, Cartographic Boundary Files. Checked 9 November 2026.
- MDN, GeolocationCoordinates (accuracy is in metres at 95% confidence). Checked 9 November 2026.
- Movable Type Scripts, calculate distance between latitude/longitude points (haversine). Checked 9 November 2026.