About this tool
The midpoint of a line segment is the point exactly halfway between its endpoints. In coordinate geometry it is found by averaging the coordinates, and it is used to bisect segments, find circle centers from a diameter and split a route or a board in half. This calculator works in two or three dimensions, also finds a missing endpoint and gives the distance between the points with the steps.
How it works
Choose whether you want the midpoint of two points or the other endpoint of a segment, and whether the points are on a plane (2D) or in space (3D). Enter the coordinates of point A and of point B, or of point A and the midpoint M.
The midpoint is the average of the endpoints, coordinate by coordinate: , and the same for y and z. Reversing this gives the missing endpoint, . The distance between the endpoints comes from the Pythagorean theorem and is shown exactly, for example , and as a decimal.
Example
For A(−2, 3) and B(6, −1), the midpoint is . The distance is .
If you know A(1, 2) and the midpoint M(4, 6), the other endpoint is .
Assumptions and limits
Coordinates are treated as exact, so decimals and fractions give exact midpoints; very long inputs are limited to 30 digits. Distances use straight lines in flat (Euclidean) space; they are not valid for latitude and longitude on the Earth's surface, which needs a great-circle formula.
Frequently asked questions
What is the midpoint formula?
Average the x-coordinates and the y-coordinates: . In 3D, average the z-coordinates too.
How do you find an endpoint from the midpoint?
Double the midpoint and subtract the known endpoint, coordinate by coordinate: and . Choose the endpoint mode to do this automatically.
How do you find the distance between two points?
Use , which is the Pythagorean theorem applied to the horizontal and vertical differences. In 3D add under the root.
Is the midpoint the same as the average?
Yes, each coordinate of the midpoint is the arithmetic mean of the matching coordinates of the two endpoints. On a number line, the midpoint of 3 and 11 is 7.
Can coordinates be negative or fractions?
Yes. Negative values, decimals and fractions such as 1/3 are all accepted, and the result stays exact: the midpoint of 0 and 1/3 is 1/6.
Link with your values
Add these parameters to this page’s address to open it with the values filled in, for example to share a calculation or to link to it from an AI assistant. The result is calculated in the browser: the page HTML shows an example for the default values, and the tool sets the data-url-params attribute once the link’s values are applied.
| Parameter | Value | If omitted |
|---|---|---|
modeFind | one of: midpoint, endpoint | default midpoint |
dimensionsDimensions | one of: 2, 3 | default 2 |
x1Point A | fraction or decimal: 3/4, 1 1/2 or 0.75 | required |
y1Point A | fraction or decimal: 3/4, 1 1/2 or 0.75 | required |
z1Point A | fraction or decimal: 3/4, 1 1/2 or 0.75; used with dimensions = 3 | required |
x2Point B | fraction or decimal: 3/4, 1 1/2 or 0.75; used with mode = midpoint | required |
y2Point B | fraction or decimal: 3/4, 1 1/2 or 0.75; used with mode = midpoint | required |
z2Point B | fraction or decimal: 3/4, 1 1/2 or 0.75; used with mode = midpoint; used with dimensions = 3 | required |
midpoint_xMidpoint M | fraction or decimal: 3/4, 1 1/2 or 0.75; used with mode = endpoint | required |
midpoint_yMidpoint M | fraction or decimal: 3/4, 1 1/2 or 0.75; used with mode = endpoint | required |
midpoint_zMidpoint M | fraction or decimal: 3/4, 1 1/2 or 0.75; used with mode = endpoint; used with dimensions = 3 | required |
Examples
?x1=-4&y1=2&x2=6&y2=10?x1=1&y1=2&z1=3&x2=5&y2=-6&z2=7.5?x1=-2&y1=3&midpoint_x=2.5&midpoint_y=1
Write decimals with a point. Encode a space as %20, + as %2B, # as %23 and & as %26.
Result elements: [data-result-block="midpoint_calculator"]