Last updated: Aug 08, 2026
Distance Calculator
Twelve independent tools for great-circle distance, driving, flying, sailing, pace, unit conversion, multi-stop routing, and real-world scale — updated for 2026 with full breakdowns on every result.
Distance Between Two Locations
Great-circle (Haversine) distance between any two points on Earth, plus initial bearing and midpoint. Search from 2,000+ cities worldwide (every country's capital included) or enter exact coordinates.
| Unit | Value |
|---|---|
| Kilometers | — |
| Miles | — |
| Nautical Miles | — |
| Meters | — |
Formula & method used
a = sin²(Δφ/2) + cosφ1·cosφ2·sin²(Δλ/2), then d = 2R·atan2(√a, √(1−a)) with Earth radius R = 6371.0088 km. This treats Earth as a sphere; real-world flight/driving distances are longer due to routing.Distance Formula Calculator (2D / 3D)
Euclidean distance between two coordinate points using the Pythagorean distance formula, in a plane or in 3D space.
Formula used
d = √((x2−x1)² + (y2−y1)²). 3D: d = √((x2−x1)² + (y2−y1)² + (z2−z1)²). Directly derived from the Pythagorean theorem extended into n-dimensional space.Speed, Time & Distance Calculator
Solve for any one of the three variables using d = s × t, with a live motion simulation of the trip.
Formula used
distance = speed × time, rearranged to speed = distance / time or time = distance / speed. Assumes constant velocity with no acceleration.Driving Distance & Fuel Cost Calculator
Converts straight-line distance into a realistic road distance, drive time, fuel used, and total trip cost.
Flight Distance & Duration Calculator
Estimates commercial flight time, routing distance, fuel burn and CO₂ emissions from a great-circle distance.
Walking, Running & Cycling Calculator
Pace, total time and estimated calories burned for any activity and distance, with an effort-zone gauge.
Nautical & Maritime Distance Calculator
Sailing time and heading for a nautical route, factoring in current or wind drift, shown on a compass force diagram.
Bearing & Midpoint Navigation Calculator
Initial and final compass bearing between two coordinates, midpoint, and great-circle vs rhumb-line comparison.
Universal Distance Unit Converter
Convert one value into 20 different distance units at once, from millimeters to light-years, with a magnitude comparison chart.
| Unit | Value |
|---|
Multi-Stop Route Distance Calculator
Total distance across a chain of waypoints, visited in the order you add them, with a per-leg breakdown.
| Leg | From → To | Distance |
|---|
Multi-Modal Comparison & Scenario Tool
Compare travel time and estimated CO₂ across walking, cycling, driving, train and flight for the same distance.
| Mode | Time | CO₂ (approx) |
|---|
Real-World Distance Explorer
Places your distance on a logarithmic scale ladder next to marathons, Earth's circumference, the Moon, the Sun and beyond.
Distance Calculator: Coordinates, Speed, Flight, Fuel & More
Published by the Intelligent Calculator Editorial Team
A distance calculator finds out how far apart two places are. It works for GPS coordinates, straight-line graph points, or an entire multi-city road trip.
You might also see this type of tool called a mileage calculator or a distance finder. All three names describe the same idea: turning two locations into one useful number.
This guide covers every major use case: driving, flying, walking, running, sailing, and even astronomical distances. Whether you’re planning a trip, studying geometry, or comparing travel options, you’ll find the right method below.
Distance calculations matter because they drive real decisions. Fuel budgets, flight times, training plans, and delivery routes all depend on getting the number right.
What Is a Distance Calculator?
A distance calculator is a tool that computes the space between two or more points. It can measure straight-line distance, real travel distance, or distance on a flat coordinate plane.
Most online tools rely on one of three core methods.
- Euclidean distance — a straight-line measurement between two points on a flat plane (2D or 3D).
- Haversine formula — great-circle distance between two latitude/longitude points on a sphere, used for maps and flights.
- Speed-time-distance formulas — used when you know how fast something travels and for how long.
For most everyday questions, these three methods are enough. For high-precision or professional GIS work, more advanced models exist too, including the Vincenty formula and coordinate systems like WGS84 — both explained later in this guide.
Each method solves a different problem. Picking the right one is the first step toward an accurate result.
Which Distance Calculator Should I Use?
With so many tools on one page, it helps to match your situation to the right one before you scroll further.
- Comparing two cities or GPS points? Use the coordinates calculator (Haversine formula).
- Solving a math or geometry problem? Use the 2D/3D distance formula calculator.
- Planning a road trip budget? Use the driving distance and fuel cost calculator.
- Booking or estimating a flight? Use the flight distance and duration calculator.
- Training for a run or ride? Use the walking, running, and cycling calculator.
- Planning a boat trip or sailing route? Use the nautical and maritime calculator.
- Need a compass direction, not just a distance? Use the bearing and midpoint calculator.
- Visiting three or more stops? Use the multi-stop route calculator.
- Deciding between transport modes? Use the multi-modal comparison tool.
Distance Between Two Locations (Coordinates)
This is the most common request: how far apart are two cities, addresses, or GPS points?
Inputs
You enter two locations, either by name or by latitude and longitude.
Formula
The calculator applies the Haversine formula, which accounts for Earth’s curved surface.
a = sin²(Δlat/2) + cos(lat1) × cos(lat2) × sin²(Δlon/2)
distance = 2 × R × asin(√a)
Here, R is Earth’s mean radius, about 6,371 kilometers. This average radius figure comes from geodetic reference standards used across mapping and navigation, including the WGS84 system that underlies most GPS devices.
Assumption
This treats Earth as a perfect sphere. Real driving or flying distance will be longer, because roads and flight paths aren’t perfectly straight.
Example
New York (40.7128°N, 74.0060°W) to Tokyo (35.6762°N, 139.6503°E) is about 10,850 km (6,742 miles) as the crow flies. That phrase — “as the crow flies” — is just another way of describing this straight-line, Haversine-based result.
How Accurate Is the Haversine Formula?
The Haversine formula treats Earth as a perfect sphere, so it carries a small built-in error. For most city-to-city distances, that error is typically well under one percent, which is fine for trip planning, comparisons, and general use.
For survey-grade or aviation-grade precision, professionals often reach for the Vincenty formula instead. Vincenty treats Earth as an ellipsoid rather than a perfect sphere, which produces a more precise result at the cost of more complex math. This more precise, ellipsoid-based approach is sometimes called geodesic distance.
Pro tip: For everyday questions — how far is my commute, how far is this flight — Haversine is accurate enough. Reach for ellipsoidal or geodesic tools only when you need survey-level precision, such as long polar routes or professional mapping work.
Distance Formula Calculator (2D and 3D Points)
This tool solves the classic geometry problem: distance between two points on a graph.
Formulas
2D formula: d = √[(x2−x1)² + (y2−y1)²]
3D formula: d = √[(x2−x1)² + (y2−y1)² + (z2−z1)²]
Example
Points (0,0) and (4,3) give a distance of 5 units — a classic 3-4-5 right triangle. If triangle geometry like this comes up often in your work, our right triangle calculator solves for sides and angles directly, and our arc length calculator handles curved-path distances along a circle.
Students use this for math homework. Engineers and game developers use it for spatial modeling and collision detection.
Universal Distance Unit Converter
Unit mismatches cause real planning errors — a fuel budget built on miles when your car’s gauge reads liters per 100 km can throw off an entire trip. This tool converts between measurement systems instantly.
| From | To | Multiply By |
|---|---|---|
| Kilometers | Miles | 0.621371 |
| Miles | Kilometers | 1.60934 |
| Nautical miles | Kilometers | 1.852 |
| Miles | Nautical miles | 0.868976 |
| Meters | Feet | 3.28084 |
For quick reference: one kilometer equals about 0.62 miles, one mile equals about 1.61 kilometers, and one nautical mile equals about 1.85 kilometers.
For dedicated single-conversion tools, try our kilometers to miles converter, meters to miles converter, or feet to miles converter.
Example: A marathon (42.195 km) equals 26.219 miles.
Speed, Time and Distance Calculator
This calculator solves for whichever value you’re missing, using the basic motion formula.
Distance = Speed × Time
You can rearrange this to solve for speed (Distance ÷ Time) or time (Distance ÷ Speed).
Example: Traveling 180 km at 90 km/h takes exactly 2 hours.
This tool is useful for trip planning, physics homework, and estimating arrival times. For a single-variable physics lookup, our velocity calculator isolates speed on its own. If you need speed for a specific projectile scenario, our arrow speed calculator is a more specialized fit.
Driving Distance and Fuel Cost Calculator
This goes beyond raw distance to estimate what a road trip actually costs.
Inputs
Distance, average speed, fuel efficiency (mpg or L/100km), fuel price, and number of passengers.
Output
Total drive time, fuel needed, total fuel cost, and cost per passenger.
Example
A 500 km trip at 90 km/h, with a car averaging 7.5 L/100km and fuel at $1.55/liter, costs roughly $58 in fuel — split two ways, that’s $29 per person. Figures are in USD for this example; if you’re budgeting in a different currency, convert your fuel price first, since this calculator does not perform currency conversion automatically.
Limitation
This doesn’t include tolls, traffic delays, or terrain (hills increase fuel use). For a deeper dive into fuel math on its own, use our fuel cost calculator, or check fuel efficiency directly with our mpg calculator or gas mileage calculator.
Flight Distance and Duration Calculator
Air travel needs its own model because planes cruise at set altitudes and speeds, and boarding adds fixed time.
Inputs
Distance, cruising speed, buffer time (for taxi, takeoff, landing), fuel burn rate, and passenger count.
Example
A 5,570 km flight at 900 km/h, plus a 35-minute buffer, takes about 6 hours 39 minutes total.
Pro tip: Always add buffer time. Airlines typically build in 30–45 minutes for ground operations beyond pure flight time.
Limitation: This calculator estimates flight duration using distance and cruising speed; it does not currently adjust for time zone crossings, which can shift your local arrival time even though total flying time stays the same. If you’re coordinating arrival times across regions, pair this tool with our time difference calculator.
Walking, Running and Cycling Calculator
This tool switches the math around: instead of finding distance, you often want pace or calories.
Inputs
Distance, activity type (walk, run, cycle), pace or speed, and body weight.
Output
Estimated time, average pace, and calories burned.
Example
A 10 km run at a 5:30 min/km pace takes 55 minutes and burns roughly 500–650 calories, depending on body weight.
Common mistake: People confuse pace (minutes per km) with speed (km per hour). Double-check which unit your target number uses.
Limitation: These estimates assume flat ground. Elevation gain increases both time and calorie burn on hilly routes or trail runs, so treat flat-pace estimates as a baseline, not a guarantee, for hilly terrain.
Nautical and Maritime Distance Calculator
Ships measure distance in nautical miles (sometimes abbreviated nm), not kilometers or statute miles. One nautical mile equals 1.852 km, a figure defined internationally by the 1929 International Extraordinary Hydrographic Conference and still used today in maritime and aviation navigation.
This calculator also factors in ocean current speed and direction, since currents can speed up or slow down a vessel’s actual travel time.
Example: A 240 nautical mile route at 18 knots, with a 3-knot current at a different bearing, changes the estimated arrival time compared to still water. To convert a speed reading in knots to miles per hour, our knots to mph converter does that in one step.
Limitation: Real maritime routing avoids shipping lanes, weather, and obstacles — this tool assumes a direct path.
Sailors and pilots also choose between two path types over a sphere: the great-circle route (the shortest possible path, which this calculator uses) and the rhumb line (a path that holds a constant compass bearing, which is longer but easier to steer by hand). Great-circle navigation is faster; rhumb-line navigation is simpler to follow.
Bearing and Midpoint Navigation Calculator
Beyond distance, navigators need direction (bearing) and the exact midpoint between two coordinates. Anyone planning a meeting point between two cities, or steering a boat or plane along a set course, needs both numbers.
Formula
Initial bearing is calculated as:
θ = atan2( sin(Δlong) × cos(lat2), cos(lat1) × sin(lat2) − sin(lat1) × cos(lat2) × cos(Δlong) )
Bearing tells you the compass direction from point A to point B, measured in degrees (0–360°). Midpoint is the geographic center point along the great-circle path between two coordinates. Bearing and midpoint both come from the same great-circle geometry used in the Haversine section above — they’re two more outputs of the same underlying sphere model.
Example
New York to Tokyo has an initial bearing of roughly 330°, meaning the shortest path heads northwest before curving — a result of great-circle geometry, not a straight line on a flat map.
Important: Initial bearing is not constant along a great-circle route. Because the path curves over a sphere, your compass heading changes gradually as you travel, unlike a straight line on a flat map. The “initial bearing” is only your starting direction; your “final bearing” on arrival will usually be different.
For the underlying trigonometry, our right triangle calculator is a useful companion when you’re working through angle-and-side relationships by hand.
Multi-Stop Route Distance Calculator
Planning a road trip with several stops? This tool calculates the total distance across every leg of the journey.
You enter three or more locations in order. The calculator sums the Haversine distance between each consecutive pair.
Example: A three-city route totals every leg’s distance and reports the number of legs and the average distance per leg.
Limitation: This tool does not auto-optimize stop order. Rearranging your stops manually could shorten the total trip — a challenge known as the “traveling salesman problem” in computer science.
Multi-Modal Comparison and Scenario Tool
Should you walk, cycle, drive, take a train, or fly? This calculator compares all options side by side.
| Mode | Avg. Speed | CO₂ per km | Notes |
|---|---|---|---|
| Walking | 5 km/h | 0 kg | No cost, zero emissions |
| Cycling | 16 km/h | 0 kg | Minimal cost |
| Driving | 80 km/h | 0.192 kg | Fastest for mid-range trips |
| Train | 120 km/h | 0.041 kg | Lower emissions than driving |
| Flight | 700 km/h | 0.255 kg | Fastest long-distance, highest emissions |
Example: Over 350 km, driving is often the fastest practical option, while train travel produces far less estimated CO₂ than flying. These figures are typical average values drawn from standard transportation emissions and speed benchmarks; actual results vary by vehicle, route, and load.
Expert insight: For trips under 500 km, trains frequently beat flights on total door-to-door time once airport procedures are included.
Real-World Distance Explorer
Numbers feel abstract without context. This tool compares any distance to familiar real-world references, which helps you actually feel the scale of a number instead of just reading it.
| Reference | Distance |
|---|---|
| Football field | 0.1097 km |
| Marathon | 42.195 km |
| English Channel width | 33.8 km |
| Earth’s diameter | 12,742 km |
| Earth’s circumference | 40,075 km |
| Moon distance | 384,400 km |
| Sun distance (1 AU) | ~149.6 million km |
Example: The distance to the Moon (384,400 km) equals roughly 9.6 trips around Earth’s circumference. For scale, the English Channel is only about 300 times shorter than a full marathon multiplied out, and Earth’s diameter would stretch across roughly 116,000 football fields laid end to end.
How These Reference Distances Were Sourced
These figures come from standard astronomical and geodetic reference values — Earth’s circumference and diameter from geodetic survey standards, and the Earth-Moon and Earth-Sun distances from established astronomical measurements, including the internationally recognized astronomical unit (AU). Our astronomical unit converter lets you convert AU to kilometers or miles directly.
Accuracy and Limitations, Side by Side
Every method in this guide makes different trade-offs. Here’s a direct comparison so you can judge which number to trust for your situation.
| Method | What It Measures | Typical Accuracy | Best For |
|---|---|---|---|
| Haversine (straight-line) | Shortest path over a spherical Earth | Under 1% error for most trips | Flights, city comparisons, quick estimates |
| Vincenty / geodesic | Shortest path over an ellipsoidal Earth | Higher precision than Haversine | Surveying, polar routes, professional GIS |
| Driving distance | Actual road-following path | Varies by route; always longer than straight-line | Trip planning, fuel budgeting |
| Nautical distance | Sea route in nautical miles | Assumes a direct path, ignores obstacles | Shipping, sailing |
| Great-circle route | Shortest path between two points on a sphere | Same as Haversine | Aviation, long-distance navigation |
| Rhumb line | Constant-bearing path, easier to steer | Longer than great-circle | Traditional maritime navigation |
Common Mistakes to Avoid
- Mixing units. Always confirm whether a result is in kilometers or miles before comparing numbers.
- Assuming straight-line distance equals driving distance. Roads curve; the Haversine result is always the minimum possible distance.
- Forgetting buffer time for flights, which adds significant time on shorter routes.
- Ignoring currents or wind in maritime and aviation calculations, which can meaningfully change arrival times.
- Skipping degree-to-radian conversion when calculating bearing or Haversine distance by hand — most calculator errors trace back to this one step.
- Mixing up latitude and longitude order when entering coordinates manually.
- Treating Earth’s radius as an exact constant rather than an average value; the true radius varies slightly by location due to Earth’s slightly flattened shape.
Straight-Line vs. Travel Distance: What’s the Difference?
| Type | What It Measures | Typical Use |
|---|---|---|
| Straight-line (Haversine) | Shortest path over Earth’s curved surface | Flights, general comparisons |
| Driving distance | Actual road-following path | Trip planning, fuel budgeting |
| Nautical distance | Sea route in nautical miles | Shipping, sailing |
Straight-line distance is always shorter than real travel distance. The difference grows with road curves, detours, and terrain. This is the “as the crow flies” distance referenced earlier in this guide — the same number the Haversine formula produces.
Frequently Asked Questions
What is a distance calculator, and what does it actually calculate?
A distance calculator computes the space between two or more points. Depending on the tool, that might be straight-line distance, driving distance, flight distance, or distance on a flat coordinate plane.
How accurate is a haversine-based distance calculator?
It’s accurate for straight-line distance, typically within a small margin of error, usually well under one percent for most city-to-city distances. It won’t match driving distance, since it ignores roads.
What is the Haversine formula, and how do you use it step by step?
The Haversine formula finds the shortest path between two latitude/longitude points on a sphere. You convert both coordinates to radians, apply the formula shown earlier in this guide, and multiply the result by Earth’s radius to get a distance.
What’s the difference between a nautical mile and a statute mile?
A nautical mile equals 1.852 km, based on one minute of latitude. A statute (regular) mile equals 1.60934 km. Nautical miles are used at sea and in aviation.
Can I use this calculator for running or cycling training?
Yes. Enter your target distance and pace to get estimated time and calorie burn, useful for planning training runs or rides.
Why is flight distance usually shorter than driving distance?
Flights travel a near-straight great-circle path. Roads must follow terrain, highways, and legal routes, which usually adds distance. This is the same Haversine geometry explained in the coordinates section above.
Does this tool account for traffic, weather, or wind delays?
No. All results are estimates based on average speed and distance. Real-world conditions like traffic, wind, and weather can change actual travel time.
How do I convert kilometers to miles quickly?
Multiply kilometers by 0.621371. For a rough estimate, multiply by 0.6.
What is the difference between speed and pace?
Speed measures distance per unit of time, usually km/h or mph. Pace measures time per unit of distance, usually minutes per kilometer or mile — the two describe the same motion from opposite directions.
How much fuel will a road trip use?
Fuel use depends on distance, your vehicle’s efficiency (mpg or L/100km), and fuel price. The driving distance and fuel cost calculator above walks through a full worked example.
Does the initial bearing between two points stay the same along the whole route?
No. Because great-circle routes curve over a sphere, your compass heading shifts gradually during the trip. Your bearing on arrival, called the final bearing, is usually different from your initial bearing.
How many kilometers is a marathon, and how far is that in miles?
A marathon is 42.195 km, which equals 26.219 miles.
Does currency or exchange rate affect the fuel-cost example?
The fuel cost example above uses USD. This calculator does not convert currencies automatically, so enter your local fuel price in your own currency for an accurate result.
How do airlines calculate flight time?
Airlines combine great-circle flight distance with cruising speed, then add buffer time for taxiing, takeoff, and landing. That buffer is typically 30 to 45 minutes beyond pure flying time.
Key Takeaways
A distance calculator turns raw coordinates or numbers into answers you can actually use, whether that’s a road trip budget, a flight time, or a training pace.
Different methods suit different needs: Haversine for maps, Euclidean for geometry, Vincenty for high-precision work, and speed-time-distance for motion problems.
Always check your assumptions. Straight-line distance, driving distance, and travel time are related but not the same number.
Use the tool that matches your real question, double-check your units, and you’ll get a result you can trust for planning, studying, or comparing travel options. Explore powerful Math calculators to solve equations, formulas, and problems quickly and accurately.
