Skip to content
MathAnvil

Distance & Midpoint Calculator

Find the distance between two points and their midpoint. Shows the distance and midpoint formulas with your values substituted in, step by step.

Coordinates
(x₁, y₁), (x₂, y₂)
Fill in both points and press Calculate.

About this calculator

Enter the coordinates of two points (x₁, y₁) and (x₂, y₂). The calculator computes the straight-line distance using the distance formula d = √((x₂ − x₁)² + (y₂ − y₁)²) and the midpoint M = ((x₁ + x₂)/2, (y₁ + y₂)/2).

Share:

How the distance and midpoint formulas work

The distance formula d = √((x₂ − x₁)² + (y₂ − y₁)²) is the Pythagorean theorem applied to the horizontal gap (x₂ − x₁) and vertical gap (y₂ − y₁) between two points: those gaps are the legs of a right triangle and the distance is its hypotenuse. The midpoint M = ((x₁ + x₂)/2, (y₁ + y₂)/2) is simply the average of the two x-coordinates and the average of the two y-coordinates, which lands exactly halfway along the segment. When the two points share an x-value the segment is vertical, so there is no slope, but the distance and midpoint are still well defined.