Distance Formula

Calculate the distance between two points.

Result:

--

Distance Formula Calculator: Measuring the Space Between Points

Whether you're plotting coordinates, analyzing geometric shapes, or calculating GPS distances, the **distance formula** is your go-to tool for finding how far apart two points are on a plane.

The Formula

Given two points $(x_1, y_1)$ and $(x_2, y_2)$ on a coordinate plane, the distance $d$ between them is:

$$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$

This is a direct application of the **Pythagorean Theorem** in disguise.

Derivation: How It Works

Imagine two points on a graph. If you draw a right triangle where:

  • The horizontal leg = $|x_2 - x_1|$ (change in x)
  • The vertical leg = $|y_2 - y_1|$ (change in y)
  • The hypotenuse = the distance between the points

By the Pythagorean Theorem:

$$d^2 = (x_2 - x_1)^2 + (y_2 - y_1)^2$$

Taking the square root gives us the distance formula.

Step-by-Step Example

Find the distance between $(1, 2)$ and $(4, 6)$

  1. Identify: $x_1 = 1$, $y_1 = 2$, $x_2 = 4$, $y_2 = 6$
  2. Calculate differences: $\Delta x = 4 - 1 = 3$, $\Delta y = 6 - 2 = 4$
  3. Square them: $3^2 = 9$, $4^2 = 16$
  4. Add: $9 + 16 = 25$
  5. Take square root: $\sqrt{25} = 5$

Answer: 5 units

In 3D Space

The formula extends naturally to three dimensions. For points $(x_1, y_1, z_1)$ and $(x_2, y_2, z_2)$:

$$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2 + (z_2 - z_1)^2}$$

This is used in physics, computer graphics, and 3D modeling.

Special Cases

Horizontal Distance

When points share the same y-coordinate (e.g., $(2, 5)$ and $(7, 5)$):

$$d = |x_2 - x_1| = |7 - 2| = 5$$

Vertical Distance

When points share the same x-coordinate (e.g., $(3, 1)$ and $(3, 8)$):

$$d = |y_2 - y_1| = |8 - 1| = 7$$

Origin to Any Point

Distance from the origin $(0, 0)$ to point $(x, y)$ simplifies to:

$$d = \sqrt{x^2 + y^2}$$

Applications

  • Navigation: GPS systems use a variant to calculate driving distances
  • Computer Graphics: Calculating sprite positions and collision detection
  • Physics: Finding displacement in kinematics problems
  • Geometry: Proving triangles are isosceles, finding circle radii

Midpoint Bonus

If you need the midpoint between two points (the center), use:

$$M = \left( \frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2} \right)$$

Conclusion

The distance formula is geometry's workhorse. Whether you're a student solving homework or a programmer building a game, our **Distance Formula Calculator** makes the arithmetic instant.