Skip to content

Midpoint Calculator

Find the point halfway between two endpoints, or recover the other endpoint when you know the midpoint. Includes two-dimensional and three-dimensional distance.

Free, no sign-up · Last updated

Find
Dimensions
US defaults ·

Midpoint M

(5, 1)

Endpoint distance AB
10
Half-distance AM = MB
5
Endpoint A(2, -3)
Endpoint B(8, 5)
Midpoint M(5, 1)
x working((2) + (8)) / 2 = 5
y working((-3) + (5)) / 2 = 1

Distance is the straight-line distance between endpoints A and B, in the coordinate unit. Use the same unit and coordinate system for every axis. Coordinates are displayed to twelve significant digits.

Definition

What a midpoint means

The midpoint is the point on a straight line segment that is the same distance from both endpoints. Its coordinates are the averages of the matching endpoint coordinates, so each axis contributes its own halfway value.

Lies on
The straight segment between endpoints
Coordinates come from
Averaging each axis separately
To recover an endpoint
Reflect the known endpoint across the midpoint

Halfway means halfway on every axis

A midpoint divides a straight segment into two equal lengths. You can find it without measuring the segment first: move halfway between the endpoint positions on each axis. Horizontal and vertical movement are handled independently, so the same formula works for steep, shallow, horizontal and vertical segments.

Write points in a consistent order, usually x followed by y, and z last when needed. The midpoint of two points in the plane is another ordered pair. Changing the order of the endpoints does not change the midpoint, because adding the same two numbers in either order gives the same average.

A complete two-dimensional example

Take A = (2, −3) and B = (8, 5). The horizontal coordinate averages to 5 and the vertical coordinate averages to 1, giving M = (5, 1). The endpoint changes are 6 horizontally and 8 vertically. Their straight-line distance is 10 coordinate units.

The two axis changes form the legs of a right triangle. Squaring them, adding, and taking the square root gives the segment length. The path that first travels horizontally and then vertically would be longer; the calculator reports the direct distance, which is the length used in the usual coordinate-geometry midpoint definition.

Recover the point on the other side

Suppose A = (2, −3) and M = (5, 1) are known. From A to M, move three units right and four units up. Repeat that same movement from M to reach B = (8, 5). The full segment distance is 10, while each half is 5.

The algebra is the same movement written coordinate by coordinate. Doubling the midpoint and subtracting the known endpoint finds the reflection of that endpoint through the midpoint. Be sure to enter the actual midpoint in this mode; entering a second endpoint there answers a different question and makes the recovered segment twice as long as intended.

Add a third coordinate for space

In three dimensions, A = (1, 2, 3) and B = (3, 6, 7) give M = (2, 4, 5). The differences are 2, 4 and 4, and the distance is 6. The extra axis changes the distance formula by adding one more squared difference.

This is useful for points in a room, a model or a coordinate drawing where depth matters. Every coordinate must refer to the same origin and axis convention. A plan view that omits height gives a horizontal distance; entering z coordinates gives the full spatial distance instead. Decide which quantity your task requires before choosing two or three dimensions.

Keep units and scale consistent

The coordinates themselves do not carry a unit in this form. If you enter metres on both axes, distances are in metres. Convert feet and inches, or centimetres and metres, into a single unit before entering them. Mixing scales makes the distance meaningless even if each individual average looks plausible.

A useful check is that every midpoint coordinate lies between the corresponding endpoint coordinates. The two half-segment distances should also match. For a recovered endpoint, average it with the original endpoint and compare the result with the supplied midpoint. If the discrepancy is larger than display rounding, check signs, axis order and the selected mode.

Step-by-step example

Find the midpoint, the changes along each axis and the straight-line distance between (2, −3) and (8, 5).

StepResult
Midpoint(5, 1)
Horizontal change6
Vertical change8
Endpoint distance in coordinate units10

Formulas used

Midpoint in two or three dimensions

M = ((xA + xB)/2, (yA + yB)/2)

In 3D, append (zA + zB)/2

M
midpoint
xA
horizontal coordinate of A
xB
horizontal coordinate of B
yA
vertical coordinate of A
yB
vertical coordinate of B
zA
third coordinate of A
zB
third coordinate of B

Example: A = (2, −3), B = (8, 5): M = (5, 1).

Missing endpoint

B = 2M − A

xB = 2xM − xA; yB = 2yM − yA; zB = 2zM − zA

A
known endpoint
B
missing endpoint
M
midpoint
xA
horizontal coordinate of A
xB
horizontal coordinate of B
xM
horizontal coordinate of M
yA
vertical coordinate of A
yB
vertical coordinate of B
yM
vertical coordinate of M
zA
third coordinate of A
zB
third coordinate of B
zM
third coordinate of M

Example: A = (2, −3), M = (5, 1): B = (8, 5).

Straight-line endpoint distance

AB = √((xB − xA)² + (yB − yA)²)

In 3D, add (zB − zA)² under the square root

AB
distance between the two endpoints
xA
horizontal coordinate of A
xB
horizontal coordinate of B
yA
vertical coordinate of A
yB
vertical coordinate of B
zA
third coordinate of A
zB
third coordinate of B

Example: For A = (2, −3), B = (8, 5), AB = √(6² + 8²) = 10. For (1, 2, 3) to (3, 6, 7), AB = 6.

When the answer can mislead

  • Reversing the coordinate order on only one endpoint changes the segment.
  • Rounding the midpoint before recovering an endpoint magnifies the rounding error.
  • A coordinate midpoint in latitude and longitude need not be halfway along the route you travel.

Questions

How do you find the midpoint of two coordinates?

Average the two x coordinates and average the two y coordinates. In three dimensions, also average the z coordinates. Keep each coordinate in its own position; an x value never combines with a y value. The resulting point lies halfway along the straight segment connecting the endpoints.

How do I find a missing endpoint?

Select the missing-endpoint mode, enter the known endpoint A, then enter midpoint M. The tool doubles each midpoint coordinate and subtracts the corresponding coordinate of A. The result is endpoint B. The displayed distance still refers to the full segment from A to B, not only the known half.

Can coordinates be negative or fractional?

Yes. Coordinates can lie on either side of the origin, and there is no requirement for whole numbers. A negative coordinate describes direction along an axis. When adding negative coordinates, keep their signs. Parentheses in the working make it easier to distinguish subtraction from a negative value.

What happens when the endpoints are identical?

The midpoint is that same point and the segment distance is zero. This remains meaningful even though there is no unique direction along a zero-length segment. The missing-endpoint calculation also returns the same point if the known endpoint and the supplied midpoint coincide.

Will this work with latitude and longitude?

Use this formula for Cartesian coordinates in a consistent plane or three-dimensional coordinate system. Latitude and longitude are angular positions on a curved Earth, so their simple average is not generally a geographic midpoint. Routes crossing the date line are a particularly clear example. Convert to a suitable projection for local work or use a geographic method.

How precise is the distance?

The calculation uses standard floating-point numbers and a stable hypotenuse routine. Results are displayed to twelve significant digits. Very large coordinates can lose small offsets before calculation because the input number representation has limited precision. If a derived endpoint or distance exceeds the finite range, the tool asks for smaller coordinates.

Last updated How we check
Embed this calculator
Cite this calculator

Midpoint Calculator. CalculatorLab. https://calculatorlab.site/calculators/midpoint-calculator/. Last updated .