Skip to main content

Haversine Distance Calculator

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

Skip to calculator
Unit Conversion

Haversine Distance Calculator

Calculate the great-circle distance between two geographic coordinates using the Haversine formula. Includes bearing, midpoint, and travel time estimates.

Last updated: December 2025

Calculator

Adjust values & calculate

Point A

Point B

Great-Circle Distance
5,570.22 km
3,461.17 miles | 3,007.68 nautical miles
Initial Bearing
51.21
degrees
Flight Time
6h 11m
at 900 km/h
Distance (m)
5,570,222.18
meters

Route Details

Midpoint Latitude:
52.37
Midpoint Longitude:
-41.29
Est. Drive Time:
90.52 hours
Est. Drive Distance:
7,241 km
Your Result
Distance: 5570.22 km (3461.17 mi) | Bearing: 51.21 degrees
Share Your Result
Understand the Math

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.

Last reviewed: December 2025

Worked Examples

Example 1: New York to London

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 a = sin2(5.3973) + cos(40.71) x cos(51.51) x sin2(36.94) a = 0.00887 + 0.7608 x 0.6241 x 0.3609 = 0.1803 c = 2 x atan2(0.4246, 0.9054) = 0.8866 rad d = 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

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 Very short distance, Haversine still accurate d = approximately 3.14 km
Result: Approximately 3.14 km (1.95 miles)
Expert Insights

Background & Theory

The Haversine Distance Calculator applies the following established principles and formulas. Unit conversion is the process of expressing a quantity in a different unit of measurement while preserving its physical meaning. At the foundation of modern measurement lies the International System of Units (SI), which defines seven base units: the meter for length, kilogram for mass, second for time, ampere for electric current, kelvin for thermodynamic temperature, mole for amount of substance, and candela for luminous intensity. All other units, called derived units, are defined as algebraic combinations of these seven. Dimensional analysis is the principal method for performing unit conversions. By treating units as algebraic quantities that can be multiplied, divided, and cancelled, a conversion factor chain allows a value expressed in one unit to be rewritten in another without altering its physical magnitude. For example, to convert 60 miles per hour to meters per second, one multiplies by a chain of conversion factors each equal to one: (1609.34 m / 1 mile) ร— (1 hour / 3600 s). Metric prefixes enable compact expression of quantities across extreme ranges of magnitude. Standard prefixes span from nano (10^-9) through micro (10^-6) and milli (10^-3) up through kilo (10^3), mega (10^6), and giga (10^9), and beyond in both directions. These prefixes are strictly multiplicative and apply consistently to any SI base or derived unit. Temperature conversions require affine transformations rather than simple scaling. To convert Celsius to Fahrenheit the formula is ยฐF = (ยฐC ร— 9/5) + 32, while the conversion to the absolute Kelvin scale is K = ยฐC + 273.15. These formulas reflect the different zero points and degree-size conventions of each scale. Significant figures govern how precision is preserved through calculations. A result should not express more precision than the least precise input value permits. In digital storage, IEEE and IEC standards distinguish between decimal prefixes (kilobyte = 1000 bytes) and binary prefixes (kibibyte = 1024 bytes), a distinction that has practical consequences for how storage capacity is reported by manufacturers versus operating systems. Unit coherence โ€” ensuring that all quantities in an equation share a consistent unit system โ€” is essential for obtaining correct results.

History

The history behind the Haversine Distance Calculator traces back through the following developments. Human beings have been measuring and comparing quantities since before recorded history. The earliest known measurement units were body-based: the cubit (the distance from elbow to fingertip), the foot, the hand, and the digit. The furlong originated as the length of a furrow a team of oxen could plow without resting. These anthropomorphic standards were practical for local use but differed between regions and kingdoms, creating persistent difficulties in trade and construction. The ancient Egyptians standardized the royal cubit at approximately 52.4 centimeters and distributed calibrated granite rods to ensure consistency across building projects, including the pyramids. Roman engineers used the mile (mille passuum, one thousand double paces) and spread these standards throughout their empire via road networks. Despite these efforts, measurement diversity persisted across medieval Europe, hampering commerce. The French Revolution created political will for radical standardization. In 1795 France officially adopted the metric system, defining the meter as one ten-millionth of the distance from the equator to the North Pole along the Paris meridian. This gave the world its first fully decimal, rationally constructed measurement system. The Metre Convention of 1875 established the International Bureau of Weights and Measures (BIPM) in Sevres, France, creating a permanent international body to maintain physical artifact standards and coordinate global metrology. For over a century, the kilogram was defined by a platinum-iridium cylinder locked in a vault near Paris. In 1999, a stark demonstration of what unit inconsistency costs occurred when NASA's Mars Climate Orbiter was lost because one engineering team used pound-force seconds while another used newton seconds. The spacecraft entered the Martian atmosphere at the wrong angle and was destroyed, at a cost of 327 million dollars. In 2019 the SI underwent its most significant revision, redefining all seven base units in terms of fixed numerical values of fundamental physical constants such as the speed of light, Planck's constant, and the elementary charge. This eliminated any reliance on physical artifacts and made the measurement system permanently stable and universally reproducible.

Share this calculator

Explore More

Frequently Asked Questions

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.
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.
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.
You may use the results for reference and educational purposes. For professional reports, academic papers, or critical decisions, we recommend verifying outputs against peer-reviewed sources or consulting a qualified expert in the relevant field.
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.
No. All calculations run entirely in your browser using JavaScript. No data you enter is ever transmitted to any server or stored anywhere. Your inputs remain completely private.
Educational Note: This calculator is provided for educational and informational purposes. Results are based on the formulas and inputs provided. Always verify important calculations independently. NovaCalculator processes calculator inputs client-side; optional analytics follow visitor consent settings. ยฉ 2024โ€“2026 NovaCalculator.

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.

What inputs do I need to use Haversine Distance Calculator accurately?

Each field is labelled with the required unit (metric or imperial). Gather your source values before starting โ€” for example, a weight measurement in kilograms, a distance in metres, or a dollar amount โ€” and enter them exactly as measured. The formula section on this page lists every variable and explains what each represents.

References

Reviewed by Manoj Kumar, Mathematics Educator ยท Editorial policy