What Is the Distance Formula?
The distance formula computes the straight-line (Euclidean) distance between two points in a two-dimensional coordinate plane. Given point one at \((x_1, y_1)\) and point two at \((x_2, y_2)\), the distance \(d\) is the length of the segment connecting them. It is a direct application of the Pythagorean theorem to the horizontal and vertical differences between the points.
How to Use This Calculator
Enter the coordinates of your first point (\(x_1\) and \(y_1\)) and your second point (\(x_2\) and \(y_2\)). Click calculate and the tool returns the exact distance along with the horizontal change (\(\Delta x\)) and vertical change (\(\Delta y\)). Coordinates may be positive, negative, whole numbers, or decimals.
The Formula Explained
The formula is $$d = \sqrt{\left(x_2 - x_1\right)^2 + \left(y_2 - y_1\right)^2}$$ The differences \(x_2 - x_1\) and \(y_2 - y_1\) form the two legs of a right triangle. Squaring each leg, summing them, and taking the square root yields the hypotenuse — which is the straight-line distance between the points.
Worked Example
Find the distance from \((1, 2)\) to \((4, 6)\). Here \(\Delta x = 4 - 1 = 3\) and \(\Delta y = 6 - 2 = 4\). So $$d = \sqrt{3^2 + 4^2} = \sqrt{9 + 16} = \sqrt{25} = 5$$ The two points are exactly 5 units apart — the classic 3-4-5 right triangle.
FAQ
Does the order of the points matter? No. Because the differences are squared, swapping the points gives the same distance.
Can distance be negative? No. Distance is always zero or positive, since it comes from a square root of a sum of squares.
Can I use this for 3D points? This calculator handles 2D points only. For 3D, you would add a \((z_2 - z_1)^2\) term inside the square root.