A ZIP code is a delivery route, not a street address, but it does have a center point. That point is enough to answer a shipping or travel question quickly. Enter two ZIP codes and this tool shows the straight-line distance between their centers in miles and kilometers, then the driving distance and time.
How to use the distance between ZIP codes tool
- Enter two ZIP codes. Type both on one line, five digits each, separated by a space or a comma. A ZIP+4 code works too; only its first five digits are used.
- Press Measure distances. The table shows the straight-line distance in miles and kilometers. For one pair, the driving distance and time appear under the answer a moment later.
- Read the answer line. It counts the pairs measured and names the shortest distance. A code without a Census center shows ZIP not found.
- Add more pairs. Put one pair on each line, up to 50 lines, and press the button again. Tick the driving box to add road distance for the first 10 pairs.
- Download the table. Download CSV saves both ZIP codes, the distance in meters and miles, a status for each pair and any driving distance.
Straight-line distance between two ZIP codes
This is the ZIP code distance calculator result from center to center. It uses the WGS84 ellipsoid, so it matches the model used by GPS. For example, ZIP 10001 in New York to ZIP 90210 in Beverly Hills is 2,458.8 miles (3,957.1 km) in a straight line.
| What you see | What it means | What to do |
|---|---|---|
| 2,458.8 mi and 3,957.1 km | Shortest path between the two center points | Use it for a quick separation check or a shipping zone |
| ZIP not found | One of the codes, such as 00501, has no center in the Census file | Check the digits or try a nearby ZIP code |
| No valid ZIP code pairs found | No line had two five-digit ZIP codes with a center | Put two five-digit ZIP codes on each line |
| Same ZIP code twice on a line | The distance is zero | Change one of the codes |
Driving distance and time
For one pair, the tool asks openrouteservice for the driving distance and time between the two ZIP centers, on OpenStreetMap roads at typical speeds. Only the two centers go out, rounded to about 110 meters, through our server. The driving line gives the road distance in miles and kilometers, the time, and how much longer the road is than the straight line. For a list, tick the box to add driving distance for the first 10 pairs.
Drive times don’t include live traffic, closures or stops. When the routing service is busy, the page says that driving distance isn’t available right now; it never guesses one. Across open water, such as Honolulu to Los Angeles, there is no driving route. For a real trip, start from street addresses in the Distance Calculator rather than ZIP centers, and allow time for local roads, traffic and breaks.
Distance for many ZIP code pairs
Paste a list into the box, one pair per line. Each line needs two five-digit ZIP codes, separated by a space, comma, semicolon or tab. The tool measures the first 50 pairs and skips any line without two five-digit codes, such as a header row. The line under the box names each skipped line and says how many lines past the first 50 were left out.
Spreadsheets often drop leading zeros, so 02134 can arrive as 2134; fix those cells before you paste, or the line is skipped. The table lists each pair with its distance in miles and kilometers, and a code without a center shows ZIP not found. Tick Include driving distance for the first 10 pairs to add the road distance and time to the first 10 rows; the rest say not requested. The CSV download adds the distance in meters, a status column and the driving columns, with a credit line for the routing data. Select the table if you need a quick paste into a document.
The ZIP code distance formula
The exact result comes from the inverse geodesic problem on the WGS84 ellipsoid. For a spreadsheet, the haversine formula is close:
d = 2R · asin(√(sin²(Δφ/2) + cos φ1 · cos φ2 · sin²(Δλ/2)))
Use R = 3,958.8 miles and convert latitude and longitude to radians. On the New York to Los Angeles pair, the sphere result lands about 0.22 percent short of the ellipsoid result, or about 5 miles. That gap is why the tool uses the ellipsoid and why another calculator can show a different number. The center points come from the Census Gazetteer.
Why a ZIP center isn’t an address
The center is an internal point chosen by the Census Bureau, not a building or a post office. A rural ZIP code can cover many square miles, so its center may sit far from any house. A ZIP code used only for PO boxes may have no area at all. For door-to-door directions, enter street addresses in the Distance Calculator. To see every ZIP code within a distance of one place, use the ZIP Code Radius tool.
ZIP code areas behind these points are Census ZIP Code Tabulation Areas, which approximate USPS delivery areas. Some ZIP codes, such as PO boxes, have no area. To confirm a mailing ZIP code, use the USPS ZIP Code Lookup. ZIP Code is a trademark of the United States Postal Service. Handy Map Tools is not affiliated with or endorsed by USPS.
Straight-line distances are measured on the WGS84 ellipsoid between the center points. Drive times come from the openrouteservice routing engine with OpenStreetMap roads and typical speeds. They don’t include live traffic, closures or stops. A ZIP center is not a street address.