PlainTools

Distance Matrix Calculator

List up to 20 places and get a table of the road distance and travel time between every pair, or the straight-line distances, ready to download as CSV.

Distance & MeasurementWorldwideSource: OSRM table service over OpenStreetMap (FOSSGIS); VincentyFree, no sign-up

How to build a distance matrix

  1. List the places. One per line, up to 20 — addresses, cities or coordinates.
  2. Choose the travel mode. Driving, cycling or walking.
  3. Build the matrix. Each place is looked up, then one request gets every pair.
  4. Switch the view. Miles, kilometres, minutes or straight-line miles, and download the table as CSV.

What a distance matrix is for

Logistics planning

Feed pairwise road distances into a spreadsheet or optimiser.

Choosing a location

Compare how far a candidate site is from every customer.

Mileage tables

Make a printed distance chart between branches.

Research

Travel times between towns for an analysis.

Event planning

Travel times between venues and hotels.

Field service

Distances between technicians and job sites.

Where the numbers come from

Road distances and times come from the OSRM table service on the FOSSGIS servers, over OpenStreetMap roads, at typical speeds with no traffic. A–B can differ from B–A because of one-way streets and turn rules.

Straight-line distances are Vincenty geodesics on the WGS84 ellipsoid.

Places are found with the Photon geocoder from OpenStreetMap data; check the matched names in the first column.

Frequently asked questions

Why is A to B different from B to A?

One-way streets, turn restrictions and ramps mean the best route is not always the same in both directions.

What does 'no route' mean?

There is no connected road between those points in OpenStreetMap — for example an island without a ferry route mapped.

How many places can I include?

Up to 20 (400 pairs). The free routing service asks for light use.

Can I get the matrix into Excel?

Yes, download the CSV and open it in any spreadsheet.

Does it include traffic?

No. Times assume typical speeds and no delays.

Related tools

As the Crow Flies Distance Calculator

Enter two places and get the straight-line distance between them in miles, kilometres and nautical miles, measured on the WGS84 ellipsoid, with the compass bearing and the route on a map.

Vincenty (1975) geodesic on the WGS84 ellipsoid

Halfway Point Between Two Cities Calculator

Enter two cities or addresses and get the exact halfway point between them — or any split you choose — with the nearest named place and the distance from each side.

Vincenty (1975) geodesic midpoint on WGS84, OpenStreetMap place names

Random Location Generator

Generate truly uniform random coordinates anywhere on Earth, inside a box, or within a radius of a place — with an option to skip open sea and the points shown on a map.

Uniform sphere point picking (MathWorld) with Web Crypto randomness

Radius Map

Draw one or more true-distance circles in miles or kilometres around any address on a map, see the area each covers, and check whether another place falls inside.

Geodesic circles on WGS84 over OpenStreetMap tiles

Bearing Calculator

Enter two places or click a map and get the true and magnetic bearing from one to the other, the bearing on arrival, the back bearing and the constant-heading rhumb line.

Vincenty inverse on WGS84; NOAA/BGS World Magnetic Model 2025

Distance Between Two Places

Enter any two addresses or places and get both the straight-line distance and the driving, cycling or walking distance and time, drawn on a map.

Vincenty on WGS84; OSRM routing over OpenStreetMap (FOSSGIS)