Measurement tool

Closest location finder

Rank a pasted list or CSV of addresses, ZIP codes, or coordinates by straight-line distance from a start point, with bearings and CSV export.

Short answer

Paste a list of locations and pick a start point. From the Colorado capitol, the closest neighboring state capital is Cheyenne, WY, 97 miles N. Coordinates and ZIP codes rank at once; addresses are geocoded on request.
Closest capital to Denver
97mi
Lines per list
2,000
Coordinates and ZIP codes rank at once. Addresses go to Photon, one per second.

StartClosestOther locations

Closest location

Closest
Fort Collins58.7 mi N (94.5 km)
Farthest
Pueblo104.5 mi SSE
Ranked
3 of 63 not placed yet
Straight-line distance and initial bearing (true north) on a sphere. ZIP codes use the Census ZCTA internal point.

Not placed

  • Line 2: 80301ZIP file loading
  • Line 4: 82001ZIP file loading
  • Line 6: Union Station, Denver, CONot geocoded yet

Ranked by straight-line distance from Denver, CO

#LocationMilesKmBearing
1Fort Collinscoordinates · 40.5853, -105.084458.794.5355° N
2Colorado Springscoordinates · 38.8339, -104.821463.1101.6172° S
3Pueblocoordinates · 38.2544, -104.6091104.5168.2169° SSE

Worked example: neighboring state capitals from Denver

With the start point on the Colorado state capitol and the capitals of seven nearby states pasted as coordinates, the ranking reads:

  1. Cheyenne, WY: 97.2 miles, bearing 5° (N)
  2. Santa Fe, NM: 285.1 miles, bearing 191° (S)
  3. Salt Lake City, UT: 370.9 miles, bearing 283° (WNW)
  4. Pierre, SD: 398.5 miles, bearing 35° (NE)
  5. Lincoln, NE: 442.8 miles, bearing 78° (ENE)
  6. Topeka, KS: 499.0 miles, bearing 93° (E)
  7. Oklahoma City, OK: 503.5 miles, bearing 123° (ESE)

Cheyenne wins easily, almost due north. Topeka and Oklahoma City are close to a tie for the far end of the list, which is the kind of result worth checking by road before relying on it: the straight-line order and the driving order often differ when two candidates are within a few percent of each other. The bearing column tells you which way to head from the start, measured clockwise from true north.

How to use it

  1. Set Start from with a search, coordinates, or Use GPS.
  2. Paste locations into Locations, one per line, or open a CSV file in the box below it. Coordinates and ZIP codes are ranked right away.
  3. If the list has addresses, press the Geocode button. Up to 25 addresses are looked up per click, one per second, and rows that could not be placed appear under Not placed with the reason.
  4. Read the ranked table, closest first, with miles, kilometers, and bearing, and press Download CSV to save it.

What you can paste

Each line is one location. The tool sorts lines into three kinds before it does anything else:

  • Coordinates in decimal degrees such as 39.7392, -104.9903, degrees, minutes, and seconds, or a map link containing @lat,lon. These are placed immediately.
  • ZIP codes, five digits with an optional ZIP+4 suffix. These are placed at the internal point of the matching Census ZIP Code Tabulation Area from the 2024 Gazetteer, loaded in your browser, with no geocoding call.
  • Anything else is treated as an address or place name and waits for the Geocode button.

To keep a readable name, put it before a vertical bar, as in Warehouse 3 | 41.88, -87.63. A CSV file is converted to the same lines: latitude and longitude columns are used when the header has them (lat, latitude, lon, lng, longitude), otherwise the address, city, state, and ZIP columns are joined, and a name, title, label, site, store, or location column becomes the name.

Geocoding and the rows that do not place

Addresses go to Photon, a public geocoder built on OpenStreetMap data. Its fair-use terms ask for light traffic, so the tool sends one request per second and at most 25 per click. A longer list takes several clicks. Each lookup keeps the first match, and the matched label is shown under the name so you can spot an address that landed in the wrong town.

Rows that cannot be placed are listed under Not placed with the reason: not geocoded yet, no match, the geocoder was unavailable, or a ZIP code with no ZCTA. PO box and single-address ZIP codes have no ZCTA, so they cannot be placed from the ZIP alone. When the geocoder is down, those rows stay in the list and the button retries them on the next click.

How the ranking is measured

Distances are great-circle lengths on a sphere of radius 6,371.0088 km, shown in miles and kilometers, and the list is sorted shortest first. The bearing is the initial compass heading from the start to each location, true north rather than magnetic. A ZIP code is measured to one point inside its area, so for a large rural ZIP the distance to a particular house can differ by several miles.

Straight-line order is a good first cut for picking the nearest store, office, or job site, but it is not drive time. Run the top few through the crow flies calculator to compare road distance before you commit. The list and the geocoding results stay in your browser; only the start point is saved in the page address.

Questions people ask

How many locations can I rank?

Up to 2,000 lines. Coordinates and ZIP codes rank instantly; addresses are geocoded 25 per click at one per second.

Why is a ZIP code in the Not placed list?

It has no Census ZCTA, usually because it is a PO box or single-address ZIP code. Replace it with a street address or coordinates.

Is this driving distance?

No. The ranking uses straight-line distance on a sphere. Check the closest few by road before deciding.

Can I export the ranking?

Yes. Download CSV saves the rank, name, input, matched location, coordinates, miles, kilometers, and bearing for every placed row.

Sources and data as of

Data as of: ZCTA points from the Census 2024 Gazetteer; addresses from live Photon lookups.

  1. 01Census 2024 Gazetteer, ZCTAs
  2. 02Photon geocoder (OpenStreetMap data)

How every number is computed: methodology. Spotted a wrong figure? Report an error.