The midpoint formula
The midpoint of two points is the average of their coordinates: M = ((x1+x2)/2, (y1+y2)/2). In 3D, the z-coordinate is averaged the same way.
The midpoint always lies on the line segment connecting the two points, dividing it into two equal halves.
M = ((x1+x2)/2, (y1+y2)/2)
Average each coordinate pair.