Midpoint Calculator (2D and 3D)
Find the midpoint between two points in 2D or 3D from M = ((x₁+x₂)/2, (y₁+y₂)/2).
Also returns segment length, slope, and section formula generalizations.
The midpoint formula finds the exact center of a line segment defined by two endpoints in a coordinate plane. It is simply the arithmetic mean of each coordinate.
The formula in 2D:
M = ((x₁ + x₂) / 2, (y₁ + y₂) / 2)
The formula in 3D: add the z-coordinate the same way.
M = ((x₁ + x₂) / 2, (y₁ + y₂) / 2, (z₁ + z₂) / 2)
The midpoint divides the segment into two equal parts. Geometrically, it is the balance point. If the segment were a rigid bar and you placed it on a pin at the midpoint, it would stay level.
Worked example: Find the midpoint between A(2, 8) and B(10, 4).
- Average the x-coordinates: (2 + 10) / 2 = 6
- Average the y-coordinates: (8 + 4) / 2 = 6
- M = (6, 6)
The section formula generalizes the midpoint: If a point divides segment AB in ratio m:n (from A to B), its coordinates are:
P = ((m·x₂ + n·x₁) / (m + n), (m·y₂ + n·y₁) / (m + n))
The midpoint is the special case where m = n = 1. Using ratio 2:1 puts the point two-thirds of the way from A to B. This is the formula used to find the centroid of a triangle, which sits at the average of its three vertex coordinates.
Reverse problem, finding a missing endpoint: If you know one endpoint A and the midpoint M, the other endpoint B is the reflection of A across M:
x_B = 2·M_x − x_A y_B = 2·M_y − y_A
For example, if A = (3, 5) and M = (7, 4), then B = (11, 3). This shows up in symmetry problems and in computer graphics when you need to mirror a point through a known center.
The perpendicular bisector property: The perpendicular bisector of a segment AB is the line that passes through M at exactly 90° to AB. Every point on this line is equidistant from A and B. This property is the basis of constructing the circumcenter of a triangle (the intersection of the three perpendicular bisectors of its sides), which is the center of the unique circle passing through all three vertices.
Practical uses:
- Construction: placing a center support, drilling a centered hole, or finding the midpoint of a beam for a load test
- Computer graphics: bisection algorithms, mesh subdivision (Catmull-Clark), and Bezier curve sampling
- Navigation: the halfway point of a journey, useful for fuel stops and watch changes
- Statistics: the median of two values is their midpoint
- Robotics: the midpoint of a tool path between two waypoints
Distance bonus: This calculator also returns the distance between the two points using the Pythagorean theorem: d = √((x₂−x₁)² + (y₂−y₁)² [+ (z₂−z₁)²]). The midpoint and the segment length are the two pieces of information most often needed about a coordinate pair.