Travel calculators

Distance Between Two Locations Calculator

Updated Aug 20, 2026 By Jehan Wadia
Rate Formulas
Locations & Assumptions
    For best results include state/country — e.g. Springfield, IL, US. Coordinates like 40.7128, -74.0060 also work.
      Street address, city, ZIP/postal code, landmark or a latitude/longitude pair are all accepted.

      Used for your own travel-time estimate (shown alongside the routing engine ETA).
      Dimensionless multiplier used only if the live routing service cannot be reached.

      Ready.

      Resolved Locations
      Straight-Line Distance (As the Crow Flies)
      Great-circle distance
      The shortest possible path over the curved surface of the Earth — the route aircraft and navigators use.

      Rhumb-line distance
      The path you follow by holding one constant compass bearing the whole way — slightly longer, and the classic maritime course.
      Rhumb line is longer than the great circle by
      Driving Distance
      Bearing, Midpoint & Time Zones
      Path Length Comparison
      Interactive Map
      Map data © OpenStreetMap contributors
      Driving route options
      Turn-by-Turn Driving Directions
      Elevation Profile Along the Straight-Line Path
      Step-by-Step Solution

      Introduction

      This distance calculator tells you how far apart two places are. Type in two spots — cities, addresses, ZIP codes, landmarks, or plain latitude and longitude — and you get the answer right away in miles, kilometers, nautical miles, feet, and meters.

      You get three kinds of distance. The straight-line distance (also called "as the crow flies") is the shortest path over the curved Earth, the same one planes use. The rhumb line is the path you take if you hold one compass heading the whole trip, which is what ships often do. The driving distance follows real roads, so it is longer than a straight line.

      The tool also shows travel time, the compass bearing from one place to the other, the midpoint between them, time zone differences, an interactive map with each route drawn on it, turn-by-turn directions, and a chart of the land height along the path. You can set your own average speed to see how long the drive would take you.

      Every answer comes with a step-by-step solution, so you can see the haversine math behind it. That makes this useful for trip planning, homework, flight and sailing questions, or just settling a "how far is it?" debate.

      How to use our Distance Between Two Locations Calculator

      Enter your start point and your end point, then pick a driving speed. The calculator shows the straight-line distance, the rhumb-line distance, the driving distance, travel time, bearing, midpoint, a map, turn-by-turn directions, and an elevation profile.

      Search by place tab: Type a city, address, ZIP code, landmark, or a lat/long pair. Pick a match from the drop-down list for the best result.

      From — starting location: Type where your trip begins. Add the state or country, like Springfield, IL, US, so the right place is found.

      To — ending location: Type where your trip ends. Any address, city, postal code, or place name works.

      Swap button: Click it to flip the start and end points. The results update right away.

      Enter coordinates tab: Use this if you know exact map points instead of place names.

      Origin latitude: Type the start point's latitude in degrees, from −90 to 90. Use a minus sign for south.

      Origin longitude: Type the start point's longitude in degrees, from −180 to 180. Use a minus sign for west.

      Destination latitude: Type the end point's latitude the same way, north as plus and south as minus.

      Destination longitude: Type the end point's longitude the same way, east as plus and west as minus.

      Average driving speed: Type the speed you expect to drive and choose mph, km/h, m/s, or knots. This gives your own travel time estimate next to the map service's ETA.

      Road winding factor: Type how much longer roads are than a straight line, such as 1.20. This is only used if the live routing service is down.

      Calculate button: Click it to get all distances and results.

      Reset button: Click it to clear your entries and go back to the sample trip.

      Chart units: Pick kilometres, miles, or nautical miles for the bar chart that compares the three path lengths.

      Profile units: Pick metric or imperial for the elevation chart and its data table.

      Map controls: Use zoom in, zoom out, fit to route, or enlarge map to see the paths better. Drag the map to move it.

      Distance Between Two Locations

      The distance between two locations is how far apart two points on Earth are. But there is more than one answer, because there is more than one path. A plane flies one way. A car drives another way. So the same two cities can have two different distances.

      Straight-Line Distance (As the Crow Flies)

      This is the shortest path between two points. Earth is round, so this path curves along the surface. It is called the great-circle distance. Pilots and ships use it because it saves fuel and time — it is the same figure behind an air miles calculation. It is always the smallest number you will see.

      Rhumb-Line Distance

      A rhumb line is the path you take when you hold one compass direction the whole trip. It is easier to steer, so sailors used it for hundreds of years. It is always a little longer than the great circle. On long east–west trips, the gap gets bigger.

      Driving Distance

      Roads do not go straight. They bend around lakes, hills, and cities. So driving distance is longer than straight-line distance. For most trips, the road is about 1.2 to 1.4 times longer than the straight line. In mountains or on islands, it can be much more. Once you know the road miles, you can work out gas mileage, fuel cost, and tolls for the trip.

      Bearing and Midpoint

      Bearing is the compass direction from the start point to the end point. It is given in degrees, from 0° (north) to 360°. On long trips the bearing changes as you go, because Earth is curved. That is why there is a starting bearing and a final bearing.

      The midpoint is the halfway spot on the great-circle path. It is handy when two people want to meet in the middle.

      Common Distance Units

      • Miles (mi) — used in the United States and the United Kingdom for roads.
      • Kilometers (km) — used in most of the world. 1 mile = 1.609 km. See our metric conversion calculator for other switches.
      • Nautical miles (nmi) — used by ships and planes. 1 nmi = 1.852 km.
      • Feet and meters — best for short distances, and easy to swap with a meters to feet calculator.

      How the Math Works

      The haversine formula is the common way to find great-circle distance. It takes the latitude and longitude of both points, changes the degrees to radians, and finds the angle between the two points as seen from Earth's center. Then it multiplies that angle by Earth's radius, about 6,371 km (3,959 miles). The answer is accurate to about 0.5% for most trips. For flat-plane geometry instead, use the distance formula calculator or the Pythagorean theorem calculator.

      Why Travel Time Is Not Just Distance

      Time depends on speed. A 300-mile drive at 65 mph takes about 4 hours and 37 minutes, which you can check with a speed, distance and time calculator. But traffic lights, city streets, hills, rest stops, and traffic jams add time. Highway trips are faster per mile than city trips, even when the miles are the same, so your average speed matters as much as the distance.

      Why This Matters

      Knowing the distance helps you plan a road trip, guess your gas cost, compare flight prices, pick a shipping rate, estimate a taxi or rideshare fare, budget a whole trip cost, choose a meeting spot, or check how far a new home is from work or school — useful when you are weighing a move or comparing the cost of living in two cities.


      Formulas used

      Haversine term a
      a=\sin^2\!\left(\frac{\Delta\varphi}{2}\right)+\cos\varphi_1\cos\varphi_2\sin^2\!\left(\frac{\Delta\lambda}{2}\right)
      Central angle
      c=2\,\operatorname{atan2}\!\left(\sqrt{a},\sqrt{1-a}\right)
      Great-circle (straight-line) distance
      d_{gc}=R\,c,\qquad R=6371008.8\ \text{m}
      Rhumb-line distance
      d_{rl}=R\sqrt{\Delta\varphi^2+q^2\,\Delta\lambda^2},\qquad q=\frac{\Delta\varphi}{\Delta\psi},\qquad \Delta\psi=\ln\!\left[\frac{\tan\!\left(\frac{\pi}{4}+\frac{\varphi_2}{2}\right)}{\tan\!\left(\frac{\pi}{4}+\frac{\varphi_1}{2}\right)}\right]
      Initial compass bearing
      \theta=\operatorname{atan2}\!\left(\sin\Delta\lambda\cos\varphi_2,\ \cos\varphi_1\sin\varphi_2-\sin\varphi_1\cos\varphi_2\cos\Delta\lambda\right)
      Geographic midpoint
      \varphi_m=\operatorname{atan2}\!\left(\sin\varphi_1+\sin\varphi_2,\ \sqrt{(\cos\varphi_1+B_x)^2+B_y^2}\right),\quad \lambda_m=\lambda_1+\operatorname{atan2}\!\left(B_y,\ \cos\varphi_1+B_x\right),\quad B_x=\cos\varphi_2\cos\Delta\lambda,\ B_y=\cos\varphi_2\sin\Delta\lambda
      Estimated driving distance and detour ratio
      d_{road}=d_{gc}\times f,\qquad \text{detour ratio}=\frac{d_{road}}{d_{gc}}
      Travel time at assumed speed
      t=\frac{d_{road}}{v}

      Frequently asked questions

      Why is the driving distance longer than the straight-line distance?

      Roads bend. They curve around lakes, mountains, rivers, and buildings. A plane can fly over all of that, but a car has to follow the pavement.

      For most trips the road is about 1.2 to 1.4 times longer than the straight line. In mountains or on islands it can be double or more.

      Why does the calculator say the driving distance is estimated?

      That happens when the live routing service cannot be reached. When that happens, the tool multiplies the straight-line distance by your road winding factor instead.

      The straight-line and rhumb-line numbers are still exact. Only the driving figure is a guess. Click Calculate again in a minute to try for a live route.

      Can I get driving distance between two countries or across an ocean?

      Only if roads connect them. The routing service needs a real road path, so New York to London will not return a drive route.

      You will still get the great-circle and rhumb-line distances, which is what you want for a flight or a ship anyway.

      How do I enter latitude and longitude in the search box?

      Type both numbers with a comma between them, like 40.7128, -74.0060. Latitude comes first.

      Degrees, minutes, and seconds work too, such as 40°42'46"N, 74°0'21"W. You can also use the Enter coordinates tab.

      What does the minus sign mean in coordinates?

      A minus sign means south or west.

      • Latitude: plus is north, minus is south
      • Longitude: plus is east, minus is west

      So Sydney is about -33.87, 151.21 — south and east.

      My town was not found. What should I do?

      Add more detail. Put the state or country after the name, like Springfield, IL, US. Many towns share a name.

      You can also pick a match from the drop-down list, or look up the coordinates and type those in instead.

      Why are there two or three driving routes shown?

      The routing service often finds more than one way to drive between two points. The first one is the fastest, drawn as a solid green line. The others are drawn as dashed light green lines.

      Alternates can be shorter in miles but slower, or they may skip a toll road or a busy city.

      Why do the two travel times not match?

      One time comes from the routing engine. It uses posted road speeds and slows down for city streets and turns.

      The other time uses the single average speed you typed. One flat speed for the whole trip is simpler, so it usually gives a different answer.

      Does the travel time include traffic, stops, or breaks?

      No. Both times assume you keep moving. They do not add rush hour, gas stops, food, or rest breaks.

      For a real road trip, add about 15 to 20 minutes for every 2 hours of driving.

      What average speed should I use?

      Try 60 to 70 mph (about 95 to 110 km/h) for highway trips. Use 25 to 35 mph (40 to 55 km/h) for city driving.

      For a mixed trip, 50 to 55 mph (80 to 90 km/h) is a fair guess.

      What is the road winding factor and when should I change it?

      It is how many times longer the road is than the straight line. It only matters when the live routing service is down.

      • 1.1 to 1.2 — flat land with straight highways
      • 1.3 to 1.5 — hills or lots of towns
      • 1.6 or more — mountains, islands, or coastlines

      Why is the rhumb line only a tiny bit longer on some trips?

      The gap depends on your direction. On trips that run mostly north or south, the two paths are almost the same.

      On long east–west trips, especially far from the equator, the rhumb line can be much longer. New York to Tokyo is a big example.

      Is the midpoint the same as the halfway point on the drive?

      No. The midpoint here is the halfway spot on the great-circle path, not on the road.

      It is great for picking a meeting city. If you need the halfway point by road miles, check the turn-by-turn list and add up the steps.

      Why does the bearing change during the trip?

      Earth is round. The shortest path curves, so your compass heading slowly shifts as you travel.

      That is why the tool shows a starting bearing and a final bearing. On short trips they are almost the same. On long flights they can differ by a lot.

      What is the elevation profile for?

      It shows the land height along the straight-line path, sampled at 21 points. It helps you see if the route crosses mountains or stays flat.

      Note that it follows the straight line, not the road, so the real drive may cross different hills.

      How accurate are the distance numbers?

      Very accurate. The haversine formula is within about 0.5% for most trips, and usually much closer than that.

      The small error comes from Earth not being a perfect ball. It is slightly wider at the equator.

      Which distance should I use for a flight?

      Use the great-circle distance in nautical miles. That is what airlines and pilots use.

      Real flights are a little longer because of takeoff paths, landing patterns, and weather detours. Add about 3% to 5% to be safe.

      Can I use this for shipping or freight quotes?

      Yes. Use the driving distance for trucks and the great-circle distance for air freight or ocean freight.

      Carriers may charge by their own mileage tables, so treat these as close estimates, not final quotes.

      Why did the time zone difference not show up?

      The live time zone lookup did not answer. The tool then estimates it from longitude, where 15 degrees is about one hour.

      The estimate can be off, because real time zone lines follow borders, not straight lines.

      How do I move around the map?

      Drag it with your mouse or finger. Use the zoom buttons, or hold Ctrl and scroll.

      You can also click the map and use the arrow keys to pan and the plus or minus keys to zoom. Fit to route brings both points back into view.

      Can I measure a short distance, like across a park?

      Yes. Enter two coordinate pairs and read the answer in feet or meters.

      For very short gaps, type coordinates instead of place names. A place name points to the center of a whole town, which is too rough.

      Does it work for places in the Southern Hemisphere or across the date line?

      Yes. The math handles all latitudes and longitudes, including trips that cross the 180° line in the Pacific.

      Just remember to use minus signs for south and west.