Advanced maths

Distance and midpoint calculator

Find distance and the halfway point between two Cartesian coordinates.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your numbers and select Calculate.

Behind the numbers

How this calculation works

The distance follows the Pythagorean theorem applied to coordinate differences. Averaging each coordinate gives the midpoint of the straight segment.

THE FORMULADistance = √((x₂ − x₁)² + (y₂ − y₁)²); midpoint = ((x₁ + x₂)/2, (y₁ + y₂)/2)

A worked example

From (0, 0) to (3, 4), the distance is 5 and the midpoint is (1.5, 2).

Good to know

An estimate under the stated inputs and model. Displayed decimals are rounded; verify assumptions before relying on the result.

A little curiosity

The midpoint does not depend on which point comes first

Averaging each coordinate gives the same midpoint if the endpoints are swapped. Distance is also unchanged because the coordinate differences are squared. Both results therefore describe the segment without choosing a direction of travel.

A vector displacement is different: swapping endpoints reverses its signs. This tool reports an unsigned distance and a location, not a directed displacement vector.

Latitude and longitude do not form an ordinary flat grid

The formula assumes a Cartesian plane with compatible coordinate units. Degrees of latitude and longitude on Earth need a geographic model; entering them as x and y does not produce a reliable surface distance in kilometres.

If x and y use different scales, convert them consistently before finding a geometric distance. A graph of time versus money is not a physical map where those two quantities can be combined as matching length units.

A few questions, answered

Can both points be identical?

Yes. Their distance is zero and their midpoint is that same point.

Does it calculate road distance?

No. It calculates the straight segment in a flat coordinate system.

Find your calculator

Start typing to explore the library.