HomeCalculatorsMathDistance Between Coordinates Calculator

Distance Between Coordinates Calculator

Math

Find the distance between two GPS coordinates using the haversine formula. Enter latitude and longitude for two points and get the distance in km or miles.

28.614
77.209
19.076
72.878

Distance (km)

1,148.09
Distance (miles)
713.39

This calculator computes your Distance (km), Distance (miles) from the values you enter.

Inputs
Point A LatitudePoint A LongitudePoint B LatitudePoint B Longitude
Outputs
Distance (km)Distance (miles)

What is a Distance?

A Distance Between Coordinates Calculator finds the great-circle distance between two points on Earth, given each point's latitude and longitude. This is the same calculation mapping software, GPS systems, and flight planners use to determine the straight-line distance between two locations — accounting for the fact that the Earth is a sphere, not a flat plane, so simple Pythagorean distance doesn't apply directly to geographic coordinates.

This calculator uses the haversine formula, the standard method for this calculation, to convert two latitude/longitude pairs into a distance in kilometres and miles. It pairs well with the Mileage Calculator and Fuel Cost Calculator — once you know the distance between two points, those tools help estimate the cost and fuel needed to travel it.

How to use this Distance calculator

  1. Find the coordinates of your first location (for example, using Google Maps) and enter them in Point A Latitude and Point A Longitude.
  2. Find the coordinates of your second location and enter them in Point B Latitude and Point B Longitude.
  3. Read the Distance (km) result for the straight-line distance in kilometres.
  4. Check the Distance (miles) card if you need the result in miles instead.
  5. Open the step-by-step breakdown to see both coordinate pairs and the calculated distance together.

Formula & Methodology

The calculator uses the haversine formula to compute great-circle distance:

a = sin²(Δlat/2) + cos(lat1) × cos(lat2) × sin²(Δlon/2)
c = 2 × atan2(√a, √(1−a))
Distance = R × c, where R = 6,371 km (Earth's mean radius)

Worked example: for New Delhi (28.6139°N, 77.2090°E) and Mumbai (19.0760°N, 72.8777°E):
- Δlat ≈ 9.5379°, Δlon ≈ 4.3313°
- Applying the haversine formula gives a distance of approximately 1,150 km (about 715 miles).

Frequently Asked Questions

The haversine formula calculates the great-circle distance between two points on a sphere given their latitude and longitude, accounting for the Earth's curvature. It's the standard method used by mapping software and GPS systems to find the straight-line ('as the crow flies') distance between two coordinates.
Open Google Maps, right-click (or long-press on mobile) the location you want, and the coordinates will appear as the first option you can tap to copy. Latitude is the first number and ranges from -90 to 90; longitude is the second number and ranges from -180 to 180.
No — this calculator gives the straight-line great-circle distance between two points, not the actual road distance you'd drive. Road distance is almost always longer because roads curve around obstacles, follow specific routes, and rarely travel in a perfectly straight line.
Distance between two locations on Earth's surface depends on both how far apart they are north-south (latitude) and east-west (longitude), and the relationship between them isn't a simple flat-plane calculation because the Earth is a sphere. The haversine formula combines both coordinates correctly to account for this curvature.
Yes — southern latitudes and western longitudes are entered as negative numbers. For example, Mumbai is at approximately 19.076°N, 72.8777°E, while a location in the Southern Hemisphere or Western Hemisphere would use negative values for latitude or longitude respectively.
The haversine formula assumes the Earth is a perfect sphere, which gives results accurate to within about 0.5% of the true distance for most practical purposes. For surveying or aviation applications requiring higher precision, a more complex ellipsoidal formula (like Vincenty's) is used instead.
The straight-line distance between New Delhi (28.6139°N, 77.2090°E) and Mumbai (19.0760°N, 72.8777°E) is approximately 1,150 km (about 715 miles). This is the default example shown in the calculator.
Yes — the great-circle distance this calculator computes is exactly what's used to estimate flight distances, since aircraft generally follow the shortest path between two points along the Earth's curved surface. Actual flight paths may vary slightly due to air traffic routes and weather.
The [Mileage Calculator](/mileage-calculator/) works out fuel efficiency and trip costs based on a distance you already know, while this calculator works out that distance in the first place from two GPS coordinates. Use this tool first if you only have locations, then feed the resulting distance into the Mileage Calculator or [Fuel Cost Calculator](/fuel-cost-calculator-india/).
For the most accurate result, use precise coordinates from a mapping tool like Google Maps rather than rounded estimates. Small rounding errors in latitude and longitude can shift the calculated distance by a noticeable amount, especially over longer distances.
Also known as
haversine distance calculatorlat long distance calculatorGPS coordinates distancedistance between two points calculatorgreat circle distance