The midpoint of an interval

The midpoint of an interval can be found by finding the half-way point of each of the and values of the 2 points that define the interval.
Does the method always work? What about horizontal or vertical lines? What if some or both of the endpoints are negative, or zero? Can you develop a formula?