Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Distance Between Points
5
units
Horizontal change (x₂ − x₁) 3
Vertical change (y₂ − y₁) 4

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.

Two points on a coordinate plane connected by a straight diagonal line representing distance
The distance formula gives the straight-line length between two points on a coordinate plane.

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.

Advertisement
Right triangle formed by horizontal and vertical legs between two points, with the hypotenuse as distance
The formula comes from the Pythagorean theorem: the distance is the hypotenuse of a right triangle.

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.

Last updated: