Introduction
The ZIP Code Distance Calculator tells you how far apart two places are. Type a ZIP code, a Canadian postal code, or a city name from the drop-down list in each box. The tool finds both spots on the map and calculates the distance between them.
You get three answers right away:
- Straight-line distance: the direct path, as the crow flies.
- Driving distance: how far you really drive on roads.
- Driving time — how long the trip takes at your chosen speed.
You can switch between miles and kilometers with one click. The results update at once. A chart compares the two distances, and a map shows both points with a dashed line for the straight path and a solid line for the road route.
Want to see the math? The step-by-step section shows how the great-circle (haversine) formula turns latitude and longitude into a distance. This helps with trip planning, shipping costs, job searches, moving, or just checking how far away a friend lives.
How to use our ZIP Code Distance Calculator
Enter two places (ZIP codes, postal codes, or city names) and the calculator shows the straight-line distance, the driving distance by road, and how long the drive takes.
Location A: Type your start point. You can use a US ZIP code like 90210, a Canadian postal code like M5V 3L9, or a city name. Pick a match from the drop-down list. Only the cities in the list are recognized, and a town whose name matches or is part of a listed city's name is matched to that city, so check the match shown under the box. For any other town, use its ZIP code or postal code instead. A green check means the place was found.
Location B: Type your end point the same way. It must be a different place than Location A.
Swap Locations: Click the round arrow button to trade Location A and Location B.
Distance Unit: Choose Miles or Kilometers. The results change right away.
Average Driving Speed: Type the speed you expect to drive, then pick mph or km/h. This is used only to guess your driving time.
Calculate: Click this button to get your results, the step-by-step math, a bar chart, and a map with both points.
Reset: Click this to empty both fields, set the speed back to 60 mph, and start a new search.
ZIP Code Distance: What It Means
A ZIP Code is a code the U.S. Postal Service created to coordinate mail handling and delivery, and the USPS assigns ZIP Codes to delivery routes.1 Canada uses postal codes instead: six characters of letters and numbers in the form ANA NAN.2 An example is M5V 3L9. To measure a distance, the tool uses a center point with a latitude and longitude for each code's general area. When you measure the distance between two ZIP codes, you are really measuring the distance between those two center points.
Straight-Line Distance vs. Driving Distance
There are two ways to answer "how far is it?"
- Straight-line distance (also called "as the crow flies" or great-circle distance) is the shortest path over the curved surface of Earth.3 Nothing blocks it: no roads, rivers, or mountains.
- Driving distance follows real roads. It is almost always longer, because roads bend, curve, and go around things.6
How much longer depends on the roads. For trips from every census tract in the United States to the nearest hospital, the road distance was about 1.4 times the straight-line distance, and it ran longest near shorelines, on islands, and near lakes, rivers, and mountains.6 When the routing service finds no road between the two places, such as Honolulu and Los Angeles, the tool shows no driving distance or driving time. When the live routing service is unavailable, the tool estimates the ratio as 1.15 + 0.30 × e−d/150 (d in km), so short trips get the biggest factor and long trips get closer to 1.15. An estimated ratio depends on distance alone, so it says nothing about the roads on your route.
How the Straight-Line Math Works
The math uses the haversine formula of spherical trigonometry.3 It takes the latitude and longitude of both points, finds the angle between them at the center of the Earth, and multiplies that angle by Earth's mean radius, about 6,371 km.4 That is about 3,959 miles. This works better than flat-map math because Earth is a ball, not a sheet of paper. On a flat grid you would instead use the Pythagorean theorem.
Bearing and Midpoint
The bearing is the compass direction you would head at the start of the trip, from 0° (north) to 360°. On a long trip the direction slowly changes as you follow the curve of the Earth, so the starting bearing is called the "initial bearing." The midpoint is the halfway spot along that curved path, handy if two people want to meet in the middle.
Driving Time
Driving time is simple: road distance divided by your average speed. A 300-mile drive at 60 mph takes 5 hours. Real trips take longer because of traffic, red lights, gas stops, food, and weather. Add extra time when you plan.
Why People Measure ZIP Code Distance
- Shipping: carriers set rates by zones based on how far a package travels.
- Job hunting: checking how long a daily commute would be.
- Moving: comparing towns and figuring out truck mileage.
- Business: picking delivery areas or store locations.
- Trip planning: estimating fuel cost and time on the road.
Things to Keep in Mind
A ZIP Code covers the addresses on its delivery routes, not a single dot. Big rural ZIP Codes can cover hundreds of square miles, so the center point may sit many miles from your real address. If a code is not in the tool's list and the live postal lookup fails, the tool uses a code from its list that starts with the same characters and marks the match as approximate. That point can be hundreds of miles from the place you typed. Some delivery units are single high-rise buildings or individual business locations with high mail volumes.1 For short trips, a tool that works from full street addresses gives a better answer. For long trips, ZIP-to-ZIP distance is close enough.