Projectile Motion: Launch Angle to Hit a Target
Calculate the two launch angles that hit a target at (x, y) with a given initial speed — low flat trajectory and high lobbed trajectory.
Inputs
Results
The inverse problem
The inverse projectile-motion problem asks the reverse of the textbook setup: given a target point and an initial speed , find the launch angle that reaches it. The forward problem fixes the angle and computes where the projectile lands; the inverse problem fixes the landing point and computes the required angle. It appears in ballistics, game-AI targeting code, and competitive-sports analysis.
When a solution exists there are usually two of them — a low arc and a high arc. The same target can be reached from below the apex of the trajectory or from above it.
Mechanism
A quadratic in tan θ
Substitute into the height equation, use the identity , and the trajectory equation rearranges into a quadratic in :
The two roots are the two valid launch angles:
- Low angle (the minus root) — a flat, fast trajectory that arrives quickly
- High angle (the plus root) — a lofted, slower trajectory that arrives at the same target by going over the top
The same target is reached by very different trajectories: a flat tennis pass and a lob, or a rifle shot and a mortar shell, illustrate the two roots.
When no solution exists
If the discriminant goes negative, no real launch angle reaches the target — the projectile simply cannot arrive there at this initial speed:
The target is unreachable unless the initial speed is increased or the target is brought closer. At equality, the two solutions merge into one — the boundary case where the target sits on the maximum-range envelope for the given speed.
Time of flight
Once the angle is known, the time to reach the target is:
The low angle reaches the target faster; the high angle takes longer in the air. The simulation slider animates both trajectories in parallel.
Applications
Ballistics and indirect fire
The high-arc solution is what mortars and howitzers exploit: lobbing a shell over intervening terrain to hit a target invisible from the launch position. The low-arc solution is what rifles and direct-fire artillery use. Tactical doctrine — when to choose mortar over cannon — is partly a question of which root is geometrically available.
Game AI targeting
Targeting code for an archer NPC or a turret in a game has this inverse problem at its core. The choice between low and high arc gives different units distinct shot characters: an aggressive AI fires flat and fast, a careful AI lobs over cover. Both options are physically correct.
Sports coaching and tactics
Basketball jump shots, soccer free kicks, and baseball throws to home plate mostly have two physically valid trajectories to the same target. Showing both side by side clarifies the trade-off: the flat throw arrives sooner but is easier to intercept, while the lofted throw is slower but can clear a defender.
Physics problem sets
The inverse problem is a useful vehicle for teaching the quadratic formula in a physically meaningful context. The discriminant has a real-world interpretation (reachability), the merging of roots at the boundary corresponds to the maximum-range envelope, and the relationship between speed and angle becomes immediately tangible. Gradually lowering in the simulator until the two trajectories merge into one reveals the maximum range for that speed.
The vacuum model and its limits
This calculator solves the vacuum model — no air resistance, no spin, no wind. Real-world projectiles deviate, sometimes substantially. Sports analysis or actual artillery work requires drag (air resistance) and, for spinning projectiles, the Magnus force. The vacuum model is the right starting point for understanding the underlying geometry, and a serviceable teaching tool, but it is not the right model for precision engineering.
Frequently Asked Questions (FAQ)
Why are there two solutions for the same target?
Because the equation y = x·tan θ − g·x²/(2v₀²cos²θ) is quadratic in tan θ. For any reachable target there are typically two angles that hit it: a "low" angle (flat, fast trajectory) and a "high" angle (lobbed, slow trajectory). They share the same impact speed but differ in flight time and impact angle.
What does "target out of range" mean?
The given initial velocity is not enough to reach the target. The maximum range for a given v₀ at the target's height is achieved at angle θ = arctan(v₀²/(g·R)) (or 45° for a same-height target). If the target is beyond that range, no real solution exists — increase v₀ or move the target closer.
When does the low- and high-angle solution merge?
When the target sits exactly on the boundary of reachability. At that point the two solutions coincide at one optimum angle, the projectile barely reaches the target, and any small perturbation puts it out of range. This corresponds to the maximum-range trajectory for the given v₀.
Which solution applies in practice?
It depends on the application. The low angle gives a flat, fast shot — used in direct-fire weapons, line-drive baseball throws, and shorter trajectories. The high angle gives a lobbed shot — used in mortars, basketball arc shots, and to clear obstacles. The calculator returns both solutions.
Disclaimer
This is a vacuum model and ignores air resistance, lift, the Magnus effect, and wind. Real projectiles deviate substantially, especially at low velocities. Use this calculator for teaching and first-order estimates; for ballistics or sports analysis, use a model that includes drag and spin.