Skip to content
Distance & area

Bulk distance calculator

Paste a list of origin and destination pairs, or open your CSV, and get the distance for every row, as the crow flies and by road, ready for Excel.

By the All Map Tools Team

One pair per row, up to 500: the origin and the destination separated by a semicolon, a tab or a comma (“Dallas, TX; Houston, TX”). You can paste two spreadsheet columns or open a CSV (if it has more columns, keep its header row). Towns and cities, US ZIP codes, addresses, Spanish municipalities and coordinates all work.

5-digit numbers are

Loading the map…

Example Eight pairs of US cities and ZIP codes. Paste your pairs (or open a CSV) and press “Calculate distances”.

Driving distance

Rows that start from the same place go together in one OSRM request (up to 50 destinations); the rest, one per second. You can stop at any time and download what’s done.

RowOriginDestinationStraight lineBearingStatus
2New York, NYBoston, MA——Not looked up
3Chicago, ILMilwaukee, WI——Not looked up
4Los Angeles, CASan Diego, CA——Not looked up
59410395814——Not looked up
6Dallas, TXHouston, TX——Not looked up
7Seattle, WAPortland, OR——Not looked up
8Denver, COColorado Springs, CO——Not looked up
91000119103——Not looked up

Keep going with your distances

More tools for many distances at once.

Download the result

The CSV keeps your columns as they are and adds the new ones after them, comma-separated, ready for Excel or Google Sheets. The file is read in your browser: it isn’t uploaded anywhere.

How to use it

  1. Paste or open your pairs

    One per row, up to 500: origin and destination separated by a semicolon, a tab or a comma. Copy two columns from a spreadsheet, or open a CSV with more columns and pick which ones to use.

  2. Get the straight-line distance

    Towns, ZIP codes and coordinates show up right away; addresses are looked up one per second. Each row tells you if something wasn’t found.

  3. Add the road if you need it

    Get the driving, cycling or walking distance and time. It runs bit by bit with a progress count, and you can stop it without losing what’s done.

  4. Download the CSV

    You get your own table with the new columns after it: what was found, coordinates, straight line, bearing, road distance, time and status.

What it’s for

  • Mileage reimbursement

    The miles for every trip on an expense sheet, all at once.

  • Shipping and logistics

    The distance of each shipment between warehouse and customer, for rates, delivery times or routes.

  • HR and commutes

    How long each employee’s commute is, to plan shifts or remote work.

  • Research and data

    Distances between pairs of ZIP codes, counties, towns or coordinates for an analysis.

How it’s calculated

Each place is looked up only once, even if it appears in many rows: coordinates are read as they are, ZIP codes come from the US Census, towns and cities from our own gazetteer (GeoNames, Census, IGN and INE), and addresses from Photon (OpenStreetMap) and CartoCiudad (Spain’s IGN), one per second.

The straight line is the geodesic on the WGS84 ellipsoid, calculated with GeographicLib, with the initial bearing. By road, OSRM gives the distance and time of the fastest path on the OpenStreetMap road network. Rows that start from the same origin are requested together, in a single one-to-many request (up to 50 destinations), and each request waits at least one second after the previous one, as FOSSGIS’s public server asks.

How long the road takes

requests ≈ distinct origins × ⌈destinations ÷ 50⌉

With 500 rows leaving from the same warehouse, 10 requests do it (about 10 seconds); with 500 different origins, 500 requests (about 9 minutes).

Your table, as it was

The download is your own table: the same columns in the same order, with the header row if it had one, and the new columns after them. If you paste without a header, the columns are called “Origin” and “Destination”.

If a row can’t be calculated, it stays in the table with the reason in the “Status” column: the origin or destination is missing, one of them wasn’t found, or the search didn’t respond.

Limits

Up to 500 rows per batch. The address and routing services are free and public: addresses are looked up one per second, and anything already looked up isn’t requested again while you stay on the page. For more rows, split them into several batches.

Frequently asked questions

How do I calculate distances between many addresses at once?

Paste one pair per row, with the origin and destination separated by a semicolon (“123 Main St, Denver, CO; 500 Pearl St, Boulder, CO”), and press “Calculate distances”. Then download the CSV.

Can I use my Excel sheet?

Yes: copy the two columns and paste them, or save the sheet as CSV and open it here. If it has more columns, pick which one is the origin and which the destination; the others come back as they were in the download.

How many rows fit?

Up to 500 per batch. The straight line shows up right away for rows with towns, ZIP codes or coordinates; addresses are looked up one per second.

How long does the driving distance take?

It depends on how many different origins there are: rows leaving from the same place go together in one request, and each request takes about a second. You can stop at any time and download what’s done.

What if a row isn’t found?

It stays in the table with the reason under “Status”. Fix the place (add the state, the province or the country, or use coordinates) and calculate again: places already found aren’t looked up again.

Does it work with ZIP codes?

Yes, US ZIP codes are placed with Census data, and Spanish postal codes work too, through CartoCiudad. Choose what 5-digit numbers are in the option that appears under the list.

Related tools

All tools

Sources