📏 Geometry Tool
Distance Calculator
Calculate distance between two points in 2D or 3D, GPS coordinates using the Haversine formula, or city-grid (Manhattan) distance — with full step-by-step working.
Point A (x₁, y₁)
Point B (x₂, y₂)
Examples:
📏 Distance
—
—
—Euclidean (d)
—Manhattan
—d² (squared)
—Midpoint
Euclidean
√(Δx²+Δy²)
Manhattan
|Δx|+|Δy|
Chebyshev
max(|Δx|,|Δy|)
📝 Step-by-step solution
Coordinate graph
Key insight
—
Distance formulas
Different applications use different distance formulas. Euclidean is the straight-line ("as the crow flies") distance. Manhattan is the city-block distance. Haversine accounts for Earth's curvature for GPS coordinates.
Euclidean (2D): d = √((x₂−x₁)² + (y₂−y₁)²)
Euclidean (3D): d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²)
Manhattan: d = |x₂−x₁| + |y₂−y₁|
Chebyshev: d = max(|x₂−x₁|, |y₂−y₁|)
Haversine: d = 2R·arcsin(√(sin²(Δφ/2) + cos(φ₁)·cos(φ₂)·sin²(Δλ/2)))
Midpoint: M = ((x₁+x₂)/2, (y₁+y₂)/2)
Euclidean (3D): d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²)
Manhattan: d = |x₂−x₁| + |y₂−y₁|
Chebyshev: d = max(|x₂−x₁|, |y₂−y₁|)
Haversine: d = 2R·arcsin(√(sin²(Δφ/2) + cos(φ₁)·cos(φ₂)·sin²(Δλ/2)))
Midpoint: M = ((x₁+x₂)/2, (y₁+y₂)/2)
Frequently asked questions
What is the distance formula?
The 2D distance formula is d = √((x₂−x₁)² + (y₂−y₁)²). It comes from the Pythagorean theorem — the distance is the hypotenuse of a right triangle formed by the horizontal and vertical differences between the two points.
What is Manhattan distance?
Manhattan distance (also called taxicab or city-block distance) is |x₂−x₁| + |y₂−y₁|. It represents the distance when you can only travel horizontally or vertically — like navigating a grid of city streets. It is always ≥ Euclidean distance.
What is the Haversine formula?
The Haversine formula calculates the great-circle distance between two GPS coordinates on a sphere (Earth). It accounts for Earth's curvature, giving the "as the crow flies" distance between two geographic locations.
How do I find the midpoint between two coordinates?
The midpoint formula is M = ((x₁+x₂)/2, (y₁+y₂)/2). It gives the exact centre point between two coordinates. This calculator shows the midpoint alongside the distance in all modes.
🔗 Related tools