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.
Examples
Point B is 3 units right and 4 units up from Point A, so the distance is 5.
Distance d
5
Midpoint M
(2.5, 4)
Horizontal change dx
3
Vertical change dy
4
Segment summary
Point B is 3 units to the right of Point A; it is 4 units above Point A; midpoint M = (2.5, 4) and lands on half-unit coordinates.
Distance substitution
\Delta x = x_2 - x_1 = 4 - 1 = 3, \Delta y = y_2 - y_1 = 6 - 2 = 4, d = \sqrt{(\Delta x)^2 + (\Delta y)^2} = \sqrt{3^2 + 4^2}, d = \sqrt{9 + 16} = \sqrt{25} = 5
Midpoint substitution
M = \left(\frac{x_1 + x_2}{2},\; \frac{y_1 + y_2}{2}\right), M = \left(\frac{1 + 4}{2},\; \frac{2 + 6}{2}\right), M = \left(\frac{5}{2},\; \frac{8}{2}\right) = (2.5, 4)
Was this useful?
Examples
How It Works
Formula
Variables
- x-coordinate of Point A
- y-coordinate of Point A
- x-coordinate of Point B
- y-coordinate of Point B
- Horizontal change from A to B
- Vertical change from A to B
- Straight-line distance between the two points
- Midpoint of the segment
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
01What 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.
02How 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.
03Can 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.
04What 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.
05Does 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.