Distance calculator
Search two places, paste coordinates or tap the map to get the straight-line distance. One more tap gives you the distance by road, by bike or on foot.
Example From New York to Los Angeles. Change the points to measure your own.
Loading the map…
Result
In a straight line
2,464miNew York → Los Angeles
- Initial bearing
- 274° (W)
- Final bearing
- 246° (SW)
- In the other unit
- 3,966 km
By road
Tap a way to travel to see the distance and time along the route.
To give you an idea
3.4 times New York – Chicago
What next?
Open these same two points in another tool, without searching again.
Save or share this trip
How to use it
-
Pick two points
Type a town, an address or coordinates in any format, use your location or tap the map. Drag A or B to fine-tune.
-
Read the distance
You get the straight-line distance, measured on the real shape of the Earth, plus the initial bearing. Switch between miles and kilometers anytime.
-
See the route
Tap Driving, Cycling or Walking for the distance and time along the way. Open it in Google Maps or copy the link to share it.
What it’s for
-
Plan a trip
See how far apart two cities are before deciding whether to drive, take the train or fly.
-
House or job hunting
Measure how far a home is from the office, a school or the station, in a straight line and by road.
-
Hiking and sports
Measure from one summit to another, or from the trailhead to the hut, and compare the straight line with the trail.
-
School and curiosity
New York to Honolulu is 4,971 mi (7,999 km) as the crow flies. See why the line looks curved on the map.
How it’s calculated
Mapsfera measures on the WGS84 ellipsoid, the slightly flattened shape of the Earth used by GPS and maps, with Charles Karney’s method (GeographicLib). It finds the shortest distance between two points to within nanometers. To get the idea, the haversine formula does the same job on a sphere.
On a sphere (haversine)
d = 2R · asin √( sin²(Δφ/2) + cos φ₁ · cos φ₂ · sin²(Δλ/2) )
φ is latitude, λ is longitude (in radians) and R is the Earth’s mean radius, 6,371 km (3,959 miles).
On the ellipsoid (what Mapsfera uses)
d = length of the geodesic on WGS84
Semi-major axis a = 6,378,137 m and flattening f = 1/298.257223563, solved with Karney’s method (2013).
| New York | 40.66270° N, 73.93870° W |
|---|---|
| Los Angeles | 34.01940° N, 118.41080° W |
| On a sphere (haversine) | 2,459 mi (3,957 km) · 3,957,326 m |
| On the ellipsoid (Mapsfera) | 2,464 mi (3,966 km) · 3,966,044 m |
| Difference | 5.42 mi (8.72 km) · 0.22% |
| Initial bearing | 274° (W) |
A sphere is off by up to 0.5%: no big deal for short hops, but it adds up to miles on a long trip. That’s why Mapsfera uses the ellipsoid. The tool also gives the initial bearing, the angle from north you’d set off on to go from A to B along the shortest path.
Why the line looks curved on the map
The shortest path on the Earth (the geodesic, or great-circle route) is part of a great circle. On a map like this one, which stretches the far north and south, it looks curved. New York to Honolulu is 4,971 mi (7,999 km): you set off on a bearing of 283° (W) and arrive on a bearing of 233° (SW). The heading keeps changing along the way.
If you kept the same compass heading the whole time (a straight line on this map, called a rhumb line), the trip would be longer. That’s why flights from the US to Europe swing up toward Canada and Greenland.
Frequently asked questions
Is the distance a straight line or by road?
Both. First you get the straight-line distance, as the crow flies. Tap Driving, Cycling or Walking to also see the distance and travel time along the route, drawn on the map.
How far is New York from Los Angeles as the crow flies?
2,464 mi (3,966 km), measured between the points Mapsfera uses for each city (40.66270° N, 73.93870° W and 34.01940° N, 118.41080° W). By road it’s longer: tap Driving in the tool to see it.
What coordinates can I type?
Almost any format: decimal degrees (40.7128, -74.0060), degrees, minutes and seconds (40°42′46″N 74°0′22″W), UTM with its zone, MGRS, a Plus Code or a Google Maps link with coordinates. Paste them into the A or B box.
How accurate is it?
The straight-line distance is exact: it’s measured on the WGS84 ellipsoid with GeographicLib. Measuring on a sphere, as many calculators do, changes the result a little: for New York to Los Angeles, by 5.42 mi (8.72 km). Road distances depend on the OpenStreetMap data and the route chosen.
Why is the line on the map curved?
Because it’s the shortest path on a round Earth drawn on a flat map. The longer the trip and the farther from the equator, the more it curves.
How do I share or save the measurement?
Use Copy link: anyone who opens it sees the same two points. You can also download the map as a PNG, or the points and lines as GeoJSON or KML for Google Earth.
Do I need to sign up or pay?
No. It’s free, works in the browser on your phone or computer, and doesn’t ask for an account.
Related tools
All toolsSources
- GeographicLib (distances, bearings and midpoints on the WGS84 ellipsoid) · Charles F. F. Karney (MIT license)
- Driving, cycling and walking routes (OSRM) · FOSSGIS e. V., with OpenStreetMap data
- Base map · OpenFreeMap, with data © OpenStreetMap contributors
- Place search and place names · Photon (Komoot), with OpenStreetMap data