Simple Pendulum Simulator
Interactive pendulum with adjustable length, gravity, damping and starting angle. See where the small-angle approximation stops matching real motion.
Simulator
Drag the bob to set the starting angle, or nudge it with the left and right arrow keys. Space plays and pauses.
- Exact period
- 2.041 s
- Small-angle T T = 2π√(L/g), valid only for small amplitudes.
- 2.006 s
- Approximation error How far the small-angle formula falls short of the exact period.
- 1.71%
- Current angle
- 30 °
- Exact (nonlinear)
- Small-angle approximation
Citing this tool
Last updated . Add the date you accessed it as well, which a citation of a page that can change asks for. If a specific result matters, cite the permalink from the tool’s share row instead of this page: it reproduces the exact parameters.
The equation
Huygens, Horologium Oscillatorium (1673)
Why the period barely depends on amplitude
The restoring torque on a pendulum is proportional to
sin θ, not to θ. That makes the equation of
motion nonlinear and, strictly speaking, unsolvable in elementary
functions. The standard move is to assume sin θ ≈ θ, which
is accurate to better than 1% below about 14°, and that assumption is what
produces the familiar T = 2π√(L/g). The period it predicts
holds up better than the sine does, staying within 1% of the exact value
up to about 23°.
Notice what is absent from that expression: mass and amplitude. Mass cancels because it appears in both the restoring force and the inertia. Amplitude drops out only because of the approximation, which is why this simulator integrates the full nonlinear equation and reports the exact period alongside it.
How far off is the approximation?
The exact period involves a complete elliptic integral of the first kind. Evaluated numerically, the small-angle formula falls short of the true period by this share of it, which is what the Approximation error readout shows:
- about 0.19% at 10°
- about 1.7% at 30°
- about 6.8% at 60°
- about 15.3% at 90°
- about 59% at 170°, where the true period is 2.4 times the small-angle value. The shortfall approaches 100% towards 180°, because the true period grows without limit there.
The comparison plot makes this concrete. At 10° the exact curve and the dashed cosine sit on top of each other. Drag the start angle to 120° and they separate within a single swing, with the true motion visibly lagging.
Reading the shape of the motion
At large amplitude the exact curve stops looking like a sine wave. The bob lingers near the extremes, where the restoring torque falls furthest below the small-angle model’s, and whips through the bottom of the swing. The trace flattens at the peaks and steepens at the zero crossings.
Add damping and the amplitude decays exponentially while the period stays almost unchanged. That separation of amplitude decay from period is characteristic of light damping, and it is why a pendulum clock keeps reasonable time even as its swing shrinks.
Measuring g with a pendulum
Rearranged, g = 4π²L / T². This is a classic lab exercise, and
the two mistakes that dominate the error budget are both visible here.
Timing a single swing puts almost all your uncertainty in the stopwatch, so
time 20 or more oscillations and divide. And releasing from a large angle
biases the period upward, which biases g downward. Release
from under 10° and the period comes out less than 0.2% long. Because
g goes as one over the period squared, that leaves it less
than 0.4% low.
Model and assumptions
- Method
- Runge-Kutta 4th order
- Fixed step
- 0.002 s
- Repeatability
- Deterministic. The same link gives the same numbers on any machine.
What it assumes
- The full nonlinear equation is integrated, not the small-angle approximation, which is the entire point of the tool.
- The exact period is computed independently through the arithmetic-geometric mean, so the approximate and exact periods can be compared rather than asserted.
- The bob is a point mass on a massless rigid rod, and damping is linear in angular velocity.
Where it stops holding. A real pendulum has a rod with mass and moment of inertia, which shifts the period slightly at any amplitude.
Numerical accuracy
- Estimated error
- 1.8e-10 rad in the angle, about 3.4e-10 of the largest value reached
- How that was obtained
- Running the same problem again at half the step changed the answer by at most 1.7e-10 rad over 10 s, about five swings. Richardson extrapolation of that difference gives the figure above.
- Observed order
- 4.00, measured from a second halving rather than assumed
- Conditions
- 1 m rod, 30 degree release, no damping, the shipped defaults
Common questions
When does the small-angle approximation stop working?
The approximation T = 2π√(L/g) assumes sin θ ≈ θ. At 10 degrees it underestimates the true period by about 0.19 percent, at 30 degrees by about 1.7 percent, and at 90 degrees by about 15.3 percent. Run the simulator at large amplitude and the exact and approximate periods visibly diverge.
Does the mass of the bob change the period?
No. For an ideal simple pendulum the period depends only on length and gravitational acceleration. Mass cancels because both the restoring force and the inertia scale with it. Mass does affect how quickly air resistance damps the swing in practice.