What is the Trajectory Calculator?
This calculator models the flight path of a projectile launched at a given speed and angle, ignoring air resistance. It returns the horizontal range, the maximum height reached, the total time of flight, and the velocity components. The underlying path is described by the classic parabola \(y = x\tan\theta - \dfrac{\text{g}\,x^2}{2v^2\cos^2\theta}\), where x is horizontal distance and y is height above the launch line.
How to use it
Enter the initial velocity (the launch speed in metres per second), the launch angle measured from the horizontal in degrees, and optionally the initial launch height above the ground. The gravitational acceleration defaults to 9.81 m/s² (Earth) but you can change it for other planets or for cleaner textbook values like 10. Press calculate to see the full set of motion results.
The formula explained
The horizontal velocity is \(v_x = v\cos\theta\) and stays constant. The vertical velocity \(v_y = v\sin\theta\) decreases under gravity. Solving the vertical equation \(h + v_y t - \tfrac{1}{2}\text{g}t^2 = 0\) gives the time of flight, and multiplying by \(v_x\) gives the range. The peak height is \(h + \dfrac{v_y^2}{2\text{g}}\), reached at time \(\dfrac{v_y}{\text{g}}\).
$$\text{Range} = v\cos\theta \cdot \dfrac{v\sin\theta + \sqrt{(v\sin\theta)^2 + 2\,\text{g}\,\text{h}}}{\text{g}}$$ $$\begin{gathered} R = v_x \cdot t_f \\[1.5em] \text{where}\quad \left\{ \begin{aligned} v_x &= \text{v}\cos\!\left(\text{angle}\right) \\ v_y &= \text{v}\sin\!\left(\text{angle}\right) \\ t_f &= \dfrac{v_y + \sqrt{v_y^{2} + 2\,\text{g}\,\text{h}}}{\text{g}} \end{aligned} \right. \end{gathered}$$ $$H_{max} = \text{h} + \dfrac{\left(\text{v}\sin\!\left(\text{angle}\right)\right)^{2}}{2\,\text{g}}$$ $$t_{apex} = \dfrac{\text{v}\sin\!\left(\text{angle}\right)}{\text{g}}$$
Worked example
Launch at \(v = 20\ \text{m/s}\), \(\theta = 45°\), \(h = 0\), \(\text{g} = 9.81\). Then \(v_y = 20\cdot\sin 45° \approx 14.142\), time of flight \(= \dfrac{2\cdot 14.142}{9.81} \approx 2.883\ \text{s}\), range \(= 14.142 \times 2.883 \approx 40.77\ \text{m}\), and max height \(= \dfrac{14.142^2}{2\cdot 9.81} \approx 10.19\ \text{m}\).
FAQ
Which angle gives the longest range? On level ground, 45° maximises range. With a launch height, the optimal angle is slightly less than 45°.
Does this include air resistance? No — this is idealised vacuum projectile motion, accurate for slow, dense objects over short distances.
Can I use it on the Moon? Yes, set gravity to 1.62 m/s² for the Moon or 3.71 for Mars.