What It Is
This calculator finds the straight-line distance between two points on a 2D coordinate plane. When those points are vertices of a triangle, that distance is exactly the length of the side connecting them. The result is derived directly from the Pythagorean theorem applied to the horizontal and vertical separation of the points.
How to Use It
Enter the coordinates of the first point as X₁ and Y₁, and the second point as X₂ and Y₂. The calculator returns the distance d, along with the horizontal difference (Δx) and vertical difference (Δy) so you can verify the work. Coordinates can be positive, negative, or decimal values.
The Formula Explained
The distance formula is $$d = \sqrt{\left(\text{x}_2 - \text{x}_1\right)^2 + \left(\text{y}_2 - \text{y}_1\right)^2}$$. The terms \((\text{x}_2 - \text{x}_1)\) and \((\text{y}_2 - \text{y}_1)\) are the legs of a right triangle, and d is its hypotenuse. Squaring removes any sign, so the order of the points does not change the result. Taking the square root returns the true straight-line length.
Worked Example
For points (1, 2) and (4, 6): \(\Delta x = 4 - 1 = 3\) and \(\Delta y = 6 - 2 = 4\). Then $$d = \sqrt{3^2 + 4^2} = \sqrt{9 + 16} = \sqrt{25} = 5.$$ This is the classic 3-4-5 right triangle, so the side length is 5 units.
FAQ
Does the order of the points matter? No. Because the differences are squared, swapping point 1 and point 2 gives the same distance.
What units does the result use? The same units as your input coordinates. If coordinates are in centimeters, the distance is in centimeters.
Can I use this for triangle sides? Yes — enter the two endpoints of any side and the result is that side's length. Repeat for all three sides to get the full perimeter.