Physics

Projectile Motion Calculator

Range, maximum height and time of flight for any launch speed, angle and gravity — with a range-vs-angle plot.

Real Larzscript running in your browser74 automated checksOpen source · MITNo sign-up · your inputs never leave your device

Launch a projectile

Range
—
Max height
—
Time of flight
—

Range against launch angle

At your speed and gravity. The dot is your angle.

Show the Larzscript program that just ran
Run a calculation to see the exact program.

This is the real program the page sent to the Larzscript interpreter (compiled to WebAssembly) in your browser. The library it imports is the same code the automated tests check.

The equations

range = v0² sin(2θ) / g    height = (v0 sinθ)² / (2g)    time = 2 v0 sinθ / g

These assume flat, level ground, launch height zero, and no air resistance — the standard idealized model taught in introductory mechanics.

Worked example, computed above

20 m/s at 45° on Earth: range 40.789 m, max height 10.197 m, time of flight 2.8842 s.

What is verified

The range formula is checked for the classic 45°-optimum property, for the 30°/60° range symmetry (sin(2θ) = sin(2(90°−θ))), and by round-tripping the angle-for-a-given-range solver back through the range formula, in tests/test_mechanics.lz.

Frequently asked questions

What is the range, and does angle matter?

With no air resistance, range = v0² sin(2θ) / g. A 20 m/s launch at 45° on Earth travels 40.789 m; the same speed at 20° only reaches 26.218 m — 45° is always the farthest for a given launch speed on flat ground.

Why is 45 degrees the best angle?

sin(2θ) is largest (equal to 1) when 2θ = 90°, i.e. θ = 45°. Above or below that angle, sin(2θ) shrinks, so both the launch and landing height being equal is what makes 45° optimal — a cliff or a hill changes the answer.

How is time of flight found?

From the vertical motion alone: t = 2 v0 sin(θ) / g. It depends only on the vertical launch speed and gravity, not on the horizontal speed at all.

What if I'm not on Earth?

Lower gravity gives more hang time and more range: the same 20 m/s at 45° that goes 40.789 m on Earth (g = 9.80665 m/s²) goes 246.91 m on the Moon (g = 1.62 m/s²) — about 6.05× farther.

What does this ignore?

Air resistance, spin (Magnus effect), and the curvature of the Earth — all real for a thrown ball or a long-range projectile, but the textbook v0/angle/g model is exact for the idealized case and a good first approximation otherwise.

Every number on this page is computed by the open-source larzscript-physics library (mechanics, physmath), written in Larzscript, and checked against independent references in its test suite. How it is verified →