Distance Between Two Points Calculator
Find the straight-line distance between two points.
Results update as you type.
How it works
The distance between two points is the length of the straight line segment joining them on a coordinate plane, and it is found with the distance formula, a direct application of the Pythagorean theorem. This distance calculator takes the coordinates of two points and returns the exact distance between them, along with the horizontal and vertical change that make up the underlying right triangle. The idea is simple: the difference in the x-coordinates gives the horizontal leg, the difference in the y-coordinates gives the vertical leg, and the distance is the hypotenuse connecting the two points. Squaring each leg, adding them, and taking the square root produces a length that is always positive, regardless of which direction the points sit relative to each other. For the points (0, 0) and (3, 4), the horizontal change is 3 and the vertical change is 4, so the distance is the square root of 9 plus 16, which is the square root of 25, or exactly 5, the classic 3-4-5 triangle. Students studying geometry, game developers measuring on-screen gaps, and surveyors mapping locations all rely on a distance calculator to turn two sets of coordinates into a precise separation quickly.
d = √[(x₂ − x₁)² + (y₂ − y₁)²]
The distance formula is the Pythagorean theorem applied to coordinates. The horizontal gap between the points forms one leg of a right triangle and the vertical gap forms the other, so squaring each, adding them, and taking the square root gives the length of the hypotenuse. That hypotenuse is the straight-line distance between the points, which is why squaring removes any negative signs from the direction of travel.
Source:Standard mathematics
We review all our tools from time to time to ensure accuracy.
Worked example
How to use this calculator
- 1
Enter your values
Enter x₁, y₁, x₂ and y₂.
- 2
Adjust the options
Fine-tune any options to match your situation.
- 3
Read your result
Distance updates instantly as you type — no button to press.
Frequently asked questions
What is the distance formula?
The distance formula finds the straight-line length between two points by taking the square root of the sum of the squared differences in their coordinates. Written out, it is the square root of the quantity x-two minus x-one squared plus y-two minus y-one squared. It comes directly from the Pythagorean theorem, treating the horizontal and vertical gaps between the points as the two legs of a right triangle whose hypotenuse is the distance.
Why does squaring remove the sign?
Squaring any real number, positive or negative, produces a positive result, so it does not matter which point you label first. The horizontal and vertical changes might come out negative depending on direction, but once squared they contribute the same positive amount to the total. This is why distance is always positive: it measures a length, and a length has no direction. The final square root then returns that length.
Does the order of the points matter?
No, the distance is identical whichever point you enter first. Because the formula squares the differences in the coordinates, any sign change from swapping the points disappears, leaving the same positive result. This makes sense physically, since the gap between two locations is the same whether you measure from the first to the second or the second to the first. The calculator gives the correct distance regardless of order.
Can it measure distance in three dimensions?
This calculator works in two dimensions, using x and y coordinates on a flat plane. The same idea extends to three dimensions by adding a z-coordinate term inside the square root, so the formula becomes the square root of the squared differences in x, y, and z. For most geometry homework, mapping, and screen-based work, the two-dimensional version handled here is exactly what you need.
What are Δx and Δy?
Delta x and delta y are the horizontal and vertical changes between the two points, the differences in their x-coordinates and y-coordinates respectively. They are the two legs of the right triangle whose hypotenuse is the distance. Seeing them separately is useful because they also give the slope of the line, delta y divided by delta x, and they show at a glance how far apart the points are along each axis.