The maximum height, y_{max}, can be found from the equation:

v_{y} ^{2} = v_{oy}^{2} + 2 a_{y} (y - y_{o})

y_{o} = 0, and, when the projectile is at the maximum height, v_{y} = 0.

Solving the equation for y_{max} gives:

y_{max} = - v_{oy}^{2} /(2 a_{y})

Plugging in v_{oy} = v_{o} sin(q) and a_{y} = -g, gives:

y_{max} = v_{o}^{2}sin^{2}(q) /(2 g)

where g = 9.8 m/s^{2}

Note that the maximum height is determined solely by the initial velocity in the y direction and the acceleration due to gravity. It's not affected by what's happening in the x direction.