Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Distance Between Points
5
units
Δx (x₂ − x₁) 3
Δy (y₂ − y₁) 4

What Is the Distance Calculator?

This calculator finds the straight-line (Euclidean) distance between two points on a flat, two-dimensional coordinate plane. Given the coordinates of point A, \((x_1, y_1)\), and point B, \((x_2, y_2)\), it returns the shortest distance separating them — the length of the line segment that joins them. It works with any real numbers, including negative coordinates and decimals.

How to Use It

Enter the X and Y coordinates of your first point, then the X and Y coordinates of your second point. Click calculate to instantly see the distance, along with the horizontal change (\(\Delta x\)) and vertical change (\(\Delta y\)) used in the computation. The result is expressed in the same units as your coordinates.

The Formula Explained

The distance formula is a direct application of the Pythagorean theorem. The horizontal leg of a right triangle is \(\Delta x = x_2 - x_1\) and the vertical leg is \(\Delta y = y_2 - y_1\). The distance is the hypotenuse:

$$d = \sqrt{\left(x_2 - x_1\right)^2 + \left(y_2 - y_1\right)^2}$$

Because the differences are squared, the order in which you subtract the points does not affect the result.

Advertisement
Two points on a coordinate plane with a right triangle showing horizontal and vertical legs and the diagonal distance
The distance formula comes from the Pythagorean theorem: the straight line is the hypotenuse of a right triangle.

Worked Example

Suppose point A is \((1, 2)\) and point B is \((4, 6)\). Then \(\Delta x = 4 - 1 = 3\) and \(\Delta y = 6 - 2 = 4\). Squaring and adding: $$3^2 + 4^2 = 9 + 16 = 25.$$ Taking the square root gives \(d = \sqrt{25} = 5\). So the two points are 5 units apart — a classic 3-4-5 right triangle.

Worked example with two specific points plotted and the diagonal distance between them
A worked example: plotting the two points and measuring the diagonal between them.

FAQ

Does the order of the points matter? No. Squaring each difference removes the sign, so (A to B) equals (B to A).

Can I use negative coordinates? Yes. Negative values are handled correctly; only the differences and their squares affect the answer.

What units does the result use? The distance is in whatever unit your coordinates are measured in — meters, pixels, miles, or unitless grid squares.

Last updated: