Last updated:
Distance Calculator
How Far Is It? Calculate the Distance Between Two Points Instantly
Planning a road trip, estimating shipping costs, or checking how far a delivery needs to travel – all of these start with one question: what is the distance? A distance calculator gives you the answer in seconds. Enter the coordinates or names of two locations and get the precise straight-line (as-the-crow-flies) distance between them.
Distance Calculator
Unit conversion reference
| From | To | Multiply by |
|---|---|---|
| Kilometres | Miles | 0.6214 |
| Miles | Kilometres | 1.6093 |
| Kilometres | Nautical miles | 0.5400 |
| Nautical miles | Kilometres | 1.8520 |
The tool uses geographic coordinates – latitude and longitude – to determine how many kilometres, miles, or nautical miles separate two points on the Earth’s surface.
How Does a Distance Calculator Work?
Every location on Earth can be described by two numbers: latitude (north–south position, −90° to +90°) and longitude (east–west position, −180° to +180°). A distance calculator takes two pairs of coordinates and applies a spherical geometry formula to compute the shortest path along the surface.
The standard method is the Haversine formula, which treats the Earth as a sphere with a mean radius of 6,371 km (3,959 mi). For points that are relatively close – within a few hundred kilometres – the result is nearly identical to what you would get with more complex models.
For higher accuracy over very long distances (intercontinental), some calculators use the Vincenty formula, which models the Earth as an oblate spheroid (equatorial radius 6,378.137 km, polar radius 6,356.752 km). This reduces the maximum error to under 0.5 mm on any bearing.
What Is the Haversine Formula?
The Haversine formula calculates the great-circle distance – the shortest route between two points on a sphere. The equation is:
a = sin²(Δφ / 2) + cos(φ₁) · cos(φ₂) · sin²(Δλ / 2)
c = 2 · atan2(√a, √(1 − a))
d = R · c
Where:
- φ₁, φ₂ – latitudes of the two points in radians
- Δφ – difference in latitude
- Δλ – difference in longitude
- R – Earth’s mean radius (6,371 km)
- d – resulting distance
A practical example: New York City (40.7128° N, 74.0060° W) and London (51.5074° N, 0.1278° W). Applying the Haversine formula gives approximately 5,570 km (3,460 mi) as the straight-line distance.
Straight-Line Distance vs Driving Distance
| Feature | Straight-Line | Driving |
|---|---|---|
| Method | Great-circle on a sphere | Road network routing |
| Accounts for terrain | No | Yes |
| Typical difference | Baseline | 20–40% longer |
| Best for | Geographic comparison, aviation, shipping estimates | Trip planning, fuel cost, delivery logistics |
Straight-line distance (also called “as the crow flies”) is the shortest surface path with no obstacles. Driving distance follows roads and highways, so it is always equal to or greater than the straight-line value. For example, the straight-line distance between Los Angeles and San Francisco is roughly 560 km, while the driving distance via Interstate 5 is about 615 km.
If you need driving distance and travel time, use a routing service such as Google Maps or OpenRouteService. The calculator on this page computes the geometric (straight-line) distance.
When to Use a Distance Calculator
Travel and road trips. Get a quick estimate of how far apart two cities are before deciding on a route or comparing flight vs. driving options.
Logistics and shipping. Freight companies calculate straight-line distances to estimate fuel surcharges, zone-based pricing, and delivery timeframes.
Real estate and property. Measure the distance from a property to schools, workplaces, hospitals, or transit stations.
Education and geography. Students and teachers use coordinate-based distance calculations in map-reading exercises, GIS projects, and science fair experiments.
Aviation and maritime. Pilots and ship navigators rely on nautical-mile calculations to plan fuel loads and flight paths. The calculator supports nautical miles as an output unit for this purpose.
Common Distance Units
- Kilometre (km) – the standard metric unit; 1 km = 0.6214 mi
- Statute mile (mi) – used in the United States, United Kingdom (road signs), and Liberia; 1 mi = 1.609 km
- Nautical mile (nmi) – used in aviation and maritime navigation; 1 nmi = 1.852 km = 1.151 statute miles
- Metre (m) – for short distances; 1 km = 1,000 m
- Foot (ft) – used in aviation altitude and US construction; 1 mi = 5,280 ft
The calculator lets you switch between kilometres, miles, and nautical miles so you get the result in the unit that fits your task.
This tool provides approximate straight-line distances for informational purposes. For official surveying or navigation data, consult certified geodetic sources.
Frequently Asked Questions
How accurate is a straight-line distance calculator?
A straight-line calculator using the Haversine formula is accurate to within 0.3% for most pairs of locations on Earth. Minor deviations occur because Earth is not a perfect sphere but an oblate spheroid with an equatorial bulge of about 21 km.
Can I calculate the distance between any two cities in the world?
Yes. Enter the latitude and longitude of both cities, and the calculator returns the shortest surface distance. Many tools also let you type city names directly and auto-fill the coordinates.
What is the difference between nautical miles and statute miles?
One statute mile equals 1.609 km, while one nautical mile equals 1.852 km. Nautical miles are used in aviation and maritime navigation because they correspond to one minute of arc of latitude.
Why is the straight-line distance shorter than the driving distance?
Roads follow terrain, avoid obstacles, and must obey engineering constraints such as maximum slope and turn radius. Driving distance is typically 20–40% longer than the straight-line distance between the same two points.
Does the distance calculator account for altitude differences?
No. The calculator measures surface distance along the curvature of the Earth. Altitude changes between two points have a negligible effect on horizontal distance for everyday purposes.
What coordinate format does the calculator accept?
It accepts decimal degrees (e.g., 40.7128, −74.0060). If your coordinates are in degrees-minutes-seconds, convert them by dividing minutes by 60 and seconds by 3,600, then adding the results to the degree value.