How this projectile motion calculator works
Give it a launch speed, an angle and a height, and it traces the whole flight: how far it goes, how high it peaks, how long it stays up, how fast it lands and at what angle. It also works out the best angle for your particular launch height, which is where most projectile calculators stop short and where the interesting physics is.
Every number on the page, including the optimum and the comparison table, comes from the same flight function that produces the headline, so nothing in the result can disagree with anything else in it.
The formula
time of flight = (vy + √(vy² + 2gh)) ÷ g
range = vx × time
peak height = h + vy² ÷ 2g
best angle = arcsin(1 ÷ √(2 + 2gh ÷ v²))
The trick that makes all of this work is in the first line: a projectile is two independent motions happening at once. Horizontally it moves at a constant speed forever, because nothing acts on it sideways. Vertically it is in free fall the whole time, rising and then dropping. Gravity has no opinion about the horizontal motion and the horizontal motion has no effect on the fall, so the two can be solved separately and multiplied together at the end. That last line, the best angle, reduces to exactly 45 degrees when the launch height h is zero.
Worked example
A shot put: 14 m/s released from 2 m up. At the textbook 45 degrees it travels 21.82 m, peaking at 7.00 m and staying up 2.20 seconds.
But 45 degrees is not the best angle here. From 2 m up, the optimum is 42.39 degrees, and it reaches 21.90 m. The gain is about 8 centimetres, which sounds trivial until you notice that Olympic shot put finals are routinely decided by less than that.
And the flight is the same in the other direction. Launch from ground level instead and 45 degrees becomes exactly right, the range becomes v2/g = 19.99 m, and the neat symmetry appears where 30 and 60 degrees give identical distances. Everything tidy about projectile motion is a ground-level special case.
Why 45 degrees is usually the wrong answer
The 45 degree rule is genuinely correct, for a projectile launched from and landing at the same height. Almost nothing is. A shot leaves the hand at about 2 m, a javelin at about 1.8 m, a basketball at 2.2 m, a golf ball from a tee, a thrown ball from shoulder height. In every one of those the optimum is below 45 degrees, and the taller the launch the lower it goes.
The reason is a trade the height changes. Raising the angle buys more hang time and costs horizontal speed. From ground level those balance exactly at 45. From a height you already have extra hang time for free, because the projectile has further to fall than it climbed, so the extra time bought by a steeper angle is worth less and the horizontal speed you paid for it is worth more. The balance point moves down. Push it further, launching very fast from very high, and the optimum keeps falling toward the horizontal.
The same height ruins the other tidy fact people remember, that an angle and its complement give the same range. That is true from the ground and false from anywhere else, as the table above shows for any non-zero launch height. Both of the memorable results about projectiles are special cases of a formula that is not itself memorable, which is a reasonable argument for using a calculator rather than a rule of thumb.
What air does to all of this
This model is exact in a vacuum and optimistic everywhere else, so it is worth being clear about the size of the error rather than burying it in a footnote. A well-struck baseball travels roughly half as far as this page predicts. Drag rises with the square of speed, so the faster the projectile the worse the vacuum model does, and light objects suffer most because they carry less momentum per unit of frontal area.
Some projectiles are not merely slowed but genuinely redirected. A golf ball's backspin generates lift, which keeps it up longer than gravity alone allows and makes its optimum launch angle a matter of club design rather than of this formula. A spinning football curves. An arrow flexes. None of that is in here, and no simple closed form captures it: real ballistics uses numerical integration with measured drag coefficients.
What the vacuum model is genuinely good for is the shape of the problem: that horizontal and vertical are independent, that the optimum falls as launch height rises, that range grows with the square of speed while height also grows with the square of speed. Those relationships survive air resistance even when the numbers do not, and they are the part worth carrying away.