Driving distance

The distance by road between two places, and how long the drive takes, next to the straight line between them. Switch to cycling or walking for those routes.

How to use it

  1. Type the start and the destination, or use your location, or click the map.
  2. Choose drive, cycle or walk. The route is drawn and the distance and time appear.
  3. Drag either pin to change the trip. Press Swap to reverse it.
  4. Copy the link to share the route.

5 practical uses

  1. Plan a road trip leg and the fuel it needs.
  2. Check the drive to a job site, a client or a venue before quoting.
  3. Compare a drive with a cycle or a walk for the same trip.
  4. Estimate delivery times between a depot and a customer.
  5. Find how much a route detours around water or mountains.

The maths behind it

The engine finds the fastest route with an A* search over the road graph, where each road segment costs its length divided by the speed the engine assigns to that road type, plus turn and junction penalties. The distance is the sum of the segment lengths of that route; the straight line is the haversine distance; the detour factor is their ratio.

Reading the result

The road distance is the length of the route the engine finds, which is the fastest, not always the shortest. The time uses typical speeds for each road type with no live traffic, so it is a fair-weather, quiet-road estimate. The straight line is the great-circle distance, and the detour factor is the road distance divided by it: 1.2 to 1.4 is normal; higher means water, mountains or a sparse road network in the way.

Where the routes come from

Routes come from Valhalla, an open routing engine on OpenStreetMap data run by FOSSGIS, the German OpenStreetMap association. It is a public, best-effort service: it can be slow at busy times, and a route through a badly mapped area is only as good as the map. Nothing else about you is sent with the request.

For several stops in a row see the multi-stop distance; for the effect of one extra stop, the detour calculator.

Questions and answers

Is the time realistic?

It uses typical speeds for each road type without live traffic, so it is a quiet-road estimate. Add time for traffic, stops and weather.

What is the detour factor?

The road distance divided by the straight-line distance. Values from 1.2 to 1.4 are normal; a higher value means water, mountains or a sparse road network in the way.

Where do the routes come from?

From Valhalla, an open routing engine on OpenStreetMap data, run as a public service by FOSSGIS. Nothing but the coordinates is sent.

Embed this tool on your website

Paste this code where the tool should appear. It shows the tool alone, without this page's text, and links back here. It is free to use; the map data credit stays on the map.

<iframe src="https://waymorphic.com/tools/driving-distance?embed=1" width="100%" height="760" style="border:0;border-radius:12px;max-width:100%" loading="lazy" allow="geolocation; fullscreen; clipboard-write" title="Driving distance – Waymorphic Map"></iframe>

Change height to suit your page. To open the tool with a place already set, add the settings from this page's address bar (the part after #) to the end of the src. The embedded tool asks the visitor's browser for their location only when they press the button, and the allow attribute lets that work inside the frame.