Distance Between Two Points Calculator

Enter two coordinate pairs and get the straight-line distance, midpoint, and signed horizontal and vertical change for the segment that joins them.

How It Works

Formula

Δx=x2x1\Delta x = x_2 - x_1

Δy=y2y1\Delta y = y_2 - y_1

d=(Δx)2+(Δy)2d = \sqrt{(\Delta x)^2 + (\Delta y)^2}

M=(x1+x22,  y1+y22)M = \left(\frac{x_1 + x_2}{2},\; \frac{y_1 + y_2}{2}\right)

Variables, symbols and units

x1x_1

x-coordinate of Point A

y1y_1

y-coordinate of Point A

x2x_2

x-coordinate of Point B

y2y_2

y-coordinate of Point B

Δx\Delta x

Horizontal change from A to B

Δy\Delta y

Vertical change from A to B

dd

Straight-line distance between the two points

MM

Midpoint of the segment
Calculation method explained

Enter Point A and Point B as coordinate pairs. The calculator subtracts x-values to get dx, subtracts y-values to get dy, uses the distance formula d = sqrt(dx^2 + dy^2), and averages the two coordinates to place the midpoint. Results stay in the same implied coordinate units as the numbers you enter.

Frequently Asked Questions

What does this calculator measure?
It measures the Euclidean distance between two points in a 2D coordinate plane. It also returns the midpoint and the signed horizontal and vertical changes between the points.
How is this different from Pythagoras, Triangle, or Linear Equation?
This tool starts from two coordinate pairs directly. Pythagoras solves a missing side from known side lengths, Triangle solves a triangle from three sides, and Linear Equation focuses on y = mx + b rather than a segment between two plotted points.
Can I use negative or decimal coordinates?
Yes. All four coordinates accept signed decimal values, so the calculator works for points in any quadrant and for fractional layouts.
What if the two points are identical?
That is still a valid geometry case. The distance is 0, the midpoint is the same shared point, and both dx and dy are 0.
Does this tell me travel distance on a map?
No. It only measures straight-line distance inside a coordinate plane. It does not estimate roads, routes, GPS travel, or real-world pathfinding.

Related Calculators

All calculators

Ready to Calculate?

Free calculators.