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.

Reviewed by the thecalcu.com team · Last updated July 30, 2026

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.

Why Use a Distance Between Coordinates Calculator?

Knowing two locations' coordinates doesn't immediately tell you how far apart they are, the relationship between latitude/longitude differences and actual distance changes depending on where on Earth you are, since lines of longitude get closer together near the poles. Manually working out this distance requires the haversine formula, which involves several trigonometric steps that are easy to get wrong by hand.

This calculator handles that computation instantly. A logistics planner comparing two warehouse locations, a travel blogger estimating flight distances between cities, or a student verifying a geography assignment can all get an accurate straight-line distance in seconds rather than working through spherical trigonometry manually.

Who Should Use This Calculator?

  • Travellers and trip planners estimating straight-line distances between cities or landmarks before booking flights.
  • Logistics and supply chain planners comparing distances between warehouses, depots, or delivery points.
  • Students and educators working through geography or trigonometry problems involving real-world coordinates.
  • Developers building location-based features who want to verify a haversine distance calculation against a known reference.
  • Radio, aviation, and maritime enthusiasts calculating great-circle distances between stations, airports, or ports.

What Insights Does the Distance Calculator Give You?

The calculator returns the same great-circle distance expressed in both common units:

  • Distance (km), the metric distance, the unit most commonly used internationally and in India.
  • Distance (miles), the imperial equivalent, useful for contexts that report distances in miles, such as US-based references.

Because this is a straight-line distance, it represents the shortest theoretically possible path between the two points, actual travel distance by road, sea, or air route will typically be longer.

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.
Show formula & methodology ↓Show less ↑

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

What is the haversine formula?
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.
How do I find the latitude and longitude of a location?
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.
Is this the same as driving distance?
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.
Why does the calculator need latitude AND longitude for both points?
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.
Can I use negative numbers for latitude and longitude?
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.
How accurate is the haversine formula?
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.
What is the distance between Delhi and Mumbai?
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.
Can I use this to calculate flight distance?
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.
What's the difference between this and the Mileage Calculator?
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](/in/fuel-cost-calculator/).
Do I need to know the exact coordinates, or can I estimate?
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