Distance Calculator
Calculate distance between two GPS coordinates. Kilometers, miles, nautical miles.
Point A
Point B
Formula: Uses the Haversine formula to calculate the great-circle distance between two points on Earth.
Calculate the great-circle distance between two points on Earth using the Haversine formula. Results in kilometers, miles, and nautical miles.
This calculator computes the great-circle distance between any two points on Earth from their latitude and longitude. Enter both coordinates in decimal degrees (for example 40.748817, -73.985428 for the Empire State Building) and the result appears in three units at once: kilometers, miles, and nautical miles, each rounded to two decimal places. A Load Example button fills in New York and London so you can see the expected input format before typing your own points.
The math behind it is the Haversine formula, the standard method for distance on a sphere. It treats Earth as a ball with a mean radius of 6,371 km and computes the shortest arc between the two points along the surface. Because Earth is actually a slightly flattened ellipsoid, Haversine results can differ from geodesic calculations by up to about 0.5 percent, which is accurate enough for flight planning estimates, geofencing checks, and general distance questions.
Keep in mind that this is the as-the-crow-flies distance, not a road route. The driving distance between two cities is almost always longer because roads curve around terrain, water, and borders. If your coordinates are in degrees-minutes-seconds format, convert them first with the GPS Coordinate Formatter on this site, then paste the decimal values here.
- 1
Enter Point A
Type the first location's latitude and longitude in decimal degrees, or click Load Example to fill in New York and London coordinates.
- 2
Enter Point B
Type the second location's latitude and longitude. Use negative values for southern latitudes and western longitudes, as in -73.985428.
- 3
Calculate
Click Calculate Distance. The Haversine result appears instantly in kilometers, miles, and nautical miles, each rounded to two decimals.
Flight distance estimates
Check the direct distance between two airports, such as JFK to Heathrow, to estimate flight length before booking.
Geofencing and radius checks
Verify whether a delivery address falls within a 25 km service radius by measuring from your warehouse coordinates.
Sailing and aviation planning
Get nautical miles between waypoints directly, without converting from kilometers by hand, when plotting a sea or air route.
Comparing property locations
Measure the straight-line distance from a house listing to your office or a school using coordinates from any map app.
How accurate is the Haversine formula?
It assumes a spherical Earth with a 6,371 km radius, so results can deviate from true geodesic distance by up to roughly 0.5 percent. For most planning, estimation, and radius checks, that error is negligible.
Is this the same as driving distance?
No. This is the great-circle (straight-line) distance over Earth's surface. Road routes are longer because they follow highways and terrain. Use a routing service when you need drive time or mileage.
What coordinate format do I need?
Decimal degrees only, such as 51.507351 and -0.127758. Negative latitude means south of the equator, negative longitude means west of the prime meridian. Convert DMS values with the GPS Coordinate Formatter first.
Where can I find coordinates for a place?
Right-click any spot in Google Maps and the decimal coordinates appear at the top of the context menu. Click them to copy, then paste each value into the latitude and longitude fields here.
Are the locations I enter sent to a server?
No. The Haversine math runs entirely on your device as JavaScript. The coordinates you type are never transmitted, logged, or stored anywhere outside the page.