Travel calculators

Distance Between Two Locations Calculator

Updated Sep 29, 2026 By Infinity Calculator
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.1 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. A great circle is the shortest distance along the surface between two points, so it is always the smallest number you will see.1

      Rhumb-Line Distance

      A rhumb line is the path you take when you hold one compass direction the whole trip, and it crosses every meridian at the same angle.1 Its big advantage is that the course never changes. It is longer than the great circle except along a meridian or the equator, and the gap grows the farther you are from the equator, the more east–west the trip runs, and the longer it is.1

      Driving Distance

      Roads do not go straight. They bend around lakes, hills, and cities. So driving distance is longer than straight-line distance, and the gap is biggest in mountains, around water, or on islands.

      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 the direction of a great circle changes continually.1 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.3
      • Nautical miles (nmi): used in air and sea travel.4 1 nmi = 1.852 km exactly.3
      • Feet and meters: best for short distances.

      How the Math Works

      The haversine formula is a formula of spherical trigonometry for great-circle distance.1 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 mean radius, about 6,371 km.2 That is about 3,959 miles. Because it treats Earth as a sphere, it is slightly less exact than a method that uses Earth's true shape.

      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. 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. That last one helps when you are weighing a move or comparing the cost of living in two cities.


      Formulas used

      Haversine term a 1
      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 1
      \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.

      The gap is biggest in mountains, around lakes and bays, and on islands.

      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.

      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, which is 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 typical speeds for each kind of road 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 your own time for stops.

      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. As a rough guide:

      • 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.

      The savings of the great circle grow as the latitude increases, as the trip runs more east–west, and as the difference in longitude grows.1 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. A great circle's true direction changes continually, so your compass heading slowly shifts as you travel.1

      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.

      Which distance should I use for a flight?

      Use the great-circle distance in nautical miles. Air travel measures distance in nautical miles.4

      Real flights are a little longer because of takeoff paths, landing patterns, and weather detours.

      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.


      Sources

      1. American Practical Navigator (Bowditch), Pub. No. 9, Volume II: Useful Tables, Calculations, Glossary of Marine Navigation, 2024 Edition. National Geospatial-Intelligence Agency. 2024;§ 147 Haversine Formulas, p. 206; §§ 902-903 Rhumb Lines and Great Circles, pp. 284-285; § 913, pp. 298-299. Accessed September 29, 2026.
      2. Williams DR. Earth Fact Sheet. NASA Goddard Space Flight Center. 2024;Bulk parameters. Accessed September 29, 2026.
      3. NIST Handbook 44 (2026), Appendix C: General Tables of Units of Measurement. National Institute of Standards and Technology. 2026;Units of Length, pp. C-5, C-23. Accessed September 29, 2026.
      4. What is the difference between a nautical mile and a knot? National Ocean Service, NOAA. 2026. Accessed September 29, 2026.