Calculator Coordinate geometry in the (x, y) plane
Distance between two points calculator
In one sentence
Computes the length of a line segment.
Last checked Source: uk-dfe-alevel-maths-subject-content Source: Department for Education, GCE AS and A level subject content for mathematics (topics derived; every example and value computed here), uk-dfe-alevel-maths-subject-content www.gov.uk (opens in a new tab)
Key facts
Distance between two points calculator
- Formula ref
- d = √((Δx)² + (Δy)²)
- Topic
- Coordinate geometry in the (x, y) plane
Inputs
- (x₁, y₁), (x₂, y₂)
Worked input
- Input (1, 5) and (9, −1).
- Δx = 8, Δy = −6.
- d = √(64 + 36) = 10.
- Take (0, 0) and (5, 12), a pair whose differences form a 5-12-13 triangle, so the distance is a whole number. The differences are 5 and 12, their squares add to 169, and the distance is 13. A whole-number distance is a sign that the horizontal and vertical differences form a Pythagorean triple, and recognising the common ones such as three, four, five or five, twelve, thirteen speeds up many questions. Check: 13 squared is 169, which equals 25 + 144, so no surd is left in the answer.
- Take (−2, 1) and (3, 4), a pair whose squared distance is not a perfect square, so the answer stays as a surd. The differences are 5 and 3, their squares add to 34, and the distance is √34. When the squared distance is not a perfect square leave the answer as a surd, because the exact value is what the question normally asks for and any decimal is only an approximation. Check: 34 lies between 25 and 36, so √34 lies between 5 and 6, as the decimal 5.8310 confirms.
- Take (−3, 6) and (4, 6), two points at the same height, so there is no vertical difference. The differences are 7 and 0, their squares add to 49, and the distance is 7. If one of the differences is zero the points lie on a horizontal or a vertical line, and the distance is simply the other difference with the sign removed, so the formula is not needed at all. Check: when Δy is zero the formula reduces to the absolute horizontal difference, and 7 is exactly the length of that horizontal segment.
How to use it
- Enter both points.
- Keep surds exact if asked.
Distance between two points calculator for your study of A-level maths: where it comes from and what it covers.
See also Perpendicular bisector calculator, Line through two points calculator, Gradient calculator and Midpoint calculator.
Study brief
- In the Pearson Edexcel Level 3 Advanced GCE in Mathematics, specifically within the Pure Mathematics sections for Paper 1 and Paper 2, students must learn to work with vectors. For those calculating the distance between two points represented by position vectors (x1, y1) and (x2, y2), the formula involves the square of the distance d. This is expressed as d squared equals the sum of (x1 minus x2) squared and (y1 minus y2) squared. When working in three dimensions, the distance between points (x1, y1, z1) and (x2, y2, z2) requires an additional component. In these three-dimensional cases, d squared equals (x1 minus x2) squared plus (y1 minus y2) squared plus (z1 minus z2) squared. Additionally, students use position vectors to find AB by calculating OB minus OA, which is equivalent to b minus a. These vector operations are part of the Section 10 content guidance for the specification issued in February 2020.
Practise for free
Test yourself with exam-style questions and see why each answer is right or wrong.
More from Coordinate geometry in the (x, y) plane
-
Circle centre and radius calculator
Reads the centre and radius from x² + y² + 2gx + 2fy + c = 0.
-
Circle equation builder
Writes the equation of a circle from its centre and radius or from a diameter's ends.
-
Gradient calculator
Finds the gradient and angle of the line through two points.
-
Line through two points calculator
Gives y = mx + c and ax + by + c = 0 for the line through two points.
-
Midpoint calculator
Finds the midpoint of a segment and the coordinates of an endpoint given the other end and the midpoint.
-
Parametric curve point and gradient
Evaluates x(t), y(t) and dy/dx at a chosen parameter value.
-
Perpendicular bisector calculator
Finds the perpendicular bisector of the segment AB.
-
Perpendicular line calculator
Finds the line perpendicular to a given line through a given point.