Skip to main content

Haversine Distance Calculator

Instantly convert haversine distance with our free converter. See conversion tables, formulas, and step-by-step explanations.

Share this calculator

Formula

d = 2R x arcsin(sqrt(sin2(dLat/2) + cos(lat1) x cos(lat2) x sin2(dLon/2)))

The Haversine formula finds the central angle between two points using their latitude and longitude differences, then multiplies by Earth's radius to get the arc length. The haversine function (sin squared of half angle) provides numerical stability for both small and large distances.

Worked Examples

Example 1: New York to London

Problem: Calculate the distance from New York (40.7128 N, 74.006 W) to London (51.5074 N, 0.1278 W).

Solution: dLat = 10.7946 deg, dLon = 73.8782 deg\na = sin2(5.3973) + cos(40.71) x cos(51.51) x sin2(36.94)\na = 0.00887 + 0.7608 x 0.6241 x 0.3609 = 0.1803\nc = 2 x atan2(0.4246, 0.9054) = 0.8866 rad\nd = 6371 x 0.8866 = 5,648 km

Result: 5,570.25 km (3,461.02 miles, 3,007.69 nautical miles)

Example 2: Short Distance

Problem: Calculate distance from Times Square (40.7580, -73.9855) to Central Park (40.7829, -73.9654).

Solution: dLat = 0.0249 deg, dLon = 0.0201 deg\nVery short distance, Haversine still accurate\nd = approximately 3.14 km

Result: Approximately 3.14 km (1.95 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. It uses the haversine function (half of the versine), which is hav(theta) = sin2(theta/2). The formula accounts for the curvature of the Earth by working with angular distances. It is more numerically stable than the simpler spherical law of cosines for short distances, making it the preferred method for geographic distance calculations in navigation and mapping applications.

How accurate is the Haversine distance calculation?

The Haversine formula assumes a perfectly spherical Earth with a mean radius of 6,371 km. Since Earth is actually an oblate spheroid (slightly flattened at the poles), the Haversine formula can have errors up to about 0.3% compared to the more accurate Vincenty formula which uses the WGS84 ellipsoid. For most practical purposes including flight planning, shipping routes, and general navigation, the Haversine distance is sufficiently accurate. For surveying or precision mapping, the Vincenty method is preferred.

What is a great-circle distance?

A great-circle distance is the shortest distance between two points on the surface of a sphere, measured along the surface. It follows the path of a great circle, which is the intersection of the sphere with a plane that passes through the center of the sphere. On Earth, this is the shortest flight path between two cities. Great-circle routes can appear curved on flat Mercator projection maps even though they represent straight paths on the globe, which is why transatlantic flights often pass over Greenland or Iceland.

How do I get the most accurate result?

Enter values as precisely as possible using the correct units for each field. Check that you have selected the right unit (e.g. kilograms vs pounds, meters vs feet) before calculating. Rounding inputs early can reduce output precision.

How accurate are the results from Haversine Distance Calculator?

All calculations use established mathematical formulas and are performed with high-precision arithmetic. Results are accurate to the precision shown. For critical decisions in finance, medicine, or engineering, always verify results with a qualified professional.

Is Haversine Distance Calculator free to use?

Yes, completely free with no sign-up required. All calculators on NovaCalculator are free to use without registration, subscription, or payment.

References