ZIP Code Distance Calculator

How far apart two places are, the drive, the time difference, and the two compared side by side.

Windsor, ON N9A 7B3 is about 2.3 miles southeast of Detroit, MI 48201

In a straight line between the centers of the two codes: 2 miles (4 km).

Straight line2 mi4 km
By roadFinding the drive…Mapbox, no traffic
DirectionSoutheastheading 155° at the start
Time differenceSame timeall year
A Detroit, MI 48201 B Windsor, ON N9A 7B3 Straight line The drive

A ZIP Code is an area, not a point: for places this close, two addresses can be nearer or farther apart than the centers are.

Ask your AI assistant about both places. Connect Claude or ChatGPT in a few steps. Try a Question

Detroit and Windsor side by side

Census figures are for U.S. ZIP Codes only, so a Canadian postal code has none to compare.

MeasureA DetroitB Windsor
CityDetroit, MIWindsor, ON
CountyWayne County–
Time zoneEasternEastern
Metro areaDetroit-Ann Arbor-Flint, MI CMSA–
ZIP Code typeStandard–
Area codes248, 313, 586–
Land area1.9 sq mi–
Addresses that get mail12,726–

Ask your AI assistant about these two places

Connect Claude or ChatGPT to our ZIP Code data, then ask questions in plain English. No sign-up with us needed.

Once you're connected, try this:
“How far is Windsor, ON N9A 7B3 from Detroit, MI 48201, in which direction, and what is the time difference?”

This question answers in full without a key.

New to this? We'll walk you through it, one step at a time.

Developer tools: Claude Code, Cursor, VS Code, Codex
Questions about these two places (full answers need a free API key)
“What are the ZIP Codes within 10 miles of N9A 7B3?”
“What county, metro area and area codes is N9A 7B3 in?”
Get a Free API Key 2,500 credits a day, free. Or see what the API returns below.

Powered by the ZIP Codes API

The distance, the direction and both time zones above came from one call to the ZIP Codes API /v2/distance endpoint. Each place's facts and Census figures came from one /v2/zip call each, and the API has the same figures for any year from 2011 to 2024.

This comparison used 6 credits; a free key includes 2,500 a day.

Developers: see the exact request
curl -H "X-Api-Key: YOUR_KEY" "https://api.zip-codes.com/v2/distance?from=48201&to=N9A+7B3"
View the JSON response

The real /v2/distance response for this pair. Coordinates are rounded to 3 decimals here; the API returns full precision.

{
  "success": true,
  "request": {
    "from": "48201",
    "to": "N9A 7B3"
  },
  "results": [
    {
      "success": true,
      "input": {
        "from": "48201",
        "to": "N9A 7B3"
      },
      "from": {
        "country": "US",
        "code": "48201",
        "code_type": "ZIP",
        "city": "Detroit",
        "state": "MI",
        "county": "Wayne",
        "location": {
          "lat": 42.346,
          "lon": -83.059
        },
        "timezone": {
          "source": "timezone-boundary-builder",
          "product": "Time zone boundaries (with oceans)",
          "attribution": "Time zone boundaries \u00a9 OpenStreetMap contributors, timezone-boundary-builder (ODbL); time zone rules: IANA tz database",
          "iana_name": "America/Detroit",
          "name": "Eastern",
          "abbreviation": "EST",
          "abbreviation_dst": "EDT",
          "utc_offset": -5,
          "utc_offset_dst": -4,
          "observes_dst": true
        },
        "input_type": "code"
      },
      "to": {
        "country": "CA",
        "code": "N9A 7B3",
        "code_type": "Postal",
        "city": "Windsor",
        "state": "ON",
        "county": "Essex",
        "location": {
          "lat": 42.317,
          "lon": -83.04
        },
        "timezone": {
          "source": "IANA Time Zone Database / timezone-boundary-builder",
          "product": null,
          "attribution": null,
          "iana_name": "America/Toronto",
          "name": "Eastern",
          "abbreviation": "EST",
          "abbreviation_dst": "EDT",
          "utc_offset": -5,
          "utc_offset_dst": -4,
          "observes_dst": true
        },
        "input_type": "code"
      },
      "distance": {
        "miles": 2.25,
        "km": 3.62
      },
      "bearing": 154.8
    }
  ],
  "meta": {
    "credits": {
      "used": 1
    }
  }
}
Add distances like this to your app
  • Straight-line miles and kilometers between any two ZIP Codes, ZIP+4 Codes or Canadian postal codes
  • The compass direction and each place's time zone, with daylight saving time
  • Each place's facts and Census figures, 2011 to 2024
  • Batch up to 100 distances per call (paid plans)
  • Free key: 2,500 credits a day
Get a Free API Key Email This to My Developer