At max height, the final velocity will be 0.
v = u + at
Since the acceleration due to gravity is in the opposite direction,
a = -g
Substituting equation 1 in the above equation,
Where H is the maximum height.
Let the velocity at height h be Vh,