Precise point-to-point distance in planar or spatial coordinates. Visualize segments, compute midpoints, slopes (2D), and explore the Pythagorean theorem in action.
The Euclidean distance between two points in space is the length of the shortest path connecting them — a straight line. Derived directly from the Pythagorean theorem, this metric forms the basis of classical geometry, GPS navigation, machine learning (k-NN, clustering), and computer graphics. In 2D, distance = √[(x₂−x₁)² + (y₂−y₁)²]; in 3D, the formula extends naturally: √[(Δx)² + (Δy)² + (Δz)²]. The concept was formalized by Euclid in "Elements" (circa 300 BCE) and later generalized by Hermann Minkowski. Today, Euclidean distance is the default metric for real-world coordinate systems.
| Scenario | Coordinates | Δx, Δy, Δz | Distance |
|---|---|---|---|
| 2D right triangle | (0,0) & (3,4) | dx=3, dy=4 | 5.0000 |
| 2D negative quadrant | (-5, -2) & (1, 3) | dx=6, dy=5 | 7.8102 |
| 3D diagonal | (1,2,2) & (4,6,8) | dx=3, dy=4, dz=6 | 7.8102 |
| 3D origin to space | (0,0,0) & (2,3,6) | dx=2, dy=3, dz=6 | 7.0000 |
The midpoint ((x₁+x₂)/2, (y₁+y₂)/2) represents the exact center of the segment. In navigation, it's used to find halfway points. The slope (Δy/Δx) describes the line's steepness — essential for linear regression and gradient analysis.
This calculator uses IEEE 754 double-precision floating-point arithmetic, delivering results up to 15 decimal digits of precision. It handles negative coordinates, decimals, and large values gracefully. For collinear or identical points, distance returns zero and slope properly shows "undefined" for vertical lines.