Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Distance Between the Two Points
5
units
Horizontal change (Δx) 3
Vertical change (Δy) 4
Midpoint (1.5, 2)

What Is the Distance Between Two Points?

The distance between two points is the length of the straight line segment connecting them on a coordinate plane. This calculator uses the Euclidean distance formula to measure that gap for any two points, given their (x, y) coordinates. It works for positive, negative, and decimal coordinates alike.

Two points on a coordinate plane connected by a straight diagonal line
The distance between two points is the length of the straight line connecting them.

How to Use This Calculator

Enter the coordinates of the first point as X₁ and Y₁, then enter the coordinates of the second point as X₂ and Y₂. Click calculate to instantly see the distance, the horizontal change (Δx), the vertical change (Δy), and the midpoint between the two points.

The Formula Explained

The distance formula is a direct application of the Pythagorean theorem. The horizontal difference \((x_2 - x_1)\) and the vertical difference \((y_2 - y_1)\) form the two legs of a right triangle, and the distance is the hypotenuse:

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

Because each difference is squared, the sign of the coordinates does not change the result — distance is always positive.

Advertisement
Right triangle formed by horizontal and vertical legs between two points showing the Pythagorean relationship
The formula comes from the Pythagorean theorem: Δx and Δy are the legs, distance d is the hypotenuse.

Worked Example

Find the distance between (1, 2) and (4, 6). The horizontal change is \(4 - 1 = 3\) and the vertical change is \(6 - 2 = 4\). Squaring gives 9 and 16, summing to 25. The square root of 25 is 5, so the distance is exactly 5 units. The midpoint is $$\left(\frac{1+4}{2}, \frac{2+6}{2}\right) = (2.5, 4).$$

FAQ

Does the order of the points matter? No. Swapping point 1 and point 2 gives the same distance because the differences are squared.

Can I use negative coordinates? Yes. The formula handles negative values correctly; the squaring removes any negative sign.

What units does the result use? The distance is in the same units as your input coordinates. If your points are in meters, the distance is in meters.

Last updated: