Home/Math/Geometry/Distance Calculator

Distance Calculator

Calculate the distance between two points in 2D or 3D space, and find the midpoint, slope, and line equation.

Point Distance
Dimensions

Point 1:

x₁
y₁

Point 2:

x₂
y₂
Multi-Point Path Distance

Enter points as x,y pairs (one per line):

Results
Distance
5.6569
Between P₁(1,2) and P₂(5,6)
PropertyValue

Distance Formulas

2D Distance (Euclidean)

d = √((x₂−x₁)² + (y₂−y₁)²)

3D Distance

d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²)

Manhattan Distance

d = |x₂−x₁| + |y₂−y₁| — used in grid-based routing (named after Manhattan's block grid).

Midpoint Formula

M = ((x₁+x₂)/2, (y₁+y₂)/2)