Home › Driving Distance Calculator
Driving Distance Calculator
Enter any two places and this tool finds the real road route between them — the actual driving distance in miles and kilometres, a traffic-free drive time, the round-trip figures, and the route drawn on the map.
That matters because the number you plan fuel, time and money around is rarely the number a straight line on a map suggests. Roads bend, detour and funnel through junctions, bridges and town centres, and this page is built to show you the road reality first, while still keeping the straight-line figure beside it for comparison.
How to use this calculator
- Type your starting place in the From field. A town, city, postcode or well-known landmark all work, and typing a few letters brings up suggestions.
- Check the suggestion you pick. If two places share a name, the state, county or country shown in the suggestion is what tells you that you have the right one.
- Type your destination in the To field in the same way, and check that suggestion just as carefully.
- Press Get driving distance. The route is drawn on the map and the results panel fills with the driving distance, the drive time and the comparison figures.
- Look at the map before you trust the numbers. The pins should sit where you actually intend to start and finish, not merely somewhere in the same town.
- Read the round-trip figures as well as the one-way figures if you are coming back, and use the ratio to judge how direct the route really is.
- If a pin is in the wrong place, change the wording of that place, add a postcode or a nearby landmark, and calculate again.
Note: the two exact inputs are the From field and the To field. Nothing else is required — no units to choose and no route options to set. The tool assumes a car and picks the fastest legal route.
For a short local journey, use the most specific start and finish you can. For a long intercity journey, town names are usually enough to get a reliable planning figure, because a mile or two at either end barely changes a total measured in hundreds of miles.
A worked example: Dallas to Houston
Take a familiar Texas run. The straight-line distance between Dallas and Houston is 224.8 miles, but the driving distance comes out at 238.3 miles — a ratio of about 1.06, which tells you the interstate between them runs almost directly. That is unusually straight for a road route. Compare Denver to Phoenix: 585.5 miles as the crow flies, yet 820.6 miles by road, a ratio of about 1.40. The mountains and the shape of the road network force a long detour, and the driving figure is the only one worth planning fuel, stops and arrival times around. The longest example on this site makes the same point at continental scale: New York to Los Angeles measures 2,445.6 miles in a straight line and 2,794.2 miles by road.
Reading the ratio before you travel is a useful habit. If the tool shows a ratio close to 1.0, the road journey will feel direct and the drive time estimate will usually hold up well. If the ratio climbs towards 1.4 or beyond, expect a winding route, slower average speeds and a journey that feels longer than the map distance suggests. In that case, check whether an alternative route exists, and consider whether the walking distance calculator or a flight makes more sense for part of the trip.
More from the worked examples: reading the ratio
The Dallas to Houston and Denver to Phoenix examples above are worth returning to, because together they teach you how to read any result this tool gives you. Dallas to Houston has a ratio of 1.06, worked out as 238.3 divided by 224.8. In plain English, the road journey adds only about six percent to the direct distance. You can plan that trip with confidence that the map distance and the road distance are telling you almost the same story, and the traffic-free drive time of about 4 hours 13 minutes is a sensible starting point before you add breaks.
Denver to Phoenix is the opposite lesson: its ratio is 1.40, worked out as 820.6 divided by 585.5, so the road journey adds about forty percent. New York to Los Angeles, at 2,794.2 driving miles against 2,445.6 straight-line miles and a ratio of 1.14, sits between the two. Before any long trip, do that one division and you will know which kind of journey you face.
Put together, those three routes show the range clearly: some road connections are nearly direct, and others add a large detour that only the driving figure reveals.
What is driving distance?
Driving distance is the length of a route travelled along roads, measured from the start point to the finish point by following the road network rather than by cutting across country. It is not the distance between two points in space. It is the distance your odometer would record, within the accuracy of the mapped roads, if you followed the chosen route from beginning to end.
That explains two things people find surprising. First, driving distance depends on the route chosen — this tool chooses the fastest legal route for a car. Second, it can change when the road network changes, even though the two places have not moved at all.
Why planning with the straight-line number fails
The first mistake is planning with the straight-line number. Road routes typically run 15–40% longer than the straight line, so a trip that looks like 200 miles on a simple distance search can easily be 260 miles of actual driving. The second mistake is trusting the traffic-free drive time as an arrival promise: it excludes congestion, fuel stops, meal breaks and slow weather, so add a realistic margin, especially on long days. The third is forgetting the return leg — the results panel shows round-trip figures precisely because one-way numbers quietly halve the fuel and time a there-and-back journey needs.
A final practical tip: run the calculation with the exact start and end points you will use, not just the town names. Town-centre to town-centre is a fine estimate, but a suburb on the far side of a city can add twenty minutes and ten miles. If you need coordinates for a specific spot, the latitude and longitude finder will give you them, and our guides cover route planning topics in more depth.
How does this calculator work?
Three separate jobs happen in sequence. The first is locating your places. Each name you type is matched to latitude and longitude coordinates, so the tool knows exactly which point on the Earth each end of the journey refers to. Without that step, a name is only words, and no measurement is possible.
The second job is routing. The coordinates are sent to the OSRM routing engine, which works on OpenStreetMap road data. OpenStreetMap represents roads as connected segments, each with a known length, a road class and information about direction and access. OSRM searches that network for the route with the lowest travel time for a car, respecting one-way streets, turn restrictions and roads that cars are not allowed to use. It is the same broad approach a sat-nav uses, except that it works from the mapped network and normal road speeds rather than from live traffic conditions.
The third job is presentation. Segment lengths are added together to give the driving distance in miles and kilometres, where one mile equals 1.609344 kilometres, and the straight-line distance is calculated separately so you can compare the two.
- Geocode each place name to a latitude and longitude pair.
- Send both coordinate pairs to the OSRM routing engine.
- Search the OpenStreetMap road network for the fastest legal car route between them.
- Add the length of every road segment on that route to get the driving distance.
- Divide each segment's length by its expected speed and add the times to get the traffic-free drive time.
- Calculate the straight-line distance separately and show both figures, the ratio and the round trip.
How the driving distance is worked out
When you press the button, the tool converts each place into coordinates, then sends them to a routing engine built on OpenStreetMap data (OSRM). The engine searches the road network for the fastest legal route for a car — motorways, A-roads, residential streets and everything between — and adds up the length of every road segment along the way. That total is your driving distance, and dividing it segment by segment by each road's expected speed produces the drive time. Our longer explainer, how driving distance is calculated, walks through the process in more detail.
Drive times shown here are traffic-free estimates. They assume you can travel at each road's normal speed the whole way, with no congestion, no fuel stops and no roadworks. For a long trip, add a margin: most drivers average noticeably less than the headline figure once breaks are included. If you are budgeting fuel or claiming expenses, pair this tool with the mileage calculator, which turns the same route into a round-trip total and a money value at your own per-mile rate.
Driving distance is always longer than the straight-line distance between the same two places, because roads must follow the land. The results panel shows both numbers side by side, along with the ratio between them — a quick way to judge how direct the road network is. A ratio near 1.1 means an almost straight motorway run; a ratio above 1.4 usually means mountains, water or a sparse road network is forcing a detour. Some pairs of places have no road route at all — islands, or cities separated by an ocean — and in that case the tool tells you so and shows the straight-line figure instead. For those trips, the air miles calculator is the better starting point.
The method, step by step
There is no single road formula in the way there is a formula for a straight line, because a road route is a chain of many pieces. The method is: choose a legal route, measure every segment on that route, and add the segment lengths together. In symbols, if a route has segments with lengths s1, s2 and so on up to sn, then the driving distance D is D = s1 + s2 + ... + sn. Here D is the total driving distance, each s is the length of one mapped road segment, and n is the number of segments on the route. A motorway junction-to-junction stretch might be one long segment, while a town centre might contribute many short ones.
Drive time is built the same way: for each segment, time is length divided by the expected speed for that road, and the segment times are added together. That is why a shorter route through slow streets can take longer than a longer route on fast roads.
The straight-line comparison figure uses a different method. It treats the Earth as a sphere with a radius R of about 3,958.8 miles (6,371 kilometres) and applies great-circle maths to the two coordinate pairs. That method is explained in full in our haversine formula guide, and it is the right method for the comparison figure — but it deliberately ignores roads, which is exactly why it is not used as the driving answer.
What formula does it use?
Three formulas do all the work on this page, and each one below gets its own card, a plain-English restatement, a definition of every symbol in everyday words, and a worked example with real numbers. The first two build the driving figure and the comparison ratio; the third produces the straight-line figure the ratio is measured against.
In simple words: add up the length of every stretch of road on the chosen route, and that total is the driving distance.
where:
- D is the total driving distance — the number this calculator reports;
- each s is the length of one mapped road segment — one single stretch of road in the map data, such as the piece between two junctions;
- n is simply how many of those segments the chosen route is made of.
Notice the contrast with the third formula below. The straight-line distance has a closed formula: feed in two coordinate pairs and the answer comes out, with no map involved. Road distance has no closed formula at all, because no equation can know where the roads happen to run — it is only ever the sum of road-segment lengths along the path a routing engine picks from the mapped network. That is why this page needs a routing engine for the headline figure and uses pure maths only for the comparison figure.
In simple words: divide the road distance by the direct distance to see how much longer the road journey really is — a ratio of 1.06 means the road route is about six percent longer than the direct line.
where:
- driving distance is the length of the chosen road route, in miles or kilometres, built by the segment-adding formula above;
- straight-line distance is the direct distance between the same two points over the surface of the Earth, in the same unit, worked out with the haversine formula below;
- the detour ratio itself has no unit — it is just a multiplier that tells you how direct the road connection is.
Worked through with this page's examples, step by step:
- Dallas to Houston: take the driving distance, 238.3 miles, and the straight-line distance, 224.8 miles. Divide: 238.3 ÷ 224.8 = 1.06. The road route is about six percent longer than the direct line — an unusually direct connection.
- Denver to Phoenix: take the driving distance, 820.6 miles, and the straight-line distance, 585.5 miles. Divide: 820.6 ÷ 585.5 = 1.40. The road route is about forty percent longer — mountains and the shape of the road network force a long detour.
In simple words: this first haversine step mixes the north–south gap and the east–west gap between the two places into a single number that always falls between 0 and 1.
In simple words: this step turns that in-between number into the angle between the two places, as seen from the centre of the Earth.
In simple words: multiply that angle by the Earth's radius and you get the direct distance between the two places over the surface of the Earth.
where:
- d is the straight-line (great-circle) distance — the direct distance over the Earth's surface, ignoring roads completely;
- φ (phi) is just the latitude of a place — how far north or south it is — written in radians instead of degrees (to convert, multiply the degrees by π ÷ 180). φ1 is the first place's latitude and φ2 is the second place's;
- Δφ (delta phi) is simply the difference between the two latitudes, and Δλ (delta lambda) is the difference between the two longitudes — how far east or west apart the places are — both in radians;
- a is a halfway number the formula builds out of those gaps; it always falls between 0 and 1;
- c is the angle between the two places as seen from the centre of the Earth, measured in radians;
- R is the Earth's radius — about 3,958.8 miles (6,371 kilometres);
- sin, cos and atan2 are ordinary calculator functions (sine, cosine and a form of inverse tangent) that any calculator or browser provides.
Worked through in full for Dallas (32.7767, −96.7970) to Houston (29.7604, −95.3698), step by step:
- Convert the latitudes to radians by multiplying each by π ÷ 180: φ1 = 32.7767° becomes about 0.5721 radians, and φ2 = 29.7604° becomes about 0.5194 radians.
- Take the differences: Δφ = 29.7604 − 32.7767 = −3.0163°, which is −0.0526 radians, and Δλ = −95.3698 − (−96.7970) = 1.4272°, which is 0.0249 radians.
- Build the value a: sin²(Δφ ÷ 2) ≈ 0.000693, cos φ1 ≈ 0.8408, cos φ2 ≈ 0.8681 and sin²(Δλ ÷ 2) ≈ 0.000155, so a ≈ 0.000693 + (0.8408 × 0.8681 × 0.000155) ≈ 0.00081.
- Turn a into the angle c: c = 2 × atan2(√a, √(1 − a)) = 2 × atan2(0.0284, 0.9996) ≈ 0.05678 radians.
- Multiply by the Earth's radius: d = R × c = 3,958.8 × 0.05678 ≈ 224.8 miles.
That 224.8 miles is exactly the straight-line figure quoted for Dallas to Houston throughout this page — and the 238.3-mile road route is then compared against it to give the 1.06 detour ratio above. Note that the haversine formula produces only this comparison figure: the driving distance itself comes from adding real road segments, as the first card on this page shows, because no formula applied to two coordinates can know where the roads go.
Driving distance vs straight-line distance
Straight-line distance is the shortest distance over the surface of the Earth between two points, ignoring roads completely. It is the right measure for flights, for a radius search and for understanding scale, and the wrong measure for planning a drive. Our comparison of driving distance vs straight-line distance goes deeper on when each one applies.
Driving distance vs air miles
Air miles are straight-line distance framed for flying, so use the air miles calculator for a flown journey.
Driving distance vs walking distance
Walking distance follows paths cars cannot use, so it can occasionally be shorter in a town centre.
Driving distance vs mileage
Mileage is driving distance put to work — the same miles multiplied by a rate to produce a cost, the job of the mileage calculator.
No road route exists
Some pairs of places simply cannot be driven between. Islands with no road bridge or car ferry connection in the mapped network, and cities on different continents separated by an ocean, have no legal car route. In those cases the honest answer is not a made-up road figure but a clear statement that no route exists, plus the straight-line distance so you still have a sense of scale.
Islands, ferries and interrupted networks
Some real journeys involve a ferry that a car routing engine does not treat as a normal road segment. Check the drawn route on the map for crossings over water, and remember that ferry waiting and crossing time sits outside the traffic-free road time.
Vague or ambiguous place names
A single common name can match many places. The map check matters most here: a correct number for the wrong town is still the wrong answer for your journey. Adding one extra detail to the name usually resolves the ambiguity at once.
Planning a road trip
Break a long tour into daily driving legs and check each leg separately. A leg that looks modest as a straight line can turn out to be a long day once the ratio and the road types are visible, and it is far better to discover that at the planning stage than at dusk on the road. City-pair pages such as New York to Chicago, Chicago to Houston and Seattle to Los Angeles give you ready-made starting points for common legs.
Estimating a commute
A commute is a distance you repeat hundreds of times, so small differences matter. Measure the real home-to-work journey, double it for the round trip, and multiply by your working week before judging a move or a job. The daily figure alone hides how large the weekly total becomes.
Deliveries, visits and service rounds
For a delivery run or a day of client visits, driving distance turns a list of places into a realistic workload. Add the legs together and compare the total with the hours available, and you can spot a round that is quietly impossible before a driver is committed to it.
Accuracy and limits
The distance figure is only as good as the mapped road network underneath it. OpenStreetMap is detailed and constantly updated, but new roads can be missing for a while, private or restricted roads can be mapped in ways that affect routing, and temporary closures are not the same as permanent ones. Expect the distance to be reliable for planning, typically very close to what a sat-nav reports for the same route, but do not treat the final decimal place as a guarantee.
The drive time has wider limits. It is traffic-free and excludes fuel stops, breaks, congestion, roadworks and bad weather, which can add hours over a full day. Use it as a best-case baseline and add your own margin.
Finally, the route chosen is the fastest legal car route in the data at the moment you calculate. A sat-nav with live information may choose differently on the day, and your own preference for scenery, tolls or familiar roads may differ again. A slightly different route means a slightly different distance, and that is normal rather than an error.
What each result means
The driving distance is the headline figure: the length of the chosen road route, shown in miles and kilometres. The drive time is the traffic-free time for that same route, not a prediction of your arrival time. The straight-line distance is the direct great-circle distance between the same two points, shown for comparison. The ratio is the driving distance divided by the straight-line distance, and it tells you at a glance how direct the road connection is. The round-trip figures are the one-way distance and time doubled, for a return over the same route. The map is not decoration: it is your check that the pins and the route are the ones you intended, and it often explains a surprising number faster than any figure can.
Which sibling tool to use instead
If your endpoints are full street addresses or postal codes rather than place names, use the distance between addresses tool, which is built for door-to-door precision. If you want to draw a path yourself by clicking, use the map distance calculator. If you need the point halfway between two places, use the midpoint calculator. If you need an average speed from a distance and a time you already know, use the average speed calculator. If the journey is on foot, use the walking distance calculator, and if it is a flight, start with the air miles calculator. More background reading lives in our guides, and our editorial policy explains how we treat sources and accuracy across the site.
When to use this tool — and when a sibling tool fits better
Use this calculator whenever wheels are involved: planning a road trip, estimating a commute, pricing a delivery run or checking how far a client visit really is. If you only need the geographic separation between two places — for a flight, a radio signal or a geography question — the main distance calculator on the homepage gives the straight-line figure on its own. If you have street addresses rather than town names, the distance between addresses tool accepts full addresses and works to the same road network. And if you want to measure a route by clicking points on a map — a detour, a trailhead approach, a route that does not start in a town centre — the map distance calculator lets you plot the path yourself.
Frequently asked questions
Why is the driving distance longer than the straight-line distance?
Roads cannot pass through hills, lakes, buildings or private land, and they rarely run in a perfectly straight line between two towns. Every bend, junction, bridge and town-centre funnel adds a little length, and across a whole journey those small additions accumulate into a route that is typically 15–40% longer than the direct line. The gap is small where a motorway runs almost straight — Dallas to Houston drives 238.3 miles against a 224.8-mile straight line, a ratio of just 1.06 — and large where terrain forces a detour, as Denver to Phoenix shows at 820.6 road miles against 585.5 straight-line miles, a ratio of 1.40. The results panel shows the ratio for your own route so you can see which kind of journey you face. See driving distance vs straight-line distance for more on typical ratios.
Does the drive time include traffic?
No. The time shown is a traffic-free estimate built by dividing each road segment's length by the normal expected speed for that road and adding the results together. It assumes you can travel at those speeds the whole way, with no congestion, no fuel stops, no meal breaks and no roadworks. A real journey — especially at rush hour, in bad weather or over a long day with breaks — will almost always take longer, sometimes much longer. Treat the figure as a best-case baseline and add your own margin: on a long trip, most drivers average noticeably less than the headline time once stops are included. A live sat-nav on the day, which reacts to current conditions, is the better guide to an actual arrival time.
Can I get the distance for a return journey?
Yes — the results panel includes round-trip distance and time alongside the one-way figures. The round trip is simply the one-way route doubled, on the assumption that you return over the same roads: Dallas to Houston, for example, is 238.3 miles one way and therefore about 476.6 miles there and back. That doubled figure is the one to plan fuel, breaks and total time around, because one-way numbers quietly halve what a return journey actually costs. If you are turning the journey into an expense claim or a fuel budget, the mileage calculator has a dedicated round-trip option and converts the total into money at your own per-mile rate.
Which route does the calculator choose?
It uses the fastest legal route for a car on the OpenStreetMap road network, calculated by the OSRM routing engine. Fastest is judged on travel time, not distance, so the chosen route may be longer in miles than an alternative if its roads are quicker — a motorway loop can beat a shorter cross-country crawl. The engine respects one-way streets, turn restrictions and roads cars may not use, so the route is one you could legally drive. It may still differ slightly from the route a sat-nav picks on the day, because a live sat-nav also reacts to current traffic, temporary closures and incidents, none of which a planning tool can know in advance. A slightly different route means a slightly different distance, and that is normal rather than an error.
What if there is no road route between my two places?
Then the honest answer is that the journey cannot be driven, and the tool says so rather than inventing a road figure. This happens with islands that have no road bridge or mapped car-ferry connection, and with cities on different continents separated by an ocean. In those cases the tool still shows the straight-line distance between the two places, so you keep a sense of scale for planning the journey another way. Some real trips also involve a ferry crossing that a car routing engine does not treat as an ordinary road segment, so check the drawn route on the map whenever it crosses water. For journeys that will actually be flown, start with the air miles calculator instead.
Should I plan fuel from the driving distance or the straight-line distance?
Always from the driving distance, because fuel is burned along roads, not along the straight line. On a nearly direct route the two figures are close — Dallas to Houston differs by only 13.5 miles — so the choice hardly matters. On a high-ratio route it matters a great deal: Denver to Phoenix is 585.5 miles in a straight line but 820.6 miles by road, so budgeting fuel from the straight-line figure would leave you roughly 235 miles short, before you have even thought about the return leg. The same logic applies to journey time, break planning and expense claims. If the wheels will turn over it, plan it from the road figure.
Why does this tool choose a longer route than I expected?
Because it chooses the fastest legal car route, not the shortest one. Drive time is built segment by segment — each segment's length divided by the expected speed for that road — so a longer route on fast roads can easily beat a shorter route through slow streets, towns and junctions on total time. Ten extra motorway miles at motorway speed add only a few minutes, while ten miles of town streets can add half an hour. If your priority is the fewest miles rather than the least time — for a fuel budget, say — compare the distance figure rather than the time when you judge the route, and check the drawn line on the map to see which roads the choice involves.
Can I measure a journey that starts or ends outside a town centre?
Yes. Enter the most specific place you can — a suburb, a postcode or a nearby landmark rather than the bare town name — and check the pin on the map before you trust the figures. A bare town name pins the town centre by default, and in a spread-out city the real start or finish can sit several miles from that centre, quietly adding distance and time that the headline number never explains. Adjust the wording, recalculate, and the route will begin and end where your journey actually does. For an exact property at either end, the distance between addresses tool gives you building-level control over both pins.
How do I turn driving distance into an average speed check?
Divide the distance by the time the journey actually took: average speed equals distance divided by time. For example, if the 238.3-mile Dallas to Houston drive took you 4 hours 45 minutes — 4.75 hours — your average speed was 238.3 ÷ 4.75, which is about 50.2 mph. That is well below motorway cruising speed, and rightly so, because the average absorbs fuel stops, slower stretches and town driving that a top speed ignores. Averages are therefore the honest basis for planning the next trip. The average speed calculator does the division directly from any distance and time you give it.
Does the calculator include toll roads?
It can do, because the fastest legal route may use a toll road where that road forms part of the quickest path, and the engine chooses on time rather than on cost. The distance and drive time then describe that route exactly as they would for any other road. What the tool does not do is price the tolls: charges depend on the road, the vehicle class and the payment method, and they change over time, so no distance figure can carry them reliably. If tolls matter to your budget, look at the drawn route on the map to see whether it uses a toll road, and check the current charges separately before you travel.
Why did my result change since I last checked?
Because the map underneath the tool is alive. OpenStreetMap contributors add new roads, correct one-way restrictions and fix mapping errors every day, and the routing engine works from the current data each time you calculate. A new bypass, a corrected junction or a better-mapped shortcut can each change the chosen route slightly, and a changed route means a changed distance and time. Small differences between checks are therefore normal, and usually mean the data has improved rather than that anything has gone wrong. If a result changes by a lot, check the pins and the drawn route first — a place name matching a different spot explains most large jumps.