Add the stops and the tool finds the order that makes the trip shortest, by road or as the crow flies. Fix the start, fix the end, or make it a round trip.
How to use it
Add the stops, up to 12. The first stop is the start.
Choose straight line or a road mode, and whether the trip is a round trip, has a fixed end, or is open.
Press Optimize. The best order, the legs and the saving over your order appear, and the route is drawn.
Copy the link to keep the stops.
5 practical uses
Order a day of deliveries, visits or viewings to save miles.
Plan a sightseeing day so the walk is as short as possible.
Order the pickups of a school run or a car pool.
Plan a service engineer's calls with the depot as start and end.
Order sample sites or inspections across a region.
The maths behind it
With n stops the problem is the travelling salesman problem, which has (n−1)!/2 possible round trips: for 12 stops, about 20 million. The page uses a nearest-neighbour construction followed by 2-opt improvement, which repeatedly reverses a segment of the route when d(a,c) + d(b,d) < d(a,b) + d(c,d), from several starting points, and keeps the best. The distances are haversine or, in the road modes, the engine's road distances.
It builds a route by always going to the nearest unvisited stop, then untangles it by swapping pairs of legs until no swap makes it shorter (2-opt), from several starting points. For a dozen stops this finds the true optimum almost always.
Why the limit of 12 stops?
For the road modes the engine returns the distance between every pair of stops, which grows with the square of the count. Twelve keeps the request quick and the table readable.
Does it optimise for time or distance?
For distance. In the road modes the road distance between each pair is used; the time shown is that of the final route.
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.
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.