📍

Distance Formula Calculator

Distance between two points in 2D or 3D with the distance formula, step by step

TL;DR

Distance formula: d = √((x₂ − x₁)² + (y₂ − y₁)²). Between (2, 3) and (8, 11) the distance is √(6² + 8²) = √100 = 10. In 3D, add (z₂ − z₁)² under the square root. Enter two points to get the distance step by step, together with the midpoint and slope.

Distance formula: d = √((x₂ − x₁)² + (y₂ − y₁)²). Between (1, 2) and (4, 6) the differences are 3 and 4, so d = √(3² + 4²) = √25 = 5. With differences of 6 and 8 the distance is 10, and with 5 and 12 it is 13. In 3D, add (z₂ − z₁)² under the square root.

Point 1 (x₁, y₁)
Point 2 (x₂, y₂)

Distance for a horizontal difference Δx and a vertical difference Δy

Δx Δy = 1Δy = 2Δy = 4Δy = 8Δy = 12
1 1.41422.23614.12318.062312.0416
2 2.23612.82844.47218.246212.1655
3 3.16233.605658.54412.3693
4 4.12314.47215.65698.944312.6491
5 5.0995.38526.40319.43413
6 6.08286.32467.21111013.4164
8 8.06238.24628.944311.313714.4222
9 9.05549.21959.848912.041615
12 12.041612.165512.649114.422216.9706
15 15.033315.132715.52421719.2094

Common questions with concrete values

What is the distance formula?

d = √((x₂ − x₁)² + (y₂ − y₁)²). It gives the straight-line distance between the points (x₁, y₁) and (x₂, y₂) and follows from the Pythagorean theorem.

How do you find the distance between two points?

Subtract the x-coordinates and the y-coordinates, square both differences, add them and take the square root. For (1, 2) and (4, 6): √(3² + 4²) = √25 = 5.

How is the distance formula related to the Pythagorean theorem?

The differences in x and y are the legs of a right triangle and the distance is the hypotenuse, so d² = Δx² + Δy², which is a² + b² = c².

What is the distance formula in 3D?

d = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²). The distance between (1, 2, 3) and (4, 6, 15) is √169 = 13.

Can a distance be negative?

No. The differences are squared before they are added, so the distance is always zero or positive, no matter which point comes first.

The distance formula

The distance between two points (x₁, y₁) and (x₂, y₂) is d = √((x₂ − x₁)² + (y₂ − y₁)²). Subtract the coordinates, square both differences, add them and take the square root. The formula comes from the Pythagorean theorem: the horizontal and vertical differences are the legs of a right triangle, and the distance is its hypotenuse. The triangle calculator works with the same relationship.

Example

For the points (2, 3) and (8, 11), the differences are 8 − 2 = 6 and 11 − 3 = 8. The distance is √(6² + 8²) = √(36 + 64) = √100 = 10. The order of the points does not matter, because both differences are squared.

Distance in 3D

For points in space, add the squared difference of the z-coordinates: d = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²). The distance between (1, 2, 3) and (4, 6, 15) is √(9 + 16 + 144) = √169 = 13. Tick 3D points in the calculator to enter z-coordinates.

Exact answers with square roots

If the coordinates are whole numbers and the distance is not, the calculator also shows the simplified square root. The distance between (0, 0) and (1, 1) is √2 ≈ 1.4142, and the distance between (1, 1) and (4, 3) is √13 ≈ 3.6056.

Distance, midpoint and slope

Along with the distance, the calculator shows the midpoint of the segment and the slope of the line through both points. For more detail, use the midpoint calculator and the slope calculator.

Related Calculators

∝ Ratio & Proportion Calculator ⅔ Fraction Calculator △ Area Calculator 🏛️ Roman Numerals Converter 📊 Average Calculator: Mean, Median & Mode

More Calculators

🎯 Midpoint Calculator 📐 Slope Calculator ⊘ Pressure Converter