d

Distance Between Two Points Calculator with Graph

Geometry & Coordinate GeometryFreeStep by stepGraph

The distance between two points on a coordinate grid is the length of the straight line joining them. This calculator uses the distance formula, which comes from Pythagoras: square the horizontal and vertical gaps, add them, and take the square root. Answers are exact where possible, and the midpoint is shown too.

Try:

How to use the distance between two points calculator

  1. Enter the first point (x₁, y₁).
  2. Enter the second point (x₂, y₂).
  3. Press Calculate to see the distance and the steps.

Formula

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

Worked example: (1, 2) and (4, 6)

  • x₁: 1
  • y₁: 2
  • x₂: 4
  • y₂: 6

✓ Answer checked

d=5d = 5
Midpoint
(52,  4)\left(\frac{5}{2},\; 4\right)
−4−2246812345678(1, 2)(4, 6)
The distance is the hypotenuse of a right triangle with sides 3 and 4.
Step-by-step working (4 steps)
  1. Use the distance formula Distance formula

    It is Pythagoras: the horizontal and vertical gaps are the two shorter sides.

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

    Subtract the coordinates.

    x2−x1=3,y2−y1=4x_2 - x_1 = 3, \quad y_2 - y_1 = 4
  3. Square and add

    Square each gap and add them.

    32+42=9+16=253^2 + 4^2 = 9 + 16 = 25
  4. Take the square root

    The result is a perfect square.

    d=25=5d = \sqrt{25} = 5
Formulas used
d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
How this was checked
  • ✓ An independent hypotenuse calculation gives the same distance.

Frequently asked questions

What is the distance formula?

d = √((x₂ − x₁)² + (y₂ − y₁)²). It is the Pythagorean theorem applied to the horizontal and vertical gaps.

What is the distance between (1, 2) and (4, 6)?

5. The gaps are 3 and 4, and √(9 + 16) = 5.

Does the order of the points matter?

No. The gaps are squared, so swapping the points gives the same distance.

People also search for

distance between two pointsdistance formula calculatordistance calculator coordinatesdistance between two points calculator with graphdistance between two points calculator with stepsfree distance between two points calculator online

Related calculators

More geometry & coordinate geometry tools

Related guides