Travel calculators

Travel Distance Calculator

Updated Sep 29, 2026 By Infinity Calculator
Enter Two Locations
Transport Mode
City, address, ZIP, airport code, or landmark.
Start typing to see suggestions; use arrow keys + Enter.
Suggestions use place data adapted from GeoNames (CC BY 4.0).

Distance Results

Straight-Line Distance

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

Driving Route Distance

Distance along the driving route (used for every transport mode)
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—
Loading elevation data…
Elevation data: Terrain Tiles (Mapzen), from USGS SRTM, GMTED2010 and 3DEP, NOAA ETOPO1, Copernicus EU-DEM and other public sources (full credits).
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. Each gives an estimated travel time over the same driving-route distance, at that mode's average speed. 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.

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. The distance is the driving route for every mode, so walking and cycling times do not follow footpaths or cycle routes.

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.

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.

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, the shortest distance along the surface between two points.1 Our flight time calculator relies on the same great-circle math to estimate airborne duration. Road distance here is the length of the driving route, and the walking and cycling times use that same distance. Until the routing service answers, the road distance shown is the straight-line distance multiplied by 1.3. 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. It is a formula of spherical trigonometry.1 Earth is not a perfect sphere, but the haversine formula is accurate enough for almost all everyday uses. 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. Driving time comes from the routing service when it answers, or from an average of 80 km/h (about 50 mph) when it does not. Walking time uses 5 km/h (about 3 mph) and cycling time uses 16 km/h (about 10 mph). Real travel time can be longer due to traffic, weather, road conditions, or rest stops.

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. Air and sea travel measure distance in nautical miles.2 Trucking and shipping companies use road distance to price deliveries. Even hikers and cyclists use distance and elevation data to plan safe, enjoyable routes.


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)
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 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}(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 here is the length of the driving route, which the calculator also uses for walking and cycling times. Road distance is always longer because roads curve around hills, rivers, and buildings.

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 is a nautical mile and who uses it?

A nautical mile equals exactly 1.852 kilometers, or about 1.151 regular miles.3 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.2

How is the travel time estimated?

Driving time comes from the routing service when it answers, or from 80 km/h (about 50 mph) when it does not. Walking uses 5 km/h (about 3 mph) and cycling 16 km/h (about 10 mph), over the driving-route distance. 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, 0° 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. The profile comes from live terrain data; if that data cannot be loaded, no profile is shown.

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. How much longer depends on the roads between the two places.


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; § 903 Great Circles, p. 284; § 913, pp. 298-299. Accessed September 29, 2026.
  2. What is the difference between a nautical mile and a knot? National Ocean Service, NOAA. 2026. 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, p. C-23. Accessed September 29, 2026.