Find the straight-line distance between two points in 2D or 3D. Type any coordinates and the answer, the right triangle behind it, the midpoint, the slope, and every step update live.
The distance is the hypotenuse of a right triangle.
The distance formula returns the length of the straight line between two points on a coordinate plane. It is one of the most-used results in coordinate geometry — and it is really just the Pythagorean theorem, rewritten in terms of coordinates rather than triangle sides.
Four steps take you from two points to a distance.
Subtract the matching coordinates: Δx = x₂ − x₁ and Δy = y₂ − y₁. Sign doesn't matter — it disappears in the next step.
Squaring removes any negative sign and sets up the Pythagorean sum.
Sum them to get d² — the squared distance, also called the radicand.
The square root of that sum is the distance. Round only at the very end.
The same procedure handles a clean Pythagorean triple, negative coordinates, and a third dimension. Each example is computed live, not hardcoded.
The classic Pythagorean triple — a whole-number distance of 5.
Measuring the gap between two coordinates is a building block across navigation, graphics, and data.
The formula generalizes cleanly. Add one squared term per dimension — the structure never changes. Switch the tool above to 3D to try it.
A fast lookup for the distance from (0, 0) to nearby points. The exact tag marks whole-number distances — the Pythagorean triples.
A handful of facts make the distance formula faster to use and harder to get wrong.
Most wrong answers come from a few predictable slips — here is how to dodge them.

Slope-intercept form is y = mx + b, where m is the slope and b is the y-intercept. This guide shows how to find the equation from a graph, two points, or a point and slope, graph it, and convert standard form.

The volume of a cylinder is V = πr²h, where r is the radius of the circular base, h is the height, and π ≈ 3.14159. This guide shows why the formula works, walks through a full numerical example, and covers diameter inputs and unit conversions.

The distance between two points is d = √((x₂−x₁)² + (y₂−y₁)²). It comes straight from the Pythagorean theorem: the horizontal and vertical gaps between the points are the two legs of a right triangle, and the distance is the hypotenuse.