Distance Calculator

Distance: 0

Δx
Δy
Δz
Midpoint
StepCalculation

The Distance Formula Is the Pythagorean Theorem in Disguise

To find the straight-line distance between two points, this calculator uses the standard Euclidean distance formula: for two points (x₁, y₁) and (x₂, y₂), the distance is d = √((x₂ − x₁)² + (y₂ − y₁)²). This is exactly the Pythagorean theorem applied to the horizontal and vertical legs of a right triangle formed between the two points — the Δx and Δy values shown above are those legs, and the distance is the hypotenuse. Extending to three dimensions simply adds a third squared term under the root: d = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²), since the diagonal of a 3D box can be found by applying the same theorem twice — once across the base, then again up to the opposite corner.

Distance vs. Displacement, and the Midpoint

The result here is a scalar distance — always non-negative, regardless of which point you list first, since every difference is squared before the square root is taken. The midpoint shown is simply the average of each coordinate, ((x₁+x₂)/2, (y₁+y₂)/2[, (z₁+z₂)/2]), which marks the point exactly halfway along the straight line connecting the two inputs. Note this formula assumes flat (Euclidean) space with consistent units on every axis — it is not the right tool for distances between latitude/longitude pairs on a sphere, which require great-circle formulas instead.

Related Geometry Tools

Since the distance formula is a direct application of the Pythagorean theorem, the dedicated Pythagorean theorem calculator is useful if you already know two leg lengths rather than coordinates. If your two points are actually vertices of a larger shape and you need angles or side lengths beyond a single distance, the triangle calculator can solve the rest of the figure.

Frequently Asked Questions

What formula does this calculator use?

It uses the Euclidean distance formula, d = sqrt((x2-x1)^2 + (y2-y1)^2) for two dimensions, or d = sqrt((x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2) for three dimensions. This is the Pythagorean theorem applied to the coordinate differences between the two points.

Can I use this for latitude/longitude or GPS coordinates?

No. This calculator assumes flat, Euclidean coordinates with consistent units on every axis. Distances between latitude/longitude pairs on the curved surface of the Earth require a great-circle formula (such as the Haversine formula), which accounts for the sphere's curvature and is not what this tool computes.