Subtract the midpoint's x-coordinate from the endpoint's x-coordinate, and then square the resulting difference. For an example, let the midpoint be (1, 3) and the endpoint be (5, 6). Subtracting 1 from 5, or 5 - 1, results in 4, and the square of 4 is 16.
Subtract the midpoint's y-coordinate from the same endpoint's y-coordinate, and then square the resulting difference. With this example, subtracting 3 from 6, or 6 - 3, results in 3, and the square of 3 is 9.
Sum the two squares, and then find the sum's square root for the distance between the midpoint and endpoint. In this example, 16 added to 9 equals 25, and the square root of 25 is 5.
Multiply the distance by 2 to determine the length of the line segment. Concluding this example, 5 multiplied by 2 equals 10 --- the length of the line segment is 10 units.