Skip to content
Distance & area

Distance matrix

Paste a list of places and see the distance between every pair, by road and in a straight line, plus the travel time by car, by bike or on foot.

One per line, up to 50: a town, an address, or coordinates with a name (“Warehouse, 39.7392, -104.9903”).

Travel mode

Loading the map…

Routing: FOSSGIS OSRM and Valhalla · data © OpenStreetMap contributors Missing a road? Fix it on OpenStreetMap

Example Six US cities, by car. Change the list and press “Make the table”.

Farthest pair
2,794mi
New York, NY – Los Angeles, CA · by road
Closest pair
373 mi
Los Angeles, CA – Phoenix, AZ
The road adds
+16%
on average over the straight line
Places · Pairs
6 · 15

Driving distance, in mi. Each row is from that place; each column is to that place.

Driving distance, in mi. Each row is from that place; each column is to that place.
Places1New York, NY2Los Angeles, CA3Chicago, IL4Houston, TX5Phoenix, AZ6Denver, CO
1 New York, NY—2,7947911,6282,4101,781
2 Los Angeles, CA2,794—2,0181,5483731,016
3 Chicago, IL7902,018—1,0861,7551,005
4 Houston, TX1,6281,5481,082—1,1751,034
5 Phoenix, AZ2,4103731,7541,175—821
6 Denver, CO1,7811,0171,0061,035821—

Times assume clear roads at each road’s normal speed: they don’t include traffic, lights or stops. By car, the route may include ferries (to an island, for example): the crossing counts toward the distance and time.

Keep going with your places

More tools for comparing distances.

Save or share the table

How to use it

  1. Paste your list

    Type or paste up to 50 places, one per line: towns, addresses or coordinates. You can copy them straight from a spreadsheet column.

  2. Make the table

    Press “Make the table”. Places are looked up one at a time, and you’ll see which ones weren’t found so you can write them another way.

  3. Pick what to see and download it

    Switch between road, straight line and time, in miles or kilometers. Download the table as CSV, or every pair as a list.

What it’s for

  • Choosing where to meet

    Compare how far each person would travel to several possible places before you decide.

  • Deliveries and sales calls

    See at a glance which customers, stores or warehouses are close to each other.

  • Mileage and expenses

    Get the miles between offices or job sites for mileage reimbursement.

  • Trips and school

    Build a mileage chart for a road trip, or one of state capitals for a class.

How it’s calculated

Each place is looked up with Photon (OpenStreetMap data), keeping the result that best matches what you wrote. Coordinates are read as they are.

The straight-line distance is the geodesic, the shortest path on the WGS84 ellipsoid, calculated with GeographicLib. Road distance and time come from OSRM, on the OpenStreetMap road network, running on FOSSGIS’s public server, in a single request for the whole table.

By road, going and coming back may not be the same distance: a one-way street or a freeway exit changes the path. That’s why the table has one row for each origin and one column for each destination.

How many distances you get

n places → n × (n − 1) ÷ 2 pairs

With 6 places there are 15 pairs; with 50, 1,225. By road, both directions of each pair are calculated: 2,450 distances with 50 places.

Straight line vs. road

The road is always longer than the straight line, and by how much depends on the terrain: in the example, it’s 373 miles by road from Los Angeles to Phoenix and 2,794 from New York to Los Angeles. The table tells you how much longer the road is, on average, between your places.

By car, the route may include ferries where there’s no other way, and the crossing counts toward the distance and time. A place more than 30 km (19 miles) from any road shows as “no route”.

Limits

Up to 50 places per table. The address and routing services are free and public, so places are looked up one at a time, roughly one per second, and anything already looked up isn’t requested again while you stay on the page.

Frequently asked questions

How many places can I add?

Up to 50, which gives 1,225 pairs. If you paste more, the last ones are left out and you’ll get a notice.

Why isn’t A to B the same as B to A?

Because by road the way there and the way back can differ: one-way streets, freeway on- and off-ramps, or traffic circles. In a straight line, the distance is the same both ways.

What happens to places it can’t find?

They’re left out of the table and listed so you can fix them. Adding the state or the country usually does it (“Springfield, IL”), or you can write their coordinates.

Can I paste a spreadsheet column?

Yes: copy the column and paste it, and each cell becomes a place. For coordinates with a name, separate them with commas: “Warehouse, 39.7392, -104.9903”.

Does the time include traffic?

No: it’s the time on clear roads at each road’s normal speed. You can also work it out by bike or on foot.

How do I open the table in Excel?

Download it as CSV. “CSV (pairs)” has one row per pair with the straight line, the road distance and the time, ready to filter and sort.

Related tools

All tools

Sources