Data Source and Methodology
Authoritative Sources:
- Department of Defense World Geodetic System 1984 (WGS84), NIMA TR8350.2, Edition 3, January 2000. NGA official portal
- R. W. Sinnott (1984), “Virtues of the Haversine,” Sky & Telescope, 68(2), p. 159.
- IUGG (International Union of Geodesy and Geophysics) recommended mean Earth radius R = 6,371,008.8 m.
All geodesic distances are computed using the Haversine great-circle formula under the WGS84 datum with the IUGG mean Earth radius. Cartesian distances use the standard Euclidean metric in a plane.
Tutti i calcoli si basano rigorosamente sulle formule e sui dati forniti da questa fonte.
The Formula Explained
Cartesian (2D Euclidean):
$$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Geodesic (Haversine great-circle):
Let latitudes and longitudes be in radians: $\phi_1, \phi_2, \lambda_1, \lambda_2$ and $R$ the Earth's mean radius.
$$\Delta\phi = \phi_2 - \phi_1,\quad \Delta\lambda = \lambda_2 - \lambda_1$$ $$a = \sin^2\!\left(\frac{\Delta\phi}{2}\right) + \cos\phi_1 \cos\phi_2 \sin^2\!\left(\frac{\Delta\lambda}{2}\right)$$ $$c = 2 \arcsin\!\left(\sqrt{a}\right)$$ $$d = R \cdot c$$
Glossary of Variables
Symbol / Field | Meaning |
---|---|
x1, y1 | Coordinates of Point A (Cartesian). Same unit as x2, y2. |
x2, y2 | Coordinates of Point B (Cartesian). |
lat1, lon1 | Latitude and longitude of Point A in degrees (geodesic). |
lat2, lon2 | Latitude and longitude of Point B in degrees (geodesic). |
R | Mean Earth radius (6,371,008.8 m) used by the Haversine formula. |
d | Computed distance (primary unit selected) with convenient conversions. |
How It Works: A Step-by-Step Example
Scenario: Great-circle distance from Paris, France (48.8566° N, 2.3522° E) to London, UK (51.5074° N, 0.1278° W).
- Convert degrees to radians: $\phi_1 = 0.8527$, $\lambda_1 = 0.0410$; $\phi_2 = 0.8990$, $\lambda_2 = -0.0022$ (approx.).
- Compute differences: $\Delta\phi \approx 0.0463$, $\Delta\lambda \approx -0.0432$.
- Compute $a$: $$a = \sin^2\left(\frac{0.0463}{2}\right) + \cos(0.8527)\cos(0.8990)\sin^2\left(\frac{-0.0432}{2}\right)\approx 0.00064$$
- Compute $c = 2\arcsin(\sqrt{a}) \approx 0.0506$.
- Distance $d = R \cdot c \approx 6{,}371{,}008.8 \times 0.0506 \approx 322{,}000 \text{ m} \approx 322 \text{ km}$.
The calculator reproduces this result and also expresses it in miles and nautical miles.
Frequently Asked Questions (FAQ)
Does this tool account for elevation or terrain?
Not by default. The geodesic calculation is along the Earth's surface (sea level). For applications requiring elevation, you would need 3D coordinates and a suitable model.
What precision should I expect?
For city-to-city distances, errors are typically well under 0.5%. For engineering-grade geodesy, use ellipsoidal methods like Vincenty or Karney algorithms.
Why do I sometimes see slightly different distances on maps?
Different platforms may use different Earth radii, datums, or routing (road vs. as-the-crow-flies). This tool computes the great-circle (shortest surface) distance.
Can I share my results?
Yes. Use the “Share” button to copy a link that preserves your inputs and settings.
Will you support ellipsoidal formulas?
Yes. Advanced methods (e.g., Karney 2013) are on our roadmap to complement Haversine for high-precision needs.
Is my data stored?
No. All calculations run in your browser. We do not transmit or store your input values.