Baseball Trajectory: Will It Clear the Fence?

April 12, 2026

Problem

A baseball is hit at 40 m/s at 35°. Will it clear a 3-meter fence 100 meters away?

Explanation

A baseball is launched at speed v0v_0 and angle θ\theta from ground level. Will it clear a fence of height hfh_f at horizontal distance dd? This is the classic "home run" question — and it's solved in two short steps using the trajectory equation.

The Physics

Eliminating time from the parametric equations gives the trajectory equation — height as a function of horizontal position:

y(x)=xtanθgx22v02cos2θy(x) = x\tan\theta - \dfrac{g\,x^{2}}{2 v_0^{2}\cos^{2}\theta}

To check whether the ball clears the fence, simply evaluate y(d)y(d) and compare to hfh_f:

  • If y(d)>hfy(d) > h_fHOME RUN
  • If y(d)<hfy(d) < h_f → the fence stops it ✗

Step-by-Step Solution

Given:

  • Launch velocity: v0=40  m/sv_0 = 40\;\text{m/s}
  • Launch angle: θ=35°\theta = 35°
  • Fence distance: d=100  md = 100\;\text{m}
  • Fence height: hf=3  mh_f = 3\;\text{m}
  • Gravity: g=9.81  m/s2g = 9.81\;\text{m/s}^{2}

Find: Does the baseball clear the fence?


Step 1 — Decompose the launch velocity.

v0x=40cos35°=40×0.819232.77  m/sv_{0x} = 40\cos 35° = 40 \times 0.8192 \approx 32.77\;\text{m/s}

v0y=40sin35°=40×0.573622.94  m/sv_{0y} = 40\sin 35° = 40 \times 0.5736 \approx 22.94\;\text{m/s}

Step 2 — Find the time at which the ball reaches the fence.

The horizontal velocity is constant, so:

td=dv0x=10032.773.052  st_d = \dfrac{d}{v_{0x}} = \dfrac{100}{32.77} \approx 3.052\;\text{s}

Step 3 — Verify the ball is still in the air at tdt_d.

Total flight time:

T=2v0yg=2×22.949.814.677  sT = \dfrac{2 v_{0y}}{g} = \dfrac{2 \times 22.94}{9.81} \approx 4.677\;\text{s}

Since td=3.052  s<T=4.677  st_d = 3.052\;\text{s} < T = 4.677\;\text{s}, the ball is indeed still flying when it reaches the fence's xx-coordinate. ✓

Step 4 — Find the ball's height at the fence.

Plug tdt_d into y(t)=v0yt12gt2y(t) = v_{0y}\,t - \tfrac{1}{2}\,g\,t^{2}:

y(td)=(22.94)(3.052)12(9.81)(3.052)2y(t_d) = (22.94)(3.052) - \tfrac{1}{2}(9.81)(3.052)^{2}

=70.0112(9.81)(9.314)= 70.01 - \tfrac{1}{2}(9.81)(9.314)

=70.0145.6924.32  m= 70.01 - 45.69 \approx 24.32\;\text{m}

Step 5 — Compare to the fence height.

Δ=y(td)hf=24.323.0021.32  m\Delta = y(t_d) - h_f = 24.32 - 3.00 \approx 21.32\;\text{m}

The ball is 21.3 m above the top of the fence as it crosses — that's like clearing a fence with a building's worth of room to spare. 💥

Step 6 — (Bonus) How much margin do we have? Find the minimum speed.

Setting y(d)=hfy(d) = h_f and solving for the minimum v0v_0 at the same θ\theta:

hf=dtanθgd22vmin2cos2θh_f = d\tan\theta - \dfrac{g\,d^{2}}{2 v_{\min}^{2}\cos^{2}\theta}

gd22vmin2cos2θ=dtanθhf\dfrac{g\,d^{2}}{2 v_{\min}^{2}\cos^{2}\theta} = d\tan\theta - h_f

vmin2=gd22cos2θ(dtanθhf)v_{\min}^{2} = \dfrac{g\,d^{2}}{2\cos^{2}\theta\,(d\tan\theta - h_f)}

vmin2=(9.81)(10000)2(0.8192)2(100×0.70023)=981002×0.6710×67.02=9810089.941090.7v_{\min}^{2} = \dfrac{(9.81)(10000)}{2(0.8192)^{2}(100 \times 0.7002 - 3)} = \dfrac{98100}{2 \times 0.6710 \times 67.02} = \dfrac{98100}{89.94} \approx 1090.7

vmin33.03  m/sv_{\min} \approx 33.03\;\text{m/s}

So you'd need at least 33 m/s at this angle to clear the fence — and we have a comfortable 7 m/s of margin.


Answer: HOME RUN! ✓ At v0=40  m/sv_0 = 40\;\text{m/s} and θ=35°\theta = 35°, the baseball is at 24.32  m\approx 24.32\;\text{m} above the ground when it reaches the 100 m mark — a margin of 21.3 m above the 3 m fence. The minimum speed needed to clear this fence at this angle is about 33 m/s, so we have plenty of margin.

Try It

  • Drop the velocity to about 18 m/s — watch the ball just barely fail to clear the fence (the indicator turns red).
  • Raise the fence to 20 m — turns easy home runs into challenging shots.
  • Increase the fence distance to 150 m — the fence is now beyond our range and the ball doesn't even reach it.
  • The HUD shows the Δ at fence in real time.

Interactive Visualization

Parameters

40.00
35.00
100.00
3.00
Your turn

Got your own math or physics problem?

Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.

Sign Up Free to Try It30 free visualizations every day
Baseball Trajectory: Will It Clear the Fence? | MathSpin