Great-Circle Distance from DMS Coordinates
Parse latitude and longitude and calculate spherical distance using an entered radius.
Your inputs
Calculated output
Enter inputs to calculate.
Enter signed decimal degrees, or space-separated degrees minutes seconds and N/S/E/W, for example 23 30 0 N. Hemisphere notation uses unsigned magnitudes. Minutes and seconds are less than 60; latitude is within ±90° and longitude within ±180°.
Degrees=sign(D+M/60+S/3600). a=sin²((φ₂−φ₁)/2)+cosφ₁cosφ₂sin²((λ₂−λ₁)/2); d=2R atan2(√a,√(1−a)), with angles in radians and a clamped only for floating-point roundoff. R is the entered sphere radius and d the shorter great-circle arc. This uses a spherical Haversine model; ellipsoidal distances require their own model.