Math Calculators
Distance Formula Calculator - 2D and 3D Distance Between Two Points
Calculate the distance between two points in 2D or 3D space using the distance formula. Shows the substituted formula with step-by-step work.
Point 1
Point 2
Distance
5
Δx
3
Δy
4
Midpoint
(1.5, 2)
Formula: d = √(3² + 4²) = √25 ≈ 5
| Element | x / x₁ | y / y₁ | x₂ | y₂ |
|---|---|---|---|---|
| P₁ | 0 | 0 | ||
| P₂ | 3 | 4 |
Distance formula in 2D
The distance between two points (x₁, y₁) and (x₂, y₂) in a plane is: d = √((x₂ − x₁)² + (y₂ − y₁)²). This is the Pythagorean theorem applied to the horizontal and vertical differences.
Distance formula in 3D
In three-dimensional space, add the z-axis difference: d = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²). This extends naturally from the 2D formula.
Midpoint formula
The midpoint between two points is the average of their coordinates: M = ((x₁+x₂)/2, (y₁+y₂)/2) in 2D, with (z₁+z₂)/2 added in 3D.