Simple Pendulum

A single bob swinging from a fixed pivot — the cleanest oscillation in physics and the calm cousin of our chaotic double pendulum. Release it and watch it trace the same arc back and forth, its swing glowing as a trail behind the bob. Change the length, gravity and starting angle and compare the measured period against the ideal T = 2π√(L/g) — then push it to a wide swing and watch that formula start to lag. It all runs on your device.

You are in the Physics lab.

Drag the pendulum to set its start angle
Elapsed0.0 s
Period (measured)
Ideal period T2.01 s
Length and gravity set the beat — never the mass. A simple pendulum keeps time by T = 2π√(L/g), and the bob's mass is nowhere in that formula: a heavy bob and a light one of the same length swing in step. Shorten the string or turn up gravity and the swing quickens. The one thing that does creep in is amplitude — push the pendulum to a wide angle and the measured period climbs above the ideal, because the small-angle approximation behind the formula quietly breaks down.

How It Works

A restoring pull toward the bottom, integrated step by step, tracing an arc as it swings.

1

The restoring force

One angle describes the state — how far the rod is from straight down. Gravity supplies a restoring pull proportional to sin θ, always toward the bottom, giving the angular acceleration −(g/L)·sin θ. Because the pull grows with the angle, the bob overshoots the bottom, is pulled back, and swings forever in the absence of friction.

2

RK4 integration

The simulator advances the state with fourth-order Runge–Kutta at a small fixed time step, taking several substeps per frame. Keeping the exact sin θ term — rather than the small-angle shortcut — means the swing stays faithful even at wide angles, and the bob's path glows behind it as a trail.

3

Measured versus ideal

The readout times a full swing from the turning points and shows it beside the ideal period T = 2π√(L/g). For small swings the two agree. Widen the angle and the measured period pulls ahead of the ideal — the small-angle approximation breaking down before your eyes, the point where "simple" harmonic motion stops being simple.

What is a simple pendulum?
A simple pendulum is a single mass, called the bob, hanging from a fixed pivot on a light string or rod, free to swing back and forth under gravity. It has one degree of freedom — the angle from vertical — and gravity always pulls it back toward the bottom, so it oscillates. This simulator advances the exact equation of motion with fourth-order Runge–Kutta, so it stays faithful even at wide angles where the usual small-angle formula starts to break down.
What is the period of a simple pendulum?
For small swings the period is T = 2π√(L/g), where L is the length and g is gravity. Notice the mass does not appear: a heavy bob and a light bob of the same length swing at the same rate. The amplitude does not appear either — for small angles the pendulum is isochronous. As the swing gets wider, though, the real period grows slowly above this ideal value, which you can watch happen here by comparing the measured period with the ideal one.
Does the mass of the bob change the period?
No. The period of a simple pendulum depends only on its length and the strength of gravity, not on the mass of the bob. This is because gravity accelerates all masses equally, so the heavier bob feels a proportionally larger restoring force and the two effects cancel. Change the length or the gravity in this simulator and the period shifts; the bob's mass has no effect at all.
Why does a wide swing take longer than the formula predicts?
The formula T = 2π√(L/g) assumes the restoring force grows in proportion to the angle, which is only true for small angles where sin θ ≈ θ. At wide angles sin θ falls below θ, so the restoring pull is weaker than the ideal spring-like law assumes, and the pendulum takes a little longer to complete each swing. The effect is small for modest angles but becomes clearly visible past about 30–40°, which is where 'simple' harmonic motion stops being simple.

Teaching or blogging about pendulums? You can embed this simulator on your own site free — one line of code, no sign-up.