Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Euclidean Distance
5
units between the two points
Δx (x₂ − x₁) 3
Δy (y₂ − y₁) 4

What Is Euclidean Distance?

Euclidean distance is the ordinary, straight-line distance between two points in space — the length you would measure with a ruler. In a two-dimensional plane, each point has an x-coordinate and a y-coordinate, and the distance between point A (x₁, y₁) and point B (x₂, y₂) is found by applying the Pythagorean theorem to the horizontal and vertical gaps between them.

Two points in a 2D coordinate plane connected by a straight diagonal line
Euclidean distance is the straight-line segment between two points in the plane.

How to Use This Calculator

Enter the coordinates of your first point (X₁, Y₁) and your second point (X₂, Y₂). The calculator instantly returns the Euclidean distance along with the horizontal change Δx and vertical change Δy so you can see how the result is built. Coordinates may be positive, negative, or decimals.

The Formula Explained

The formula is $$d = \sqrt{\left(\text{X}_2 - \text{X}_1\right)^2 + \left(\text{Y}_2 - \text{Y}_1\right)^2}$$ First subtract the x-coordinates to get \(\Delta x\) and the y-coordinates to get \(\Delta y\). Square each difference (which removes any negative sign), add the two squares together, then take the square root of the sum. The squaring guarantees that distance is always positive regardless of which point you call A or B.

Advertisement
Right triangle showing horizontal and vertical legs with the hypotenuse as the distance
The formula comes from the Pythagorean theorem: the legs are the x and y differences.

Worked Example

Suppose point A is (0, 0) and point B is (3, 4). Then \(\Delta x = 3 - 0 = 3\) and \(\Delta y = 4 - 0 = 4\). Squaring gives 9 and 16, which sum to 25. The square root of 25 is 5, so the distance is exactly 5 units — the classic 3-4-5 right triangle.

$$d = \sqrt{\left(3 - 0\right)^2 + \left(4 - 0\right)^2} = \sqrt{9 + 16} = \sqrt{25} = 5$$

FAQ

Does the order of the points matter? No. Because the differences are squared, swapping A and B gives the same distance.

Can it handle negative coordinates? Yes. The formula works for any real coordinates, including negatives and decimals.

What units is the result in? The distance is in the same units as your input coordinates (pixels, meters, grid units, etc.). The calculator simply reports it as "units."

Last updated: