Distance and Midpoint Calculator
Enter two points to get the straight line distance and the point exactly halfway between them. Or enter one end and the midpoint to find the other end.
First point
Second point
Worked examples
Distance in 2D
(1, 2) to (4, 6)
5, midpoint (2.5, 4)
A 3, 4, 5 right-angled triangle.
The other end
End (1, 2), midpoint (4, 6)
(7, 10)
2 × 4 - 1 = 7 and 2 × 6 - 2 = 10.
About Distance and Midpoint Calculator
The distance between two points comes from Pythagoras' theorem. In two dimensions, find the difference in x and the difference in y, square each, add them and take the square root. From (1, 2) to (4, 6) that is the square root of 3² + 4², which is 5. In three dimensions you add the squared difference in z as well. This straight line distance is called the Euclidean distance, and the page also gives the squared distance, which is handy for comparing distances without a square root.
The midpoint is the point exactly halfway along the line, found by averaging each coordinate. The midpoint of (1, 2) and (4, 6) is (2.5, 4). You can also work backwards: if you know one end of a line and its midpoint, the other end is twice the midpoint minus the known end. That is how you find the opposite end of a diameter from the centre. The page also shows the Manhattan distance, which adds the differences as if you could only travel along a grid, and the Chebyshev distance, the largest single difference.
How to use Distance and Midpoint Calculator
- Choose to find the distance and midpoint, or the other end point.
- Choose two or three dimensions.
- Enter the coordinates of both points. For the other end option, enter one end and the midpoint.
- Read the distance, midpoint and the working below.
Common uses
- Coordinate geometry homework
- Finding the length of a diagonal on a plan
- Finding the centre of a segment or circle
- Distances between positions in games and graphics
Frequently asked questions
What is the distance formula?
In two dimensions it is the square root of (x₂ - x₁)² + (y₂ - y₁)². In three dimensions, add (z₂ - z₁)² inside the root.
Does the order of the points matter?
No. The differences are squared, so the distance is the same whichever point you list first.
How do I find the midpoint?
Add the two x values and halve, then do the same for y, and for z in three dimensions. The midpoint of (2, 3) and (8, 11) is (5, 7).
How do I find the other end of a line segment?
Double the midpoint and subtract the known end. If one end is (1, 2) and the midpoint is (4, 6), the other end is (7, 10).
What is the Manhattan distance?
It is the sum of the absolute differences in each direction, like walking along city blocks. From (1, 2) to (4, 6) it is 3 + 4, which is 7.