Skip to content

Distance Between Two Points Calculator

Compute the straight-line distance between two points on a coordinate plane.

△ Geometry

Enter your values and press Calculate to see the result and the working.

Share WhatsApp Telegram X Email

Formula used

Δx=-x1+x2
Δy=-y1+y2
d=Δx2+Δy2

Variables

Delta_x Horizontal difference
The gap between the two x coordinates
d Distance
The shortest straight-line distance

What does this calculator do?

Computes the shortest straight-line distance between two points given their coordinates, and also shows the horizontal and vertical gaps.

When would you use it?

In coordinate geometry, in programming when measuring between two points on a screen or flat map, and in data work when measuring similarity between two points.

How the formula works

This is Pythagoras applied to the coordinate plane: the horizontal and vertical gaps are the two legs of a right triangle, and the distance you want is its hypotenuse.

So we square both gaps, add them and take the square root. Squaring removes the sign automatically, so the order of the points does not matter — A to B equals B to A.

One practical caveat: this is flat-plane distance. Two points on the Earth's surface need spherical formulas once the distances get large.

What does the result mean?

The result is the length of the straight line joining the points. It is always less than or equal to the horizontal plus the vertical gap, because going diagonally beats going along two edges.

Common mistakes

Forgetting to square the gaps before adding is a common slip; simply adding them gives the "Manhattan distance", which is a different measure entirely.

Worked example

Two points on a plane

From (0,0) to (3,4).