Two points on a plane define a line segment. Enter coordinates (x1, y1) and (x2, y2) to get the Euclidean distance, midpoint coordinates and the full formula shown step by step.
Coordinate Calculator - Distance Between Points & Midpoint
Two points on a plane define a line segment. Enter coordinates (x1, y1) and (x2, y2) to get the Euclidean distance, midpoint coordinates and the full formula shown step by step.
Parameters
Enter data for calculations
💡 Fill in all required fields to unlock the calculate button
Distance, midpoint, formula - one click
Give the calculator four numbers - x and y for each of two points - and it returns three results at once: the straight-line distance between them, the exact midpoint of the segment they define, and the full formula with every substitution visible so you can follow the arithmetic.
The distance formula explained
The Euclidean distance between points A(x1, y1) and B(x2, y2) comes directly from the Pythagorean theorem. Draw a right triangle with the horizontal leg (x2 - x1) and the vertical leg (y2 - y1). The hypotenuse is the distance:
The midpoint S divides the segment AB into two equal halves. Its coordinates are the arithmetic means of the corresponding coordinates of A and B:
Reference table - common coordinate pairs
| Point A | Point B | Distance | Midpoint |
|---|---|---|---|
| (0, 0) | (3, 4) | 5.0000 | (1.50, 2.00) |
| (1, 2) | (4, 6) | 5.0000 | (2.50, 4.00) |
| (-3, -2) | (5, 4) | 10.0000 | (1.00, 1.00) |
| (0, 0) | (1, 1) | 1.4142 | (0.50, 0.50) |
| (2, 7) | (10, 1) | 10.0000 | (6.00, 4.00) |
| (0.5, 1.5) | (3.5, 5.5) | 5.0000 | (2.00, 3.50) |
Practical examples
UI/UX designers use this to check spacing
For short distances, planar approximation is adequate
2D collision detection relies on this formula
Land surveyors convert GPS to local grids for this calculation
Negative coordinates work exactly the same way
Joint-space vs Cartesian-space planning both use distance
Midpoint - splitting a segment in half
The midpoint formula averages each coordinate independently. This works because the midpoint is equidistant from both endpoints along each axis. You can verify: the distance from A to S always equals the distance from S to B.
| Property | Formula | Notes |
|---|---|---|
| Distance AB | d = sqrt((x2-x1)^2 + (y2-y1)^2) | Always non-negative, zero only if A = B |
| Midpoint S | S = ((x1+x2)/2, (y1+y2)/2) | Divides AB in ratio 1:1 |
| Slope of AB | m = (y2-y1) / (x2-x1) | Undefined when x1 = x2 (vertical line) |
| Section point (ratio m:n) | P = ((m*x2 + n*x1)/(m+n), (m*y2 + n*y1)/(m+n)) | Midpoint is the special case m = n = 1 |
FAQ - Frequently Asked Questions
Related tools
Pythagorean Theorem Calculator
The distance formula is the Pythagorean theorem applied to coordinate geometry - Open calculator
Scale Calculator
Convert coordinates measured on a scaled drawing to real-world dimensions - Open calculator
Area Calculator
Once you know the distances between vertices, calculate the area of any shape - Open calculator
Powers & Roots Calculator
The square root at the core of the distance formula - compute any root or power - Open calculator
Absolute Value Calculator
Distance along a single axis is the absolute value of the difference between coordinates - Open calculator