Skip to content
Return to Calculators Hub

Distance Calculator

Math

Calculate straight-line 2D Euclidean distance, 3D spatial distance, and geographic Great-Circle distances using the Haversine formula across Earth coordinates with exact radicals, midpoints, and bearings.

Presets:
Euclidean Distance (2D)
d = 13 ≈ 13.000000
P₁(0, 0) P₂(5, 12)

Displacements & Geometric Metrics

Euclidean (L₂) 13.0000
Manhattan (L₁) 17.00
Chebyshev (L_∞) 12.00
Midpoint (4.50, 9.00)

Algebraic Derivations

1 1. Coordinate Differences
Δx = x₂ - x₁ = 7 - 2 = 5 | Δy = y₂ - y₁ = 15 - 3 = 12

Horizontal and vertical separations between the two points.

2 2. 2D Euclidean Distance Formula
d = √(Δx² + Δy²) = √(5² + 12²) = √(169) = 13 ≈ 13.000000

Straight-line hypotenuse distance derived from the Pythagorean theorem.

3 3. Midpoint
M = ((x₁ + x₂)/2, (y₁ + y₂)/2) = (4.50, 9.00)

The exact center point halfway along the line segment.

How This Calculator Works

Distance is the quantitative measure of how far apart objects or points are. In Euclidean spaces, it corresponds to the shortest straight-line path, while on planetary spheroids it follows great-circle geodesics.

📐 Euclidean and Spherical Distance Formulas
2D: d = √[(x₂ - x₁)² + (y₂ - y₁)²] | 3D: d = √[(x₂ - x₁)² + (y₂ - y₁)² + (z₂ - z₁)²]
Euclidean Distance (L₂): Straight-line spatial distance derived from the Pythagorean theorem
Manhattan Distance (L₁): Grid distance: |Δx| + |Δy| + |Δz| (distance navigating along orthogonal axes)
Chebyshev Distance (L_∞): Maximum single-axis coordinate displacement: max(|Δx|, |Δy|, |Δz|)
Haversine Formula: Calculates great-circle distance between two latitude/longitude pairs on a sphere of radius R

Key Mathematical Rules & Properties

Earth Radius Assumption

The Haversine calculation uses the volumetric mean Earth radius R ≈ 6,371 km (3,958.8 miles).

Understanding your calculation

Method, example and limitations

How the calculation works

Coordinate distance in a flat Cartesian plane uses the square root of the sum of squared coordinate differences.

Example to check

Between (0, 0) and (3, 4), distance is √(3² + 4²) = 5 coordinate units.

Before using the result

Straight-line distance differs from road distance. Geographic coordinates need an appropriate Earth model rather than treating latitude and longitude as ordinary flat lengths.

Calculation methodology · Report a result that needs review