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 lag behind on the period-vs-amplitude curve. It all runs on your device.

You are in the Physics lab.

Drag the pendulum to set its start angle
Swing angle—
Elapsed0.0 s
Period (measured)—
Ideal T = 2π√(L/g)2.01 s
Measured vs ideal—
Period stays near the ideal T0 for small swings, then climbs as the amplitude grows — the dot marks your release angle.
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.

Reading the simulation

What the arc, the trail and the two period readouts are telling you.

1

The arc, the trail and the equilibrium line

The dashed line straight down from the pivot is equilibrium — where the bob would hang at rest. The amber wedge is the swing angle measured from that line and labelled in degrees, and the two faint blue guides mark the release angle the bob turns around at each end. The glowing trail is the path the bob has just traced, so you can watch it retrace the same arc every swing.

2

How the period is measured

A full period is the time for one complete there-and-back swing. The engine watches for turning points — the instants the bob stops and reverses, where its angular velocity flips sign — and times the gap between them. Two successive turns are half a period apart, so the measured period is twice that gap, read straight off the motion rather than from any formula.

3

Why wide swings run slow

The ideal T = 2π√(L/g) assumes the restoring pull grows in step with the angle, true only while sin θ ≈ θ. Widen the swing and sin θ falls below θ, so the pull is a touch weaker and each swing takes longer: the period climbs above the ideal by roughly T ≈ T0(1 + θ²/16). The Measured vs ideal stat and the period-vs-amplitude curve both show that gap opening as you raise the amplitude.

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 mass of the bob does not change the period: 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.

Classroom activity

A ready-to-assign lab using the simulation above. Free to use — nothing to install or sign up for, and no student data leaves the browser.

High school, College10–20 minInteractive simulation

Learning objectives

  • Determine what the period of a pendulum depends on.
  • Apply the small-angle period formula.
  • Recognize the independence of period from mass and amplitude (small angles).

Variables to change

  • Length
  • Gravity
  • Initial angle
  • Mass

Procedure

  1. Time the period at a fixed length and small angle.
  2. Double the length and time the period again.
  3. Change the mass (same length, small angle) and time the period.
  4. Increase the starting angle to a large value and note any change.

Observations

Record the period for each length, mass, and starting angle.

Questions

  1. What happened to the period when you doubled the length?
  2. Did changing the mass change the period?
  3. Write the small-angle period formula.
  4. For small swings, does amplitude affect the period?
  5. What happens to the period at large starting angles?

Explanation

A simple pendulum’s period T = 2π√(L/g) depends on length and gravity, not mass, and is nearly independent of amplitude for small swings. At large angles the small-angle approximation fails and the period lengthens.

Answer key (for instructors)
  • 1. It increased by a factor of √2, because T ∝ √L.
  • 2. No — for a simple pendulum the period is independent of mass.
  • 3. T = 2π·√(L/g).
  • 4. Almost not at all; the small-angle approximation makes the period independent of amplitude.
  • 5. The period grows slightly longer than the small-angle formula predicts, because the approximation breaks down.

Educators: link or embed this simulation freely in your LMS or course guide.

Add This Simple Pendulum Simulator to Your Website

Put the Simple Pendulum Simulator on your own page — free, no sign-up, no watermark. It runs entirely in your visitors' browsers. Copy the snippet and paste it into your page's HTML.

The credit line under the widget links back to LK Forge — please keep it so others can find it too.