HOW IT WORKS
Euclidean coordinate & Haversine Earth formulas
Choose between flat Cartesian coordinates (2D or 3D) and spherical Earth coordinates (latitude and longitude in decimal degrees).
2D & 3D Euclidean Distance
Straight-line distance between two Cartesian points:
d₂D = √((x₂−x₁)² + (y₂−y₁)²) · d₃D = √(Δx² + Δy² + Δz²)Haversine Great-Circle Distance
Shortest surface path on a sphere of radius R = 6,371.0088 km:
a = sin²(Δφ/2) + cos(φ₁)·cos(φ₂)·sin²(Δλ/2) · d = 2R·atan2(√a, √(1−a))Unit Conversions
Geographic distances use exact NIST SP 811 conversion factors:
1 statute mi = 1.609344 km · 1 nautical mi = 1.852 km