Free Distance Matrix Calculator
Every origin against every destination in one go, with a heatmap showing what is nearest. Up to 5 by 5. No sign-up.
Working out every pair
A 5 by 5 matrix is 25 routes, so give it a moment.
Need larger matrices?
The Excel Distance Matrix Calculator handles hundreds of locations with heatmap coloring, traffic data, and no daily limits. Works directly in your spreadsheet.
Get the Excel Tool$69 once. Lifetime updates.
- Free, no sign-up
- 25 pairs in one calculation
- Real road distances from Google
- Heatmap shows the nearest at a glance
How it works
Three steps, and the first one is usually a paste.
Paste your addresses
Up to 5 on each side, one per line. Full addresses, cities, postcodes, landmarks or coordinates all work, and you can mix them.
Pick the settings
Drive, walk or cycle. Kilometres or miles. Leave live traffic on if you want drive times for the road as it is right now.
Read the matrix
Every pair in one table, shaded so the nearest stands out. Switch between distance and travel time, and download the lot as a CSV.
Who uses a distance matrix
Anywhere the question is "which of these is closest to which".
Logistics and delivery
Compare several warehouses against a set of customers, and see which fulfilment centre serves each delivery zone with the least driving.
Sales territory planning
Put travel times between reps and prospects side by side, and draw territories that cut the hours spent in the car rather than the miles on a map.
Property and site selection
Weigh several possible locations against the places that matter, offices, schools, airports, and compare the commutes in one table.
Fleet and job scheduling
Measure depots against job sites before assigning vehicles, so the nearest van gets the job instead of whichever one was free.
Reading your matrix
Every route comes from the Google Routes API, the engine behind Google Maps.
Rows and columns
Each row is one of your From addresses, each column one of your To addresses, and the cell where they meet is that journey. The CSV downloads in the same shape.
What the colours mean
Each column is shaded on its own, green for the nearest origin and red for the furthest, so you can see which of your From addresses serves each destination best.
Distance or travel time
The toggle above the table swaps between them instantly, and so does changing miles to kilometres. Neither costs another one of your three daily calculations.
Real roads, worldwide
Distances follow actual roads rather than straight lines, anywhere Google Maps has coverage. A pair it cannot route shows as N/A instead of a wrong number.
Online tool or Excel workbook?
Use this page for a quick 5 by 5. Use the Excel tool when the matrix is bigger than that, or the locations already live in a spreadsheet.
| This page, free | Excel Distance Matrix Calculator | |
|---|---|---|
| Matrix size | 5 by 5, 25 pairs | Hundreds of locations |
| Runs a day | 3 | As many as your Google quota allows |
| Where it runs | This page | Inside your own workbook |
| Heatmap | Yes, shaded per column | Yes, built in and toggleable |
| Travel modes | Drive, walk, cycle | The same three |
| Google key | Not needed | Your own, 10,000 free lookups a month |
| Price | Free, no sign-up | $69 once |
$69 once. Lifetime updates.
Frequently asked questions
The questions that come up most often.
A table showing the distance, or the travel time, between every combination of origin and destination. Three warehouses against four customers is twelve journeys, and a matrix gives you all twelve at once instead of twelve separate lookups.
Yes. No account, no sign-up, no card. You get 3 calculations a day, each covering a 5 by 5 matrix, so 25 pairs at a time.
Five on each side, so 25 pairs in one calculation. For bigger matrices the Excel Distance Matrix Calculator handles hundreds of locations using your own Google key.
Full street addresses, city names, postcodes, landmarks, or latitude and longitude. Mix them freely: "Eiffel Tower" and "48.8584, 2.2945" both work, in the same list.
Each column is shaded on its own. Green marks the shortest distance or time in that column and red the longest, so for any destination you can see at a glance which of your origins is nearest.
Yes, with the toggle above the table, and it happens instantly because both numbers come back in the same response. Changing miles to kilometres works the same way. Neither uses another of your three daily calculations, and the CSV always contains both.
The Google Routes API, the same routing data behind Google Maps, so distances follow real roads instead of measuring in a straight line.
No. They go to Google to work out the routes and are not kept on our servers. Nothing is uploaded and nothing is saved.
Google gives 10,000 free elements a month and charges $5 per 1,000 after that, and you need a Google Cloud billing account and an API key to use it at all. This page gives you the same routing data for 25 pairs a time, three times a day, with no key and no billing account.
The Excel Distance Matrix Calculator uses your own Google key, so there is no size limit, and it brings the heatmap and traffic data with it. Google's first 10,000 lookups a month are free.
Need Larger Distance Matrices in Excel?
The Excel Distance Matrix Calculator processes hundreds of locations directly in your spreadsheet.
Get the Excel ToolUses your own Google Maps key, 10,000 free lookups a month.
Google, Google Maps and Excel are trademarks of Google LLC and Microsoft Corporation. This site and its tools are not affiliated with or endorsed by either.
