Math calculator

Distance formula calculator

Answer

d = 5

Example: (1, 2) to (4, 6)

The distance between (x₁, y₁) and (x₂, y₂) is d = √((x₂ − x₁)² + (y₂ − y₁)²). Example: from (1, 2) to (4, 6), d = √(3² + 4²) = √25 = 5.

Midpoint
(2.5, 4)
Slope
4/3 ≈ 1.333

How it’s calculated

  1. Differences: Δx = 4 − 1 = 3, Δy = 6 − 2 = 4.
  2. Square and add: 3² + 4² = 9 + 16 = 25.
  3. Square root: √25 = 5.

Where the formula comes from

The two points and the corner (x₂, y₁) form a right triangle with legs Δx and Δy. By the Pythagorean theorem the hypotenuse – the distance – is √(Δx² + Δy²). In three dimensions add the z term: √(Δx² + Δy² + Δz²).

Frequently asked questions

What is the distance formula?

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

How do I find the midpoint?

Average the coordinates: ((x₁ + x₂)/2, (y₁ + y₂)/2).