Distance Between Points
Calculate the distance between two points on a plane.
The gap between two points
The straight-line distance between two points is found from their coordinates. This calculates it, a fundamental and constant need in coordinate geometry, mapping and graphics.
Enter two points to find the distance between them.
Pythagoras, once more
This distance is the Pythagorean theorem in action: the horizontal and vertical differences between the two points form the legs of a right triangle, and the distance you want is the hypotenuse — so it is the square root of the sum of those two differences squared. Recognising it as Pythagoras rather than a formula to memorise makes it stick, and shows why it extends so naturally to three dimensions by including the depth difference under the same square root. This one calculation underlies an enormous amount of practical computing: finding the nearest location, detecting collisions in a game, clustering data points by how close they are. Anytime a program needs to know how far apart two positions are, this is the calculation running underneath, which makes a simple triangle theorem quietly one of the most-used results in all of computing.
Questions & answers
How is the distance between two points found?
By the Pythagorean theorem — the horizontal and vertical gaps are the two legs of a right triangle, and the distance is the hypotenuse.
Where is this calculation used?
Constantly in computing — finding the nearest location, detecting collisions in games, and clustering data by how close points are.
Is anything uploaded?
No. The calculation happens in your browser.