Distance Formula and Midpoint Calculator
Distance and midpoint between two points
d = √((x₂ − x₁)² + (y₂ − y₁)²)
First point x₁ · First point y₁ · Second point x₂ · Second point y₂
Join the two labelled points with a straight segment.
d = √((x₂ − x₁)² + (y₂ − y₁)²)
Coordinates are translated and scaled together for display; the midpoint is halfway along the segment, including when the points coincide.
Worked example you can change
Distance = √((x₂ − x₁)² + (y₂ − y₁)²)
- Distance = √((6 − (0))² + (8 − (0))²)
- Distance ≈ 10
- Midpoint x = (0 + (6)) ÷ 2 ≈ 3
- Midpoint y = (0 + (8)) ÷ 2 ≈ 4
Calculator
Enter complete decimal numbers; separate list values with commas or spaces. Decimal answers are shown to 15 significant digits; exact integer results retain all digits.
- Distance
- 10
- Midpoint x
- 3
- Midpoint y
- 4
Formula variants
| Shape or method | Formula | Meaning |
|---|---|---|
| Distance | d = √((x₂ − x₁)² + (y₂ − y₁)²) | Distance is nonnegative, even if either coordinate difference is negative. |
| Midpoint | M = ((x₁ + x₂)/2, (y₁ + y₂)/2) | Average x and y separately to find the point halfway along the segment. |
| Coincident points | d = 0; midpoint = the same point | The formulas remain defined when the two points coincide. |
Questions
What is the distance formula?
Subtract the x coordinates and y coordinates separately, square both differences, add them, and take the square root.
What is the midpoint formula?
Average the two x coordinates for midpoint x, and average the two y coordinates for midpoint y.
Can I use negative coordinates?
Yes. Signed coordinates are supported; the distance stays nonnegative.
Is this geographic distance?
No. It uses a flat two-dimensional coordinate plane rather than latitude, longitude or a route on Earth.
Sources and method
Find the straight-line distance and midpoint between two planar points using the Pythagorean theorem and coordinate averages.
We calculate with 40 significant digits and round only the displayed result. Diagrams are labelled explanations and are not measurement drawings.
More Math formulas
Browse Math calculatorsUpdated