Skip to content
Menu
Esc

Distance Between ZIP Codes

Enter two ZIP codes to see the straight-line distance between their centers plus the driving distance and time. Paste up to 50 pairs to check many at once.

Distance between ZIP codes tool

Enter ZIP code pairs to measure straight-line and driving distance.

ZIP internal points · WGS84 ellipsoid · driving: openrouteservice

One pair always gets its driving distance. Driving requests send only the two ZIP centers, rounded to about 110 m, to openrouteservice through our server.

Distances use ZIP Code Tabulation Area internal points, not mailbox addresses. For door to door, use the Distance Calculator.

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

  1. 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.
  2. 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.
  3. Read the answer line. It counts the pairs measured and names the shortest distance. A code without a Census center shows ZIP not found.
  4. 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.
  5. 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.

Frequently asked questions

How do I find the distance between two ZIP codes?

Type both ZIP codes on one line in the box, separated by a space or a comma, and press Measure distances. The straight-line distance between the two ZIP centers appears in miles and kilometers, and the driving distance and time follow a moment later. For more pairs, add one pair per line, up to 50 lines, and press the button again. Download CSV saves the table.

Is it straight-line or driving distance?

Both. The table gives the straight-line distance between the two ZIP center points, measured on the WGS84 ellipsoid that GPS uses. For one pair, the driving distance and time come from openrouteservice, on OpenStreetMap roads at typical speeds and without live traffic. For a list, tick the box to add driving distance for the first 10 pairs.

How accurate is it?

The math is precise for the center points, but a ZIP center is not a street address. A large rural ZIP can put the center miles from a specific building. The straight line uses the WGS84 ellipsoid. For a door-to-door answer, use street addresses in the Distance Calculator.

Can I do many ZIP codes at once?

Yes. Paste one pair per line in the box, up to 50 lines. Separators can be spaces, commas, tabs or semicolons. Each ZIP code needs all five digits, so restore leading zeros that a spreadsheet dropped, such as 02134 for 2134. Lines without two five-digit codes are skipped. Tick the box to add driving distance for the first 10 pairs, then download the results as CSV.

Can I calculate ZIP code distance in Excel?

Yes. Download the CSV and import it into Excel or Google Sheets with the ZIP columns set to text, so leading zeros survive; the file has both ZIP codes and the distance in meters and miles. To compute your own, look up the two center points on the ZIP Code Map and use the haversine formula shown on this page, which is close to the ellipsoid result.

Does it work for Canadian postal codes?

No. This tool covers US ZIP codes only. Canadian postal codes use a different format and a different data set. For any two places outside the United States, use the Distance Calculator, which accepts addresses, cities and coordinates and measures the straight-line distance between them.

Why is driving longer than the straight line?

Roads rarely run in a straight line. They follow terrain, rivers, city grids and bridges, so the driving distance is longer than the straight line between the same ZIP centers. The driving line shows the gap as a percentage. It is largest where water, mountains or a sparse road network sit between the two places, and across open water there is no driving route at all.

  • Distance Calculator

    Distance between any two places, addresses, ZIP codes or coordinates: straight-line (geodesic on the WGS84 ellipsoid) and…

  • ZIP Code Radius

    Enter a ZIP code or address and a radius to list every ZIP code whose center falls inside the circle, with distances, a CSV and more.

  • ZIP Code Map

    Interactive US ZIP code boundary map: search a ZIP, city or address, or click any spot to see its ZIP code area, county, nearby ZIPs and more.

  • How Far Can I Drive?

    Pick a start point and a drive time to see the area you can reach by car on real roads (openrouteservice isochrones on…

  • Measure Distance on a Map

    Click points on a street map to measure a straight-line path in miles or feet and kilometers or meters.

All ZIP and area code tools

Built and checked by Handy Map Tools. Each tool names its method and data source, and every map page lists its credits.

Updated · How we measure · Report a problem