📍 Distance Calculator
Calculate the straight-line distance between two points in 2D or 3D space, plus midpoint, slope, and coordinate changes. All results shown with step-by-step working.
Point 1
Point 2
Distance Formulas
Worked Example — Points (1, 1) and (4, 5)
Frequently Asked Questions
The distance formula calculates the straight-line (Euclidean) distance between two points. In 2D: d = √((x₂−x₁)² + (y₂−y₁)²). It is derived directly from the Pythagorean theorem, where Δx and Δy form the two legs of a right triangle.
The midpoint is the exact centre of the line segment connecting two points. It is found by averaging the x-coordinates and y-coordinates separately: M = ((x₁+x₂)/2, (y₁+y₂)/2).
Extend the formula to include a third dimension: d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²). This is still based on the Pythagorean theorem, applied twice across three axes.
The distance formula is used in GPS navigation (great-circle distance), computer graphics (collision detection, ray tracing), machine learning (k-nearest neighbours), robotics (path planning), and mapping applications for measuring straight-line distances between coordinates.
Related Calculators
Slope Calculator
Calculate slope, y-intercept, angle, and line equation from two points.
Pythagorean Theorem Calculator
Calculate the missing side of a right triangle using the Pythagorean theorem.
Geometry Calculator
Calculate area, perimeter, volume and other properties of geometric shapes.