Midpoint Calculator-Between Two Points (2D & 3D)
Find the midpoint between two points in 2D or 3D. Enter coordinates to see the midpoint, distance and a step-by-step calculation.
Midpoint formula
Midpoint formula: M = ((x1 + x2) / 2, (y1 + y2) / 2). Example: the midpoint of (2, 3) and (8, 11) is ((2 + 8) / 2, (3 + 11) / 2) = (5, 7). The endpoints are 10 units apart, so the midpoint is 5 units from each end.
Midpoint formula and example
A midpoint divides a straight line segment into two equal lengths. Find it by averaging each pair of corresponding coordinates. Use the same coordinate system and measurement units for both endpoints.
For A = (2, 3) and B = (8, 11), the midpoint is ((2 + 8) ÷ 2, (3 + 11) ÷ 2) = (5, 7). The pair (5, 7) gives the midpoint’s x- and y-coordinates, not a distance. The endpoints are 10 units apart, and the midpoint is 5 units from either one.
Video example: find the midpoint in 3D
Read another worked example
- Select Load 2D example with negative coordinates to enter A = (−3, 4) and B = (8, −2).
- Average the x-coordinates to get 2.5 and the y-coordinates to get 1. The plot marks M = (2.5, 1), about 6.265 units from either endpoint.
- The 3D example uses (0, 0, 0) and (2, 4, 6). Average the z-coordinates too to get (1, 2, 3).
Check an endpoint using the midpoint
Rearranging the midpoint formula gives x₂ = 2mₓ − x₁ and y₂ = 2mᵧ − y₁. If A is (2, 3) and M is (5, 7), the other endpoint is (10 − 2, 14 − 3) = (8, 11). Enter A and this endpoint above to check that their midpoint is M. This is a coordinate calculation, not a travel or driving-distance calculation.
Finding a midpoint in 3D
Select 3D and enter the z-coordinate of each point. Average the z values in the same way as x and y. For (0, 0, 0) and (2, 4, 6), the midpoint is (1, 2, 3).
Distance uses the square root of the sum of the squared coordinate differences. In 2D, this is √((x₂ − x₁)² + (y₂ − y₁)²). In 3D, add (z₂ − z₁)² inside the square root.
Reference: OpenStax: Distance and Midpoint Formulas.
Common questions
Can a midpoint have negative coordinates?
Yes. Average the signed coordinates as entered. The midpoint of (−6, 2) and (2, −4) is (−2, −1).
What happens if the points are identical?
Their midpoint is that same point, and the distance is zero. Swapping different endpoints also leaves their midpoint unchanged.
Can I find a meeting point between two cities?
This formula is for flat Cartesian coordinates. Averaging latitude and longitude does not reliably give a geographic midpoint or a practical meeting place, especially across the date line.
Questions about a result? See how our calculators are built or report a calculation issue.
How to check your midpoint result
Average matching coordinates: x with x, y with y, and z with z in 3D. Keep each negative sign attached to its number. For A = (−3, 4) and B = (8, −2), the x average is (−3 + 8) ÷ 2 = 2.5 and the y average is (4 − 2) ÷ 2 = 1. The midpoint is therefore (2.5, 1). A fractional answer is valid even when every input is a whole number.
Each midpoint coordinate must lie between the corresponding endpoint coordinates. In this example, 2.5 lies between −3 and 8, and 1 lies between −2 and 4. You can also double each midpoint coordinate and check that it equals the sum of the corresponding endpoint values. These checks help reveal a missed minus sign or a coordinate entered in the wrong field.
Use a common scale for all axes when interpreting the distance. If one measurement is in centimeters and another is in millimeters, convert them first. A zero coordinate is a valid position on an axis; it is not the same as an empty input. For a 3D point on the xy-plane, enter a z-coordinate of zero.