Distance Matrix Calculator
Paste up to 10 places — one per line — and get a complete N×N straight-line distance matrix in miles and kilometers, downloadable as CSV.
Straight-line haversine distances between each pair. Geocoding is sequential (about one lookup per second) to respect Nominatim's fair-use policy.
How to use this tool
Enter 2 to 10 places, one per line — cities, landmarks, or addresses.
Each place is geocoded, then every pair's distance is computed.
Download the full table as CSV for spreadsheets.
What people use this tool for
Compare distances between depots and drop-off points.
See which venue is closest to all attendees' cities.
Generate pairwise distance tables for spatial analysis.
How it's calculated
Each line is geocoded sequentially via OpenStreetMap Nominatim (respecting its usage policy). Pairwise great-circle distances use the haversine formula. Diagonal cells are zero; the matrix is symmetric.
Related tools and resources
Frequently asked questions
How many places can I include?
Between 2 and 10 places, one per line.
Are these driving distances?
No — straight-line distances. Multiply by roughly 1.2-1.4 to estimate road distance.
Why does geocoding take a few seconds?
Each place is looked up one at a time to respect Nominatim's fair-use policy.
What does the CSV contain?
A square matrix with place names as row and column headers, distances in the chosen unit.
Can I change between miles and kilometers?
Yes — toggle the unit and both the table and CSV update.
What if a place is not found?
Unmatched lines are listed so you can correct the spelling and retry.
Is the matrix symmetric?
Yes — the distance from A to B equals B to A, so the table mirrors across the diagonal.
Can I use coordinates instead of names?
Yes — lines like '40.7128, -74.0060' are parsed directly without geocoding.