Travel calculators

Travel Distance Calculator

Updated Jul 22, 2026 By Jehan Wadia
Rate Formulas
Enter Two Locations
Transport Mode
City, address, ZIP, airport code, or landmark.
Start typing to see suggestions; use arrow keys + Enter.

Distance Results

Straight-Line Distance

Direct point-to-point distance, not following roads
Miles
Kilometers
Nautical Miles
Feet
Meters

Driving Distance

Distance following roads for the driving route
Miles
Kilometers
Nautical Miles
Feet
Meters

Estimated Travel Time

Estimate does not account for traffic, stops, or road conditions.

Direction & Midpoint

Bearing (origin → destination)
Geographic Midpoint
Show midpoint coordinates
Step-by-Step Solution
Route Map
Origin (A) Destination (B) Midpoint (M) Road route Straight line
Elevation Profile
Minimum Elevation
Maximum Elevation
Total Elevation Gain
Elevation profile is estimated until live terrain data loads.
Common City-to-City Distances for Reference
Approximate straight-line distances between well-known city pairs.
FromTo MilesKilometersNautical Miles

Introduction

This free travel distance calculator tells you how far it is between any two places in the world. Just type in where you start and where you want to go, and the tool does the rest. It gives you the straight-line distance and the road distance in miles, kilometers, nautical miles, feet, and meters.

You can pick from three travel modes: driving, walking, or cycling. For each mode, you get an estimated travel time so you can plan your trip. The calculator also shows a route map, an elevation profile, the compass bearing from start to end, and the geographic midpoint between both locations.

Every result includes a step-by-step breakdown of the math behind it. The tool uses the haversine formula, which measures the shortest path over the curved surface of the Earth. This makes it useful for students, travelers, pilots, and anyone who needs to calculate distance between two cities, airports, landmarks, or addresses quickly and accurately. If you are planning a flight, you can also use our flight time calculator to estimate how long your journey will take by air.

How to Use Our Travel Distance Calculator

Enter two locations below to find the straight-line distance, road distance, travel time, bearing, midpoint, and elevation between them. The calculator also shows a route map and a step-by-step breakdown of how the distance is found.

Transport Mode: Pick how you plan to travel. Choose Driving, Walking, or Cycling. This changes the estimated travel time and route details shown in your results.

From (Origin): Type the place where your trip starts. You can enter a city and state, a street address, a ZIP code, an airport code, or a landmark. A list of suggestions will appear as you type. Click one or press Enter to select it.

To (Destination): Type the place where your trip ends. Just like the origin field, you can use a city name, address, ZIP code, airport code, or landmark. Pick a suggestion from the list or press Enter.

Swap: Click the Swap button to switch your origin and destination with one click.

Calculate Distance: Press the Calculate Distance button to see your results. The tool will show distances in miles, kilometers, nautical miles, feet, and meters for both the straight-line path and the road route. You will also see estimated travel time, compass bearing, geographic midpoint, an interactive route map, and an elevation profile chart. For a more detailed look at your driving journey, try our drive time calculator to factor in specific road conditions and speeds.

How to Calculate the Distance Between Two Places

A travel distance calculator helps you find how far apart two locations are. You can use it to measure the distance between cities, airports, landmarks, or any two points on Earth. It gives you results in miles, kilometers, nautical miles, feet, and meters so you can pick the unit that works best for you. For purely mathematical point-to-point calculations on a coordinate plane, you may also find our distance calculator helpful.

Straight-Line Distance vs. Road Distance

There are two main ways to measure distance between two places. Straight-line distance (also called "as the crow flies") is the shortest path between two points on the globe. It follows the curve of the Earth in a line called a great circle. This is the type of distance pilots use when planning flights, and our flight time calculator relies on the same great-circle math to estimate airborne duration. Road distance is the actual length you would travel by car, bike, or on foot. Road distance is always longer than straight-line distance because roads curve, turn, and go around obstacles like mountains and lakes.

The Haversine Formula

To find the straight-line distance between two places, this calculator uses the haversine formula. This math formula takes the latitude and longitude of each location and calculates the distance along the surface of a sphere. Earth is not a perfect sphere, but the haversine formula is accurate enough for almost all everyday uses. It is the same formula used in aviation and shipping to plan routes across oceans. The formula also calculates a geographic midpoint between your two locations, which can be useful for finding a meeting spot halfway between two cities.

Bearing and Direction

Along with distance, it helps to know the bearing — the compass direction you would face when heading from one place to the other. Bearing is measured in degrees from 0° to 360°, where 0° is due north, 90° is east, 180° is south, and 270° is west. Knowing the bearing tells you which general direction your destination is from your starting point. Pilots also factor in wind when navigating headings, which is where a crosswind calculator becomes essential for safe flight planning.

Estimated Travel Time

Travel time depends on your mode of transport. A car on a highway moves much faster than a person walking or riding a bike. This calculator estimates travel time using average speeds: about 50 mph (80 km/h) for driving, 3 mph (5 km/h) for walking, and 10 mph (16 km/h) for cycling. Real travel time can be longer due to traffic, weather, road conditions, or rest stops. For a deeper look at how speed, distance, and time relate to each other, check out our speed distance time calculator. If you want to estimate your arrival window more precisely, our ETA calculator can help you nail down the timing. Walkers can also track their journey with our walking distance calculator, while cyclists may want to use our pace calculator to fine-tune their speed targets.

Why Distance Calculations Matter

