In order to find the length of the segment, you'd use the distance formula which is:
Distance = √(x2-x1)^2 + (y2-y1)^2
The midpoint formula is:
For finding x:
=x1+x2/2
For finding y:
= y1+y2/2
I added a picture for reference of the midpoint formula to make it clearer to understand.