Distance Between Coordinates Calculator
Calculate the straight-line (great-circle) distance between two points on Earth using latitude and longitude coordinates. This calculator uses the haversine formula with a mean Earth radius of 6,371 km to compute the shortest path over the surface of the sphere. Results are shown in both kilometers and miles. Used in navigation, aviation, logistics, GIS mapping, and geocaching.
Enter Values
Result
Enter values above and click Calculate to see your result.
AI Assistant
Ask about this calculator
I can help you understand the distance between coordinates calculator formula, interpret your results, and answer follow-up questions.
Try asking
Formula
How it works: The haversine formula computes the central angle between two points on a sphere from their latitude and longitude (converted to radians), then multiplies by the Earth radius (6,371 km) to get the surface distance. This accounts for the curvature of the Earth, unlike flat-plane distance formulas which only work for very short distances.
Worked Example
How the Haversine Formula Calculates Earth Distance
The haversine formula is the standard method for calculating the shortest distance between two points on the surface of a sphere given their latitude and longitude coordinates.
- Converts latitude and longitude from degrees to radians, then computes the central angle between the two points
- Uses Earth mean radius of 6,371 km (3,959 miles) to convert the angular distance to a surface distance
- Accurate to within 0.3% for most practical distances, sufficient for navigation, logistics, and GIS applications
- Works for any two points on Earth, including across hemispheres, the date line, and near the poles
- For very long distances requiring higher precision, the Vincenty formula (which models Earth as an oblate spheroid) reduces error to under 0.5 mm
Enter any two GPS coordinates in decimal degrees above to compute the haversine distance instantly. Results are shown in both kilometers and miles.
You can also calculate changes using our Midpoint and Distance Calculator or Golden Ratio Calculator.
Frequently Asked Questions
Why is haversine distance different from driving distance?
The haversine formula calculates the shortest path over the surface of a perfect sphere (as the crow flies). Driving distance follows roads, highways, and terrain, which is always longer. Use this for straight-line distance; use a mapping service for driving directions.
What Earth radius does this calculator use?
It uses 6,371 km, the widely accepted mean Earth radius. Since Earth is slightly flattened at the poles (oblate spheroid), this value introduces a small error of up to 0.3% for very long distances. For most practical purposes, this is more than accurate enough.
Can I enter coordinates in degrees, minutes, seconds?
This calculator accepts decimal degrees only. To convert DMS to decimal: degrees + (minutes / 60) + (seconds / 3600). For example, 48 degrees 51 minutes 23 seconds = 48.8564 decimal degrees.
Does this work for any two points on Earth?
Yes. The haversine formula works for any pair of latitude/longitude coordinates, including across hemispheres, the international date line, and near the poles. Latitude must be between -90 and 90, longitude between -180 and 180.
How accurate is the haversine formula?
For most distances, haversine is accurate to within 0.3% (about 1 km error per 300 km). For higher accuracy on very long distances, the Vincenty formula accounts for Earth being an oblate spheroid, but haversine is sufficient for the vast majority of applications.
What is the haversine formula and how does it work?
The haversine formula calculates the shortest distance between two points on a sphere given their latitude and longitude. It works in three steps:
(1) compute the central angle using a = sin^2(dlat/2) + cos(lat1) x cos(lat2) x sin^2(dlon/2).
(2) find the angular distance c = 2 x atan2(sqrt(a), sqrt(1-a)).
(3) multiply by Earth radius d = 6,371 x c to get distance in km. The name "haversine" comes from "half versed sine", a trigonometric function. It is preferred over simpler formulas because it remains numerically stable for small distances.
How do I add this Distance Between Coordinates Calculator to my site?
Absolutely. Use the "Embed" option above to tailor the dimensions, color scheme, and styling to match your site. Copy the generated iframe snippet and drop it into your HTML, WordPress editor, or any CMS. There is no cost and no account required. See calculory.com/services/embed-calculators for a step-by-step walkthrough.
AI Assistant
Ask about this calculator
I can help you understand the distance between coordinates calculator formula, interpret your results, and answer follow-up questions.
Try asking
Related Calculators
More Maths Calculators
View allRelated Articles
All articles
Types of Calculators in 2026: A Complete Guide to Choosing the Right One
Every type of calculator explained: basic, desk, scientific, graphing, printing, financial, construction (Sonic Cal style), online, app, and voice. Pick the right one in under a minute.
Read article
Best Voice Calculators in 2026: Online Tools and Mobile Apps Compared
The best voice calculators of 2026 compared: web tools, iPhone and Android apps, talking calculators, and PC options. Find the right voice activated calculator.
Read article
Best Math Training Apps in 2026: 12 Picks for Students, Adults, and Speed Enthusiasts
We tested 12 math training apps across four categories: academic support, logical reasoning, mental math speed, and gamified learning. See which apps actually improve your skills in 2026.
Read article
Guide to Interactive Math Games for Kids and Classrooms 2026
Interactive math games in 2026 blend adaptive online platforms with low-prep classroom activities. Use this guide to pick the best game format by age, goal, and time.
Read articleModern Tools for Every Need
Accurate and Reliable
All calculations run locally. Step-by-step solutions you can trust.
Verified Precision
Precise Mathematical Calculations Powered by Calculory AI