InfyCalculator

Midpoint and Distance Calculator

Get the distance between two points and the midpoint halfway between them.

Point 1 — x₁
Point 1 — y₁
Point 2 — x₂
Point 2 — y₂
Loading calculator…

How it works

d = √((x₂ − x₁)² + (y₂ − y₁)²) · midpoint = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2)

The distance formula is the Pythagorean theorem in disguise: the horizontal and vertical changes form the legs of a right triangle, and the straight-line distance is its hypotenuse. The midpoint simply averages the x’s and averages the y’s.

Worked example

From (2, 3) to (8, 11): Δx = 6 and Δy = 8, so d = √(36 + 64) = √100 = 10. The midpoint is ((2 + 8) ÷ 2, (3 + 11) ÷ 2) = (5, 7).

Frequently asked questions

Does the order of the points matter?

Not for the answers. Swapping the points flips the signs of Δx and Δy, but squaring erases the signs in the distance, and averaging gives the same midpoint.

How do I do this in three dimensions?

Add the z-term: d = √(Δx² + Δy² + Δz²), and average all three coordinates for the midpoint. The Pythagorean idea extends to any number of dimensions.

Can I use this for map coordinates?

Only over short distances. Latitude and longitude sit on a sphere, so for points miles apart you need great-circle formulas (haversine) rather than flat-plane distance.

Related calculators

This calculator is for educational purposes. Double-check important results before acting on them.