Pendulum simulation with live graphs
A pendulum simulation lets you swing a pendulum on screen and change what a real one won't let you change easily: its length, its starting angle, the strength of gravity and how much friction slows it. In our pendulum simulation, the Pendulum and SHM Simulator, the bob swings in real time while live graphs trace its displacement, velocity and acceleration, energy bars show kinetic and potential energy trading places, and a timer measures each swing. For small swings the period is T = 2π√(L/g): 2.006 s for a 1 m pendulum on Earth.
Pendulum and SHM Simulator
Swing a pendulum and graph its displacement, velocity and acceleration
How to use the pendulum simulation
- Open the Pendulum and SHM Simulator. Under Set up, keep Pendulum or switch to Mass on a spring.
- Set the Length (0.1 to 10 m), Gravity (0.5 to 30 m/s²), Release angle (up to 170° either side) and Mass. You can also drag the bob to where you want to let go.
- Under Damping, set the damping ratio: 0 for none, under 1 for a swing that dies away, 1 for critical damping, above 1 for a slow creep back.
- Under Run, press play. Pause or reset at any time.
- Read the timer, the Measured period, the Small-angle period from the formula, the True period at your angle and how much longer it is, and the period With damping. A chart shows how the true period grows with the release angle.
The period of a pendulum
This is the period of a simple pendulum swinging through a small angle; OpenStax gives the limit as about 15°. The period doesn't depend on the mass, and for small swings hardly at all on the amplitude. Rearranged, L = g(T ÷ 2π)². For a mass m on a spring of spring constant k, the period is T = 2π√(m ÷ k), at any amplitude.
Here x is the length in metres and y is the period in seconds. Four times the length gives twice the period, because the period depends on the square root of the length.
Experiments to try
Experiment 1: does the mass matter?
Keep the length at 1 m and the angle at 10°, and change the mass from 0.1 kg to 10 kg. The measured period stays at 2.010 s. Only the energy bars change, because a heavier bob stores more energy at the same height.
Experiment 2: length and period
Set the release angle to 5° and the length to 0.25 m: the measured period is 1.004 s. Make it 0.994 m and the period is 2.001 s, so the pendulum takes one second to swing each way. Quarter the length and the period halves.
Experiment 3: big swings take longer
The small-angle formula assumes sin θ ≈ θ. The simulator works the real motion out without that shortcut, and shows how far off the formula is. For a 1 m pendulum on Earth:
| Release angle | Small-angle period | True period | Longer by |
|---|---|---|---|
| 5° | 2.006 s | 2.007 s | 0.05% |
| 10° | 2.006 s | 2.010 s | 0.19% |
| 40° | 2.006 s | 2.069 s | 3.1% |
| 90° | 2.006 s | 2.368 s | 18% |
| 160° | 2.006 s | 4.027 s | 101% |
Below about 15° the difference is a fraction of a percent, which is why the formula works for a school experiment. At 160° the swing takes twice as long, because the bob crawls near the top.
Experiment 4: a pendulum on the Moon
Set the gravity to 1.62 m/s² and the length to 2 m. The small-angle period is 2π√(2 ÷ 1.62) = 6.98 s, compared with 2.84 s for the same pendulum on Earth. Weaker gravity pulls the bob back more gently, so each swing takes longer.
Experiment 5: damping
With a 10° swing, set the damping ratio to 0.1. The swing shrinks a little each time, the Lost energy bar grows, and the period stretches slightly, to 2.020 s by the formula T ÷ √(1 − ζ²). At 0.5 the swing dies in a few cycles. At 1, critical damping, it returns to the middle as fast as it can without swinging past, and the readout says there is no swing.
Experiment 6: a mass on a spring
Switch to Mass on a spring. A 1 kg mass on a 20 N/m spring has T = 2π√(1 ÷ 20) = 1.405 s. Make the mass 4 kg and the period doubles to 2.810 s. Unlike the pendulum, a spring's period doesn't change with amplitude.
Reading the graphs
- Displacement is a sine-shaped wave. Its peaks are the release point.
- Velocity is greatest when the displacement is zero, as the bob passes through the middle, and zero at each end of the swing.
- Acceleration is always opposite to the displacement, and greatest at the ends: that is what makes it simple harmonic motion.
- Energy moves from potential at the ends to kinetic in the middle. Without damping the total stays the same; with damping, the lost share grows.
What the simulation doesn't do
- A double pendulum or any chaotic motion. It is a single simple pendulum: a point mass on a light rod or string.
- Driven oscillations and resonance. Once released, nothing pushes it.
- Air resistance as a separate setting. The damping ratio stands in for all the friction and drag.
- The tension in the string. Work it out by hand: at the bottom of the swing, T = mg + mv² ÷ L.
Common mistakes
- Thinking a heavier bob swings faster. The period doesn't depend on the mass.
- Measuring the length to the bottom of the bob. L goes to the centre of the bob.
- Timing one swing. In a real experiment, time 10 swings and divide by 10 to cut the reaction-time error.
- Using big angles with the formula. T = 2π√(L/g) is only accurate for small swings.
- Confusing a swing and a period. One period is a full there-and-back, from one side to the other and back again.
Common questions
What is the formula for the period of a pendulum?
Does the mass of a pendulum affect its period?
Does the angle affect the period of a pendulum?
How long is a pendulum with a period of 2 seconds?
What is damping?
Revision cards
Read the front, say your answer, then flip to check.
Where to go next
- Solve it
Pendulum and SHM Simulator
Swing a pendulum and graph its displacement, velocity and acceleration
Open the tool - Test it
AP Physics 2
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper - Test it
High School Physics
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper