Pendulum Period Calculator
Small-angle simple-pendulum period T = 2π√(L/g) for any length and gravity, with a period-vs-length plot.
Simple pendulum period
Period against length
At your gravity. The dot is your length.
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 formula
Valid for small swing angles, a rigid rod or light string, and a bob small enough that its size does not matter (a "simple" pendulum).
Worked example, computed above
A 1 m pendulum on Earth: period 2.0064 s.
What is verified
Length round-trips exactly back out of the period formula, and the 1 m/Earth case is checked against the well-known ~2.0 s "seconds pendulum" figure to 9 significant digits — see tests/test_mechanics.lz.
Frequently asked questions
What is the pendulum period formula?
For small swings, T = 2π√(L/g), independent of mass and (for small angles) independent of amplitude. A 1 m pendulum on Earth has a period of 2.0064 s — close to the historical 'seconds pendulum', which is why early clocks used roughly 1 m pendulums.
What counts as a 'small' angle?
Under about 15-20°, the small-angle approximation (sinθ ≈ θ) keeps this formula accurate to within about 1%; wider swings take measurably longer than this formula predicts, and need an elliptic-integral correction.
Does the pendulum's mass matter?
No — like free fall, a pendulum's period depends only on length and gravity, not on the mass of the bob (as long as air resistance is negligible).
What changes on another planet?
A 1 m pendulum that takes 2.0064 s per swing on Earth takes 4.9365 s on the Moon — weaker gravity means a slower, lazier swing.
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 →