Distance Calculator
Use this Distance Calculator to find the distance between two locations, cities, towns, addresses, or landmarks. Enter a starting location and destination, then the calculator searches worldwide map data, calculates an available driving route, and shows driving distance, estimated driving time, straight-line distance, kilometres, miles, latitude and longitude, and an interactive route map.
The calculator is designed for worldwide searches, including Canada, the United States, Europe, Australia, and other regions covered by OpenStreetMap. Switch to Advanced Trip Distance if you also want round-trip mileage, estimated fuel use, and fuel cost. If two locations cannot be connected by road, the calculator can still show the straight-line distance between them.
Distance Calculator
Find driving distance, travel time, straight-line distance, miles, kilometres, coordinates, and a mapped route between two locations.
Find the driving distance and straight-line distance between two locations.
Map data © OpenStreetMap contributors. Driving route calculated with OSRM. Estimated time does not include live traffic, closures, weather, border delays, or stops.
Table of Contents
How to Use the Distance Calculator
Enter a starting location in the first field and a destination in the second. You can use a city, town, street address, landmark, or other place name. Adding a province, state, or country helps when several locations share the same name. For example, “Springfield, Illinois, USA” is much more specific than entering only “Springfield.”
Choose kilometres or miles as your main distance unit, then click Calculate Distance. The calculator first finds both locations and converts them into latitude and longitude. It then requests a road route and independently calculates the straight-line distance between the same coordinates.
The results include the full matched place names, start and destination coordinates, road distance, estimated driving time, direct distance, and an interactive map. If the map library cannot load for any reason, the calculator also provides an Open Route Map button as a fallback.
For longer trips, our Road Trip Stops Calculator can take a known trip distance and estimate fuel stops, meal stops, driving days, overnight breaks, and arrival time.
Distance Between Two Locations
The phrase distance between two locations can describe more than one measurement. A traveller usually wants driving distance because that is the distance a vehicle actually travels on roads. A geography problem may instead ask for the shortest direct distance between the two places.
Those numbers are rarely identical. A road can curve around lakes, mountains, private land, coastlines, restricted areas, or other obstacles. Two places might be 300 kilometres apart in a straight line but 350 kilometres apart by road.
The same principle applies to the distance between two addresses. Two properties may appear close on a map but sit on opposite sides of a river, freeway, railway, or other barrier. Driving distance follows the connected road network rather than drawing a straight line through the obstacle.
Driving Distance Between Two Places
Driving distance is the length of the available road route returned between the selected locations. The routing engine uses road-network data based on OpenStreetMap. It looks for a route that connects the start and destination through roads available to its driving profile.
The result can be affected by highways, bridges, one-way streets, road access, border connections, road classifications, ferries represented in the map data, and the overall shape of the road network. That is why a driving distance calculator cannot be replaced by a simple latitude-and-longitude formula.
Estimated driving time also comes from the routing model rather than a single fixed speed. It does not include live traffic, current weather, construction delays, border wait times, rest stops, collisions, or temporary road closures.
If you use road mileage for courier or delivery work, the Delivery Route Profit Calculator can combine route distance with revenue, fuel, vehicle expenses, driver time, tolls, parking, and other operating costs.
Driving Distance vs. Straight-Line Distance
Driving distance follows mapped roads. Straight-line distance measures the shortest geographic separation between two coordinates. When a highway is very direct, the numbers may be fairly close. When terrain or road layout forces a large detour, road distance can be much longer.
| Distance Type | What It Measures | Common Use |
|---|---|---|
| Driving distance | Length of an available road route | Road trips, commuting, deliveries, mileage |
| Straight-line distance | Shortest geographic separation between coordinates | Geography, proximity, worldwide comparisons |
| Coordinate-plane distance | Euclidean distance between two points on a flat plane | Geometry and algebra |
Distance Formula
The formula for distance depends on what kind of problem you are solving. In a basic speed problem, distance equals speed multiplied by time. In coordinate geometry, the distance formula comes from the Pythagorean theorem. For real locations on the curved surface of Earth, a great-circle formula is more appropriate.
If a vehicle travels at an average speed of 90 km/h for 3 hours, it covers 270 kilometres. The same relationship can be rearranged: average speed = distance ÷ time, while time = distance ÷ speed.
If you want to verify the basic multiplication or division behind a distance formula, the Simple Math Calculator can handle those calculations separately.
Distance Between Two Points
On a flat coordinate plane, the distance between the points (x₁, y₁) and (x₂, y₂) is calculated from the differences between their x and y coordinates.
For example, consider the points (2, 3) and (8, 11). The horizontal difference is 6 and the vertical difference is 8. The distance is √(6² + 8²), which equals √100, or 10 units.
This formula is an application of the Pythagorean theorem. The horizontal and vertical differences form the two shorter sides of a right triangle, while the line connecting the points is the hypotenuse.
Latitude and longitude should not normally be plugged directly into this flat-plane formula for long real-world distances because Earth is curved. Geographic calculations use a great-circle method instead.
Straight-Line Distance on Earth
The calculator uses the Haversine formula for its straight-line geographic distance. The formula treats Earth as a sphere and calculates great-circle separation between two latitude-and-longitude coordinates.
R represents Earth’s mean radius, φ represents latitude in radians, and λ represents longitude in radians. You do not need to enter these values manually because the calculator gets the coordinates from the place search.
For ordinary city-to-city comparisons, this provides a useful “as the crow flies” distance. Highly specialized surveying and geodesy may use more detailed ellipsoidal models, but the spherical calculation is appropriate for a general online distance tool.
Mileage Calculator Between Two Locations
Mileage commonly means road distance expressed in miles. Select Miles as the primary distance unit to see the number of miles between two places. The calculator also shows the alternative unit, allowing Canadian kilometre values and U.S. mile values to be compared without recalculating the route.
One mile equals exactly 1.609344 kilometres. One kilometre equals approximately 0.621371 miles. A 500-kilometre trip is therefore about 310.7 miles.
If you want to estimate how repeated vehicle mileage adds up in gasoline spending over time, the Gasoline Spending Calculator can estimate fuel consumption and cost across months or years.
Kilometres vs. Miles
Canada and most countries use kilometres for road distance, while the United States commonly uses miles. This can make cross-border travel confusing when fuel economy, road signs, and trip plans use different units.
| Kilometres | Approximate Miles |
|---|---|
| 10 km | 6.2 mi |
| 50 km | 31.1 mi |
| 100 km | 62.1 mi |
| 250 km | 155.3 mi |
| 500 km | 310.7 mi |
| 1,000 km | 621.4 mi |
The calculator performs the conversion automatically, so changing the primary display unit does not change the underlying route. It only changes how the distance is presented.
Distance Between Cities
To calculate the distance between two cities, enter enough geographic detail to avoid ambiguity. “Vancouver, BC, Canada” and “Seattle, WA, USA” are clearer than entering only the city names. The calculator shows the complete place names returned by the location search so you can confirm the match.
The same process works for cities in one country and cities in different countries. If a continuous road route exists, the calculator attempts to provide driving distance and travel time. If no road route can be found, direct geographic distance is still calculated.
City-to-city distance can be useful when planning vacations, work travel, relocation, freight, commuting, deliveries, or road trips. Distance alone does not tell the entire story, however. Tolls, borders, traffic, road quality, weather, and required stops can all affect the practical trip.
Distance Between Two Addresses
You can enter complete street addresses rather than only city names. Include the street number, street name, city, state or province, postal code when useful, and country. More complete input reduces the chance that the geocoder will select the wrong place.
Address coverage varies around the world. New developments, private roads, rural properties, or recently changed street names may not always be represented perfectly in open map data. Review the full matched place name, coordinates, and route map before relying on an address-to-address result.
Latitude and Longitude Finder
The result also works as a basic latitude and longitude finder because it displays the coordinates returned for both the starting point and destination. Latitude measures position north or south of the equator, while longitude measures position east or west of the prime meridian.
Latitude ranges from −90 degrees to +90 degrees. Longitude ranges from −180 degrees to +180 degrees. The coordinate display can help you confirm that the location search matched the place you intended.
Map Distance Calculator
The interactive map shows both selected locations. When a driving route is available, the route geometry is drawn on the map and the view automatically adjusts to include the trip. If a road route is unavailable, the map shows a dashed direct line between the endpoints instead.
This is not a Google Maps distance calculator and it does not use the Google Maps API. The map is based on OpenStreetMap data, location searching uses open geocoding services, and driving distance uses OSRM routing.
If you searched for terms such as Google Maps distance calculator, Google Maps measure distance, or how to measure distance on Google Maps, this page provides an independent way to calculate road distance and straight-line distance without requiring a Google API account.
How to Measure Distance on a Map
There are two basic ways to measure distance on a map. One follows a road or path and adds the length of the segments. The other measures direct separation between coordinates.
Use road distance when you need to know how far you are likely to drive. Use straight-line distance when you want geographic proximity. Comparing both can also show how indirect a road route is.
Speed, Distance, and Time
- Distance = Speed × Time
- Average Speed = Distance ÷ Time
- Time = Distance ÷ Speed
If a vehicle travels 360 kilometres in 4 hours, its average speed is 90 km/h. If the same 360-kilometre distance is travelled at an average of 80 km/h, the theoretical travel time is 4.5 hours.
Real trips include speed changes, intersections, slow roads, traffic, and stops. This is why the route service estimates driving time from its road model rather than dividing the whole trip by one speed.
How to Calculate Average Speed
Average speed is total distance divided by total travel time. If you drive 450 kilometres in 5 hours, average speed is 90 km/h. That does not mean the vehicle stayed at exactly 90 km/h the entire time. It is simply the overall average.
If rest and fuel stops are included in the time, the overall trip average can be much lower than the moving average. A car might average 100 km/h while moving but only 80 km/h across the complete trip once stops are counted.
If you need to compare the percentage difference between two trip times, distances, or costs, the Percentage Calculator can calculate percentage increases, decreases, and differences.
How the Fuel Estimate Works
Advanced Trip Distance estimates fuel consumption from the trip distance. In metric mode, enter fuel economy in litres per 100 kilometres and fuel price per litre.
If a 500-kilometre trip is driven in a vehicle averaging 10 L/100 km, estimated fuel use is 50 litres. At $1.50 per litre, the estimated fuel cost is $75.
In U.S. mode, the calculator converts the trip to miles and divides by miles per gallon to estimate U.S. gallons. The fuel cost is then gallons multiplied by your entered price per gallon.
Real fuel economy can vary with speed, wind, temperature, traffic, elevation, towing, tire pressure, vehicle load, idling, and driving style, so the result is an estimate rather than a guaranteed fuel bill.
One-Way Distance vs. Round-Trip Distance
A one-way trip counts the route once. The calculator’s round-trip option doubles that distance for basic planning. If a trip is 275 kilometres one way, the estimated round trip is 550 kilometres.
The actual return route can sometimes differ because of one-way roads, route restrictions, border procedures, ferry schedules, or a different route choice. The doubled distance is therefore intended for planning fuel and mileage rather than claiming the reverse route is always identical.
Distance From One Place to Another
Searches such as “distance from,” “how far is,” “how far is it from,” “distance to and from,” and “distance between” often describe the same practical question. The answer depends on whether you want to know geographic separation or how far you will actually travel.
If you ask how far Edmonton is from Calgary for a road trip, driving distance is the more useful answer. If you are comparing the cities geographically, the straight-line distance may be the more appropriate number.
Driving Directions From One Location to Another
The route map gives a visual representation of the road route, but this calculator is not intended to replace live navigation. Turn-by-turn navigation requires current traffic, road closures, construction, incidents, and other information that this page does not receive.
Use the calculator for planning distance and estimated travel time before a trip. When you are actually driving, use a current navigation or road-information service appropriate for your location.
Worldwide Distance Calculations
The calculator is not limited to Canada and the United States. It searches worldwide open map data, so locations in Europe, Asia, Africa, South America, Australia, New Zealand, and other mapped regions can also be used.
Worldwide coverage does not mean every possible address or road is guaranteed to work. Address detail and road coverage vary, and a driving route requires both endpoints to connect to a road network understood by the routing service.
If two locations are on different continents with no continuous vehicle route, the calculator still calculates direct geographic distance. For example, New York and London have a meaningful straight-line distance even though a car cannot drive across the Atlantic Ocean.
Canada and USA Distance Calculator
For Canada and U.S. travel, the calculator is useful because it shows both kilometres and miles. You can enter a Canadian city and a U.S. city, such as Calgary, Alberta and Great Falls, Montana, and compare both units.
Cross-border route time does not include customs or immigration waiting. The routing engine estimates road travel, but border delays can add substantial time to the real trip.
Nautical Miles and Map Distance
A nautical mile is different from a regular statute mile. One nautical mile equals exactly 1.852 kilometres. Nautical miles are used extensively in aviation and marine navigation because of their relationship to geographic coordinates.
This calculator displays kilometres and statute miles because it is designed primarily for road trips and everyday distance calculations. Its straight-line calculation, however, uses the same general geographic idea of measuring separation across Earth’s surface.
Why Driving Distance Can Change
Driving distance is not a permanent mathematical constant. Roads can be opened, closed, rerouted, corrected, or reclassified in mapping data. A routing engine may therefore select a different route in the future even when the two endpoints stay the same.
Temporary events add more uncertainty. Construction, collisions, wildfires, flooding, snow, seasonal closures, traffic, and other conditions can affect the trip in ways that are not included in a static route calculation.
How Accurate Is a Distance Calculator?
Accuracy depends on the result being discussed. Straight-line distance is calculated mathematically from the matched coordinates. If those coordinates are correct, the result should be consistent.
Driving distance depends on the road network available to the routing service. A route can differ from another navigation provider because routing engines may use different data, road preferences, traffic information, or route-selection rules.
Address accuracy is another factor. If the search matches the centre of a town rather than a specific building, the route starts or ends at that matched coordinate. This is why the calculator displays the resolved place name and coordinates.
Why Location Searches Can Be Ambiguous
Many places around the world share the same name. A short search such as “Paris” may refer to Paris, France or one of several other places. Street names are repeated even more often.
Adding the city, state, province, postal code, or country makes a search more specific. After calculating, compare the matched names and map with the locations you intended before using the mileage for an important decision.
Distance Calculations for Fuel and Trip Cost
Distance is often the first number needed for a trip-cost estimate. Once route distance is known, estimated fuel consumption can be calculated from the vehicle’s fuel economy and then multiplied by fuel price.
Suppose a route is 750 kilometres and the vehicle averages 11 L/100 km. Estimated fuel consumption is 82.5 litres. At $1.55 per litre, the fuel estimate is about $127.88 one way.
For frequent driving, compare more than one trip. Repeated commuting, deliveries, and long-distance travel can create substantial annual fuel costs even when each individual trip seems inexpensive.
When Straight-Line Distance Is More Useful
Driving distance is the right measurement for most road-travel questions, but direct distance can be more useful when comparing geographic proximity, locations separated by water, or places with no meaningful road route.
Straight-line distance can also show how indirect a road network is. If direct distance is 200 kilometres and road distance is 260 kilometres, the route is 60 kilometres longer, or about 30% longer than the geographic separation.
Distance Calculator Examples
Example 1: Distance Between Two Cities
Enter Edmonton, Alberta, Canada as the starting location and Calgary, Alberta, Canada as the destination. The calculator finds both cities, calculates direct distance, requests a road route, and displays the available route on the map.
Example 2: Distance Between Two Addresses
Enter one full street address in the starting field and another in the destination field. Include city and region information. Review the matched names before relying on the distance.
Example 3: International Distance Without a Road Route
Enter Toronto, Canada and London, United Kingdom. A normal continuous driving route across the Atlantic should not be expected. The calculator can still use the two coordinate pairs to show direct geographic distance.
Example 4: Round-Trip Fuel Estimate
If a route is 400 kilometres one way, Advanced Trip Distance can use 800 kilometres as a basic round-trip estimate. At 9 L/100 km, estimated fuel use is 72 litres before applying the fuel price.
OpenStreetMap and This Calculator
This calculator uses open mapping technology rather than a paid Google Maps API key. OpenStreetMap is an open geographic database maintained by contributors around the world. You can learn more about the project on the official OpenStreetMap About page.
Location search first attempts Photon, an OpenStreetMap-based geocoder. If that service does not return a usable result, the calculator tries Nominatim as a fallback. Driving routes are requested from the public OSRM routing service, while Leaflet displays the interactive map.
Distance Calculator Limitations
This no-account setup depends on public services. Public mapping and routing servers can enforce rate limits, experience outages, change their policies, or temporarily reject requests. The calculator includes a second geocoder to improve resilience, but no free public endpoint can offer the same service guarantee as dedicated paid infrastructure.
If this page begins receiving heavy traffic, the long-term solution is to move geocoding and routing to a dedicated provider or a self-hosted service. The visual calculator and article can remain the same while the endpoint URLs are changed behind the scenes.
The calculator is also not a live navigation product. It does not know current traffic, weather, collisions, temporary construction, border queues, or road closures. Always check current travel information before an important trip.
Common Distance Calculation Mistakes
One common mistake is assuming straight-line distance equals driving distance. Another is entering a city or street name without enough geographic context and accepting the wrong matched location.
Mixing miles and kilometres can also cause errors in travel plans and fuel calculations. One mile is not one kilometre, and U.S. MPG is not the same measurement as L/100 km.
Finally, do not treat route time as a guaranteed arrival time. Real travel includes conditions the calculator cannot see.
Why Use an Online Distance Calculator?
- Find the distance between two locations.
- Calculate driving distance between cities.
- Calculate distance between two addresses.
- See the number of miles between two places.
- Compare road distance with straight-line distance.
- Estimate driving time.
- Find latitude and longitude for both matched locations.
- View the route on an interactive map.
- Calculate round-trip distance.
- Estimate fuel use and fuel cost.
- Convert kilometres to miles automatically.
Distance Calculator Frequently Asked Questions
How do I calculate the distance between two locations?
Enter a starting location and destination, choose kilometres or miles, and press Calculate Distance. The calculator finds both coordinates, calculates straight-line distance, and requests an available road route.
Can I calculate the distance between two addresses?
Yes. Enter complete addresses when possible, including city, state or province, and country. Confirm the full matched place names shown in the results.
Does this distance calculator work worldwide?
It uses worldwide OpenStreetMap-based location data. Road routing depends on mapped roads and whether the two locations can be connected by the routing service.
How many miles are between two places?
Select Miles as the primary unit. The calculator converts the road distance to miles when a route is available and also shows direct distance.
What is the distance formula?
For motion, distance = speed × time. For two points on a flat coordinate plane, d = √[(x₂ − x₁)² + (y₂ − y₁)²]. Geographic distance uses a great-circle calculation.
How do you find the distance between two points?
On a coordinate plane, subtract the x-values and y-values, square both differences, add them, and take the square root. Real locations require a geographic formula because Earth is curved.
What is the difference between driving distance and straight-line distance?
Driving distance follows roads. Straight-line distance measures geographic separation directly between the two coordinates.
Does the calculator show a map?
Yes. An interactive map appears after a successful calculation. If the map library fails to load, a route-map link is shown as a fallback.
Is this a Google Maps distance calculator?
No. The calculator does not use the Google Maps API. It uses OpenStreetMap-based geocoding and mapping plus OSRM routing.
Can this calculate driving directions from my location?
You can type your current city or address as the starting location. The calculator does not automatically access your device location and is not intended for live turn-by-turn navigation.
Can I use this as a mileage calculator?
Yes. Select Miles to see road mileage. Advanced mode can also estimate a basic round trip and fuel cost.
How is estimated driving time calculated?
The routing service returns an estimated duration from its road model. It does not include live traffic, current closures, weather, stops, or border delays.
Can the calculator estimate fuel cost?
Yes. Advanced mode accepts L/100 km with price per litre or U.S. MPG with price per U.S. gallon.
How do I calculate round-trip distance?
Switch to Advanced Trip Distance and select Calculate Round Trip. The calculator doubles the one-way distance for its trip and fuel estimate.
Why can driving distance be longer than direct distance?
Roads must follow terrain, bridges, coastlines, borders, and available road connections. The direct line can cross places where a car cannot travel.
Why was no driving route found?
The locations may be separated by an ocean, disconnected from the mapped road network, or unavailable to the routing service. Straight-line distance can still be calculated when both locations are found.
Can I find latitude and longitude with this calculator?
Yes. The results show the latitude and longitude returned for both matched locations.
Does the map include live traffic?
No. Actual travel time can differ because of congestion, road work, weather, collisions, border waits, and stops.
Can I calculate how far I ran with this calculator?
The calculator can measure between two endpoints, but it does not record the exact route you ran. A GPS activity tracker is better for measuring an actual running path.
Why does the calculator use more than one location service?
The calculator first tries Photon and then falls back to Nominatim if necessary. Using two public geocoders improves the chance of finding a location when one service is temporarily unavailable.
Final Thoughts
The distance between two places depends on what you mean by distance. A road trip needs driving distance. A geographic comparison may need straight-line distance. A classroom coordinate problem may need the mathematical distance formula. This calculator focuses on real locations and provides road and direct distance whenever the available map services can supply them.
Use Simple Distance when you need route distance, travel time, kilometres, miles, coordinates, and the map. Use Advanced Trip Distance when you also want a basic round-trip and fuel estimate. For more detailed road-trip planning after you know the route length, continue with the Road Trip Stops Calculator.