Midpoint calculator

Enter the two endpoints of a segment to get its midpoint. Leave z empty for a 2D result.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter x1, y1, z1 (optional), x2, y2 and z2 (optional).
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

M = ((x1 + x2) / 2, (y1 + y2) / 2), adding (z1 + z2) / 2 in 3D. Each coordinate is the average of the endpoints.

Example

Inputs: x1 = -1, y1 = 5, x2 = 3, y2 = -7. Result: Midpoint M: (1, -1); Segment length: 12.64911064.

Limits and caveats

  • For Cartesian coordinates only, not the halfway point between two map locations.
  • Coordinates are rounded to 10 significant digits.

Questions about this tool

How do I find the other endpoint from the midpoint?

Missing endpoint = 2M minus the known endpoint, per coordinate. Midpoint (2, 3) with endpoint (0, 0) gives (4, 6).

Is the midpoint always on the segment?

Yes, and it is the same distance from both ends: half the segment length.

Can I use negative and decimal values?

Yes, any real coordinates work.