Knowing the distance between two places is useful for planning road trips, estimating fuel costs, booking flights, or simply satisfying your curiosity. Pilots and navigators rely on nautical miles and great-circle distances every day, often alongside tools like a density altitude calculator or pressure altitude calculator to ensure safe takeoffs and landings. Trucking and shipping companies use road distance to price deliveries. Even hikers and cyclists use distance and elevation data to plan safe, enjoyable routes. If you are driving, our fuel cost calculator can help you budget for gas, and our gas mileage calculator lets you see how efficiently your vehicle uses fuel over the trip. For those traveling across regions, our time zone calculator is handy for adjusting your schedule, and a toll calculator can help you account for highway tolls along your route. You might also consider the environmental impact of your journey using our carbon footprint calculator.


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)
c = 2\,\operatorname{atan2}\!\left(\sqrt{a},\;\sqrt{1-a}\right)
Great-circle distance
d = R \times c \quad (R = 6371.0088\;\text{km})
Initial 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}(B_y,\;\cos\varphi_1+B_x)
Estimated travel time
t = \frac{d}{v}

Frequently asked questions

What is the difference between straight-line distance and road distance?

Straight-line distance is the shortest path between two points over the curved surface of the Earth. It is sometimes called "as the crow flies." Road distance is the actual path you would drive, walk, or bike. Road distance is always longer because roads curve around hills, rivers, and buildings.

How accurate is the travel distance calculator?

The straight-line distance uses the haversine formula and is accurate to within a fraction of a percent for any two points on Earth. The road distance comes from OpenStreetMap routing data and closely matches real driving routes. However, actual mileage may differ slightly due to detours, construction, or road changes.

What types of locations can I enter?

You can type a city and state, a full street address, a ZIP code, an airport code like JFK or LAX, or a landmark like Grand Canyon or Eiffel Tower. The tool will show suggestions as you type. Pick one from the list or press Enter.

Can I find the distance between two international cities?

Yes. The calculator works for any two places in the world. You can measure the distance from New York to London, Tokyo to Sydney, or any other pair of cities across different countries and continents.

What units does the calculator show?

Results are shown in five units: miles, kilometers, nautical miles, feet, and meters. All five appear at once for both straight-line and road distances, so you do not need to convert anything yourself.

What is a nautical mile and who uses it?

A nautical mile equals 1.852 kilometers or about 1.151 regular miles. It is used mainly in aviation and maritime navigation. Pilots and ship captains prefer nautical miles because one nautical mile equals one minute of latitude, which makes charting courses on maps easier.

How is the travel time estimated?

The calculator uses average speeds for each mode: about 50 mph (80 km/h) for driving, 3 mph (5 km/h) for walking, and 10 mph (16 km/h) for cycling. These are rough averages. Real travel time can change due to traffic, weather, terrain, or rest stops.

Does the travel time account for traffic?

No. The estimated travel time does not include traffic delays, red lights, rest stops, or road conditions. It is a baseline estimate based on average speed and route distance. Plan extra time for real-world conditions.

What does the compass bearing tell me?

The bearing is the compass direction from your starting point toward your destination, measured in degrees. For example, means due north, 90° is east, 180° is south, and 270° is west. It tells you which general direction to face when heading to your destination.

What is the geographic midpoint?

The geographic midpoint is the spot exactly halfway between your two locations along the surface of the Earth. It is useful for finding a meeting place between two cities or just seeing what lies at the halfway mark of your trip.

What does the elevation profile show?

The elevation profile is a chart that shows how high or low the ground is along your route. It displays minimum elevation, maximum elevation, and total elevation gain in both feet and meters. This helps hikers, cyclists, and drivers see how hilly or flat a route is.

Where does the elevation data come from?

The tool first shows an estimated elevation profile, then tries to load live terrain data from the Open-Meteo elevation API. Once the live data loads, the chart and elevation stats update automatically to reflect real terrain.

Can I use this calculator for flight distance?

Yes. The straight-line distance shown by this calculator is the great-circle distance, which is the same measurement airlines use to determine flight distance. The nautical miles figure is especially useful for aviation purposes.

What is the Swap button for?

The Swap button switches your origin and destination in one click. This is handy if you want to quickly check the return trip distance without retyping both locations.

Why is my road distance much longer than the straight-line distance?

Roads do not follow a straight path. They curve around mountains, lakes, rivers, and buildings. They also follow highways and city streets that add extra length. For short trips the difference may be small, but for long trips the road distance can be 20% to 50% longer than the straight-line distance.

Does the calculator work on mobile phones?

Yes. The calculator is fully responsive and works on phones, tablets, and desktop computers. The map, charts, and all input fields adjust to fit your screen size.

Can I drag the route map?

Yes. You can click and drag the map to pan around. Use the + and buttons to zoom in and out. You can also click Enlarge Map to open a bigger version of the map.

What does the step-by-step solution section show?

It breaks down the math used to find the distance. It shows the coordinates of both locations, the haversine formula values, the central angle, the resulting great-circle distance, and the initial bearing. This is helpful for students learning about geographic distance calculations.

Is the calculator free to use?

Yes. The travel distance calculator is completely free. There are no limits on how many times you can use it, and you do not need to create an account.

What happens if the tool cannot find my location?

If the calculator cannot find a location you typed, it will show an error message asking you to try again. Use a more specific name, such as adding the state or country. For example, type Springfield, IL instead of just Springfield, since many cities share the same name.