Midpoint Calculator
You can use this to check your calculations. Form your segment AB by simply dragging A and B, and M will automatically be the midpoint.
Information: Midpoint Calculator