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.