Detour calculator

A drive from A to B, and a stop at C on the way. The tool routes both ways and tells you how much the detour adds, in distance and in time.

How to use it

  1. Set the start and the destination of the drive.
  2. Set the stop you are thinking of adding.
  3. Choose drive, cycle or walk. The direct route is drawn in grey and the route through the stop in blue.
  4. Read the extra distance and time in the first card.

5 practical uses

  1. Decide whether a stop for fuel, food or a viewpoint is worth the extra miles.
  2. Check what a school drop-off adds to the commute.
  3. Compare two candidate stops on the same journey.
  4. Cost the extra distance of a pickup for a shared ride.
  5. Show a customer the delivery surcharge for an off-route address.

The maths behind it

Two routes are found with the engine's A* search: A to B, and A to C to B as one route with a via point. The detour is the difference of their lengths and times; the share is that difference divided by the direct length.

Notes

Both routes are the fastest route the engine finds for the mode, with typical speeds and no live traffic. A stop right on the direct route adds almost nothing; a stop across a river or off a motorway adds the round trip to it. The extra time does not include the time spent at the stop.

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.

Questions and answers

Does the extra time include the stop itself?

No. It is the difference between the two routes only. Add the time you will spend at the stop.

Why is the detour so large for a stop that looks close?

The stop may be across a river, off a motorway with no nearby exit, or on a one-way system. The route has to go there and back.

Can I add more than one stop?

Not here. For a longer chain of stops use the multi-stop distance tool.

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/detour-calculator?embed=1" width="100%" height="760" style="border:0;border-radius:12px;max-width:100%" loading="lazy" allow="geolocation; fullscreen; clipboard-write" title="Detour calculator – 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.