Geometry & Trigonometry
Basic

Distance Between Two Points

Euclidean distance in the plane.

Formula

d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}

Live Calculator

Members

Variables

x_1,y_1First point
x_2,y_2Second point

Example

From (1, 2) to (4, 6): d = √(3² + 4²) = √25 = 5.

How it works

This formula gives the straight-line distance between two points on a flat coordinate plane. It comes from treating the horizontal and vertical differences as the two legs of a right triangle, then using the Pythagorean theorem to find the hypotenuse. Squaring the differences makes direction irrelevant, so only the size of the separation matters.

When to use it

Use it whenever you need the direct distance between two points on a graph or map, such as in coordinate geometry, navigation, or physics. It is especially useful when the points are given by coordinates and you want the shortest path between them.

Worked example, step by step

Find the distance from (-2, 5) to (3, 1). Step 1: Identify the coordinates: x1 = -2, y1 = 5, x2 = 3, y2 = 1. Step 2: Substitute into the formula: d = √((3 - (-2))² + (1 - 5)²). Step 3: Simplify the differences: d = √(5² + (-4)²). Step 4: Square and add: d = √(25 + 16) = √41. Final answer: d = √41 ≈ 6.4 units.

Common mistakes to avoid

  • Forgetting to subtract coordinates in the correct order before squaring
  • Adding the x-values and y-values instead of finding their differences
  • Leaving the answer as 41 instead of taking the square root

Did You Know?

The distance formula is the Pythagorean theorem wearing coordinate clothing.

Share this formula

Reviewed & maintained by the FormulaWon editorial teamLast reviewed September 2026