Skip to content

Distance between two points calculator

Free TutorAura tool · no sign-up · Updated

Enter two points and the calculator finds the straight-line distance between them, giving the exact answer as a surd when it isn't a whole number. The distance formula is Pythagoras' theorem on a grid:

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

Worked examples

  • (1,2)(1, 2) and (4,6)(4, 6): changes of 3 and 4, so d=9+16=25=5d = \sqrt{9 + 16} = \sqrt{25} = 5.
  • (0,0)(0, 0) and (2,4)(2, 4): d=4+16=20=25≈4.47d = \sqrt{4 + 16} = \sqrt{20} = 2\sqrt{5} \approx 4.47.
  • (−3,1)(-3, 1) and (2,−11)(2, -11): changes of 5 and −12-12, so d=25+144=13d = \sqrt{25 + 144} = 13.

Why it's Pythagoras

Draw the two points and complete a right-angled triangle with a horizontal and a vertical side. The horizontal side is the change in xx, the vertical side is the change in yy, and the distance between the points is the hypotenuse. Squaring removes any negative signs, so the order you subtract in doesn't matter.

Exact answers with surds

When the distance isn't a whole number, exam questions often want it in surd form. 20=4×5=25\sqrt{20} = \sqrt{4 \times 5} = 2\sqrt{5}. Our square root simplifier shows how to simplify any surd.

Circles on coordinate axes

A circle with centre (0,0)(0, 0) and radius rr has the equation x2+y2=r2x^2 + y^2 = r^2: every point on it is distance rr from the centre. To check whether a point lies on, inside or outside a circle, find its distance from the centre and compare with the radius. See our equation of a circle questions.

Common mistakes

  • Forgetting to square-root at the end.
  • Squaring a negative change wrongly: (−12)2=144(-12)^2 = 144, not −144-144.
  • Adding the changes before squaring.

Practise with our Pythagoras questions, and see the midpoint calculator.

Exam tips

  • Sketch the triangle on the grid: it makes the method obvious and earns method marks.
  • Give exact answers in simplified surd form if asked, otherwise round to 3 significant figures.
  • Watch for 3-4-5 and 5-12-13 triangles: they give whole-number distances.

Distance on maps and in 3D

On a grid map where each square is 1 km, a walk from (2,1)(2, 1) to (8,9)(8, 9) is 36+64=10\sqrt{36 + 64} = 10 km in a straight line ("as the crow flies"), even though walking along the grid lines would be 14 km.

In three dimensions, add the third change too: d=Δx2+Δy2+Δz2d = \sqrt{\Delta x^2 + \Delta y^2 + \Delta z^2}. The space diagonal of a 3 × 4 × 12 box is 9+16+144=13\sqrt{9 + 16 + 144} = 13.

Frequently asked questions

What is the distance formula?

d = √((x₂ − x₁)² + (y₂ − y₁)²): Pythagoras' theorem using the horizontal and vertical changes.

How do you find the length of a line segment?

Find the change in x and the change in y, square both, add them, then take the square root.

Does the order of the points matter?

No. The changes are squared, so the distance comes out the same either way.

Is anything I type sent to a server?

No. The calculation runs in your browser and nothing is stored.

Sources

  1. GCSE mathematics: subject content and assessment objectives. Department for Education.
  2. Cambridge IGCSE Mathematics 0580 syllabus. Cambridge International.