UTILS.
Private by default
📍

Midpoint Calculator

Find the midpoint of a 2D or 3D line segment and its length, or back-solve the missing endpoint from a midpoint and one known endpoint.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →

About this tool

The Midpoint Calculator finds the exact center of a line segment from its two endpoints, in either two or three dimensions. It also reports the segment length and can work backwards to recover a missing endpoint when you already know the midpoint. All arithmetic runs live in your browser.

The midpoint is simply the average of the coordinates: M = ((x1 + x2) / 2, (y1 + y2) / 2) in 2D, with a third term (z1 + z2) / 2 added in 3D. The segment length is the straight-line distance between the two points, √((x2 − x1)² + (y2 − y1)²) with the z term in 3D. When you switch to 'Find an endpoint' mode, the tool uses the reverse identity: if M is the midpoint and P is one endpoint, the other endpoint is 2M − P, applied to each coordinate.

The result also shows the per-axis differences (Δx, Δy and Δz), which are handy for slope, direction and vector work. Because it is a pure formula, results are exact for whatever precision you type in — no rounding beyond display formatting.

Frequently asked questions

What is the midpoint formula?
The midpoint of the segment between (x1, y1) and (x2, y2) is ((x1 + x2) / 2, (y1 + y2) / 2) — you average the x-coordinates and average the y-coordinates. In 3D you also average the z-coordinates.
How do I find an endpoint from the midpoint?
If M is the midpoint and P is the endpoint you know, the other endpoint is 2M − P for each coordinate. Switch to 'Find an endpoint' mode, enter the midpoint and the known endpoint, and it solves the rest.
Does it work in 3D?
Yes. Choose 3D and a z field appears for each point. The midpoint, endpoint and length formulas all extend naturally by adding the z term.
Is the segment length the same as distance?
Yes — the length shown is the straight-line (Euclidean) distance between the two endpoints. This tool focuses on the midpoint, but the distance is included for convenience.

More tools