Midpoint Calculator (2D & 3D)
Find the exact midpoint $M$ of a line segment connecting two endpoints, $P_1$ and $P_2$. The midpoint is calculated by finding the average of the coordinates for each dimension ($x, y$, and optionally $z$).
Endpoints $P_1(x_1, y_1, z_1)$ and $P_2(x_2, y_2, z_2)$
Point
X-Coordinate
Y-Coordinate
Z-Coordinate (Optional)
P₁
P₂
Results
Midpoint Coordinates (M)
Segment Length (Distance)
Step-by-Step Calculation
The Midpoint Formula (2D and 3D)
The midpoint formula is a direct application of the arithmetic mean. For each dimension, the midpoint coordinate is simply the average of the two endpoints' coordinates.
Midpoint Formula (2 Dimensions)
Given endpoints $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$, the midpoint $M$ is:
Midpoint Formula (3 Dimensions)
For three dimensions, the formula is extended to include the $z$ coordinate:
The calculation principle remains identical: find the average position along each axis.
Related Formula: Distance Between Two Points
While the midpoint finds the location of the center of the segment, the distance formula finds the length of the segment ($D$). The 2D distance formula is:
Frequently Asked Questions (FAQ)
What is the midpoint formula?
Is the midpoint formula just the average?
Can the midpoint formula be used in 3D (three dimensions)?
How do I find a missing endpoint if I know the midpoint?
Formula (LaTeX) + variables + units
','
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}\right)
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \frac{z_1 + z_2}{2}\right)
D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
x_2 = 2 M_x - x_1
$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}\right)$
$M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}, \frac{z_1 + z_2}{2}\right)$
$D = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$
- No variables provided in audit spec.
- NIST — Weights and measures — nist.gov · Accessed 2026-01-19
https://www.nist.gov/pml/weights-and-measures - FTC — Consumer advice — consumer.ftc.gov · Accessed 2026-01-19
https://consumer.ftc.gov/
Last code update: 2026-01-19
- Initial audit spec draft generated from HTML extraction (review required).
- Verify formulas match the calculator engine and convert any text-only formulas to LaTeX.
- Confirm sources are authoritative and relevant to the calculator methodology.