Calculate initial velocity to reach height Y I am working on a program that shoots a projectile straight up into the air. I need to be able to calculate the initial velocity required to reach height Y. Assume there is a gravitational constant of -9.8m/s and we are dealing with real time. What formula can I use to achieve this? Please let me know if more info is needed for this problem. 
 A: The initial velocity should be set to:
$$ v_0 = \sqrt{2 g Y}, $$ or
$$ v_0 = \sqrt{2*9.8*Y}, $$ where $Y$ is provided in units of meters and $v_0$ is in meters/second.
Cheers,
Paul Safier
A: You have received at least two good answers, at least one of which explains itself in terms of energy conservation.  Rather than repeating the answer, here are some other ways to think about why it is the correct answer.
It is possible to work this out purely in terms of acceleration, velocity, and position.  The motion of your projectile from the launch point to height $Y$ is the same as the motion by which it falls from height $Y$ to the launch point, but exactly in reverse.  So the question is, if you drop a projectile (initially at rest) from height $Y$, how fast is it traveling when it reaches height zero?  That's how fast you have to shoot the projectile upward to reach height $Y$ above your starting point.
Or you can look at it like this: Suppose it takes time $t$ for your projectile to reach the top of its trajectory at height $Y$.  Since the acceleration is $-9.8 \, \mbox{m}/\mbox{s}^2$, and the projectile ended at velocity $0$, it must have started at velocity $v = 9.8 t \, \mbox{m}/\mbox{s}$.  During the same period of time, the projectile's mean velocity (averaged over time) was $4.9 t \, \mbox{m}/\mbox{s}$ (half its initial velocity), so you traveled $4.9 t^2 \, \mbox{m}$.  Therefore, $Y = 4.9t^2$.  Solve for $t$ as a function of $Y$, and plug this into the formula above that gave $v$ as a function of $t$.  Now you have $v$ as a function of $Y$.
A: At the top, the kinetic energy should be zero, and at the bottom the potential energy should be zero, and since the total energy should stay constant, $K_{bottom} = U_{top}$
$K = \frac{mv^2}{2}$ and
$U = mgY$
Since both contain mass, we can factor that out, getting: $\frac{v^2}{2} = gY$
Rearranging, we get: $v = \sqrt{2gY}$, with v being your initial vertical velocity. 
Edit: Dangit, late. The other answer wasn't loading. 
