Distance Between Two Points
The distance between two points in a 2D plane is calculated using the Euclidean distance formula, derived directly from the Pythagorean theorem. Given two points (x₁, y₁) and (x₂, y₂), the straight-line distance is the length of the hypotenuse of the right triangle formed by their horizontal and vertical separations.
This calculator instantly computes the distance and also shows Δx and Δy — the horizontal and vertical components — along with a full step-by-step breakdown of the formula. It is useful in geometry, navigation, physics, game development, and any field where spatial measurements matter.
How it works
d = √((x₂ − x₁)² + (y₂ − y₁)²). Where Δx = x₂ − x₁ and Δy = y₂ − y₁, this simplifies to d = √(Δx² + Δy²). This is a direct application of the Pythagorean theorem.
Use cases
- Finding the straight-line distance between two map coordinates
- Calculating the length of a line segment in geometry class
- Measuring distances between objects in 2D game engines
- Determining the hypotenuse of a right triangle from its legs
- Verifying distances in CAD drawings and architectural blueprints
Frequently asked questions
What is the distance formula between two points?
For points (x₁, y₁) and (x₂, y₂), the Euclidean distance is d = √((x₂ − x₁)² + (y₂ − y₁)²). Subtract the coordinates, square each difference, add them, and take the square root. This calculator performs those steps and shows the full substitution so you can follow the arithmetic.
How is the distance formula related to the Pythagorean theorem?
The horizontal separation Δx = x₂ − x₁ and the vertical separation Δy = y₂ − y₁ form the two legs of a right triangle, and the straight-line distance between the points is its hypotenuse. Applying the Pythagorean theorem, d² = Δx² + Δy², which gives d = √(Δx² + Δy²). The distance formula is simply the theorem written in coordinate form.
How do you find the distance between (1, 2) and (4, 6)?
Compute Δx = 4 − 1 = 3 and Δy = 6 − 2 = 4, then d = √(3² + 4²) = √(9 + 16) = √25 = 5. This is the classic 3-4-5 right triangle. Enter the same coordinates in the calculator to see each step laid out.
Can the distance between two points be negative?
No. Because both coordinate differences are squared before adding, the result under the square root is never negative, so the distance is always zero or positive. A distance of exactly zero occurs only when the two points are identical.
What do Δx and Δy mean in the distance calculation?
Δx = x₂ − x₁ is the horizontal separation between the points and Δy = y₂ − y₁ is the vertical separation. Their signs indicate direction, but since both values are squared in the formula, the final distance is the same regardless of which point you call first. The calculator displays both components alongside the result.