Simple Pendulum Simulation

A free pendulum simulation for class: drag the ball, change length, mass, friction and gravity, and compare the measured period with 2π√(l/g).

  • Physics
  • Grades 9–12
Simple Pendulum Simulation

Free, no sign-up, runs in the browser on a projector, TV or touch screen.

Make a review gameFree games library

This simulation is a pendulum lab for the whole class on one screen. Drag the ball to any angle up to 170°, let go and watch it swing. The motion comes from the real equation of a pendulum, not the small-angle shortcut, so big swings slow down just as they do in a real lab. Change the length, the mass, the friction and even the planet, and the panel compares three periods side by side: the one the simulation measures, the textbook formula 2π√(l/g), and the exact value for the amplitude you chose.

How to use it

  • Swing: drag the ball (or tap anywhere inside its circle) to pull it aside, then let go. A quick flick gives it a push. The left and right arrow keys, or the Start angle slider, set the angle exactly.
  • Change it: Length goes from 10 cm to 2 m, and the ruler is drawn to scale. Mass goes from 0.1 to 2 kg. Friction adds air resistance and a sticky pivot.
  • Gravity: pick Earth, Moon, Mars, Jupiter or Zero g along the top.
  • Compare: turn on Compare for a second pendulum. A and B choose which one the sliders and the gravity buttons change, so you can put one on the Moon or make it four times shorter.
  • Watch the numbers: angle, speed, amplitude and the three periods; the energy bars (kinetic, potential, lost to friction); and a graph of angle against time.
  • Time: pause, step forward, slow motion at 0.25× or 0.5×, and Reset. The stopwatch runs on the simulation's clock, so you can time ten swings even in slow motion.
  • On a projector: press full screen; text and buttons grow. Space pauses and R resets.

The period of a pendulum

A simple pendulum is a small heavy ball on a light string of length l. Pulled aside and let go, gravity pulls it back towards the lowest point, it overshoots, and it swings back and forth. One period T is the time for one full swing, there and back.

For small swings the period is:

T = 2π√(l/g)

Only two things appear in the formula: the length l and the gravity g. The mass is missing, and so is the amplitude. A 1 m pendulum on Earth (g = 9.81 m/s²) swings with T = 2.006 s. Make it four times shorter and the period halves: 0.25 m gives 1.003 s.

The mass doesn't matter

A heavier ball is pulled harder by gravity, but it is also harder to speed up, by exactly the same factor. The two cancel. Try it: set the mass to 0.1 kg, then 2 kg. The periods do not change, only the energy bars grow, because energy is proportional to mass.

The amplitude matters only a little

Almost not, for small angles, which is why pendulum clocks work. But the formula is an approximation that assumes sin θ ≈ θ. The simulation uses the real equation, and the exact period grows with the amplitude θ₀:

AmplitudeExact period (1 m, Earth)Longer than 2π√(l/g) by
5°2.007 s0.05%
10°2.010 s0.19%
20°2.021 s0.77%
45°2.086 s4.0%
90°2.368 s18.0%
150°3.535 s76%
170°4.894 s144%

Below about 15°, the difference is smaller than your reaction time on a stopwatch. Near the top, the ball hangs for a long time before falling back.

Energy: kinetic and potential

As the ball swings, energy changes form. At the ends of the swing the ball stops for an instant: all the energy is potential energy, mgh, where h = l(1 − cos θ) is its height above the lowest point. At the bottom it moves fastest: all the energy is kinetic, ½mv². Without friction the total, the dashed line on the bars, stays the same.

Example: m = 0.5 kg, l = 1 m, θ₀ = 20°. The ball rises h = 1 × (1 − cos 20°) = 0.060 m, so the energy is 0.5 × 9.81 × 0.060 = 0.30 J. At the bottom ½mv² = 0.30 J, so v = 1.09 m/s.

Damping

Real pendulums slow down: air pushes against the ball and the pivot rubs. Turn up Friction and every swing is smaller than the one before. This is a damped oscillation. The pink bar shows the energy that friction has turned into heat; kinetic plus potential plus lost always adds up to the starting total. Notice that the period barely changes while the amplitude shrinks.

Pendulums on other planets

Gravity sits in the formula, so the same pendulum swings at a different pace on each world:

Placeg (m/s²)Period of a 1 m pendulum
Moon1.624.94 s
Mars3.713.26 s
Earth9.812.01 s
Jupiter (cloud tops)24.791.26 s

With Zero g, as on the International Space Station, nothing pulls the ball back. Let go and it stays where you left it. Flick it and it goes round and round in a circle forever. A pendulum clock would not work in orbit.

Try this

  1. Set the length to 0.50 m on Earth and the start angle to 10°. Predict 10 periods: 2π√(0.5/9.81) = 1.419 s, so about 14.2 s.
  2. Start the stopwatch as the ball passes the bottom, count ten swings, stop. Divide by 10 and compare with the measured period in the panel.
  3. Now start at 60°. Is ten swings still 14.2 s? The exact period is 1.522 s, about 7% longer.
  4. Turn on Compare, make B 0.25 m long, and watch B overtake A: it swings twice for every swing of A.

Teaching ideas

The simulation fits units on oscillations and simple harmonic motion (AP Physics 1, IB Physics, GCSE and A level) and the NGSS energy standard HS-PS3-2.

  1. Predict (5 minutes): ask "Will a heavier ball swing faster?" Take a vote, then change the mass on the big screen.
  2. Measure (10 minutes): groups time ten swings for four lengths and plot T² against l. The slope is 4π²/g, so the class can measure g.
  3. Explain (5 minutes): show the energy bars and pause at the end and at the bottom of a swing.
  4. Stretch (5 minutes): go to 90° and 150° and ask why the formula stops working.
  5. Review (10 minutes): make a review game with the button above and play it as a class, in teams, with your phone as the remote.

Questions teachers ask

Is the simulation accurate?

Yes. It solves the full pendulum equation with a fourth-order Runge-Kutta method in steps of 1/480 s. Over 100 s without friction the energy drifts by less than 0.1%, and the measured period matches the exact formula to within 0.5% at every angle up to 170°.

Why is the measured period a little longer than 2π√(l/g)?

Because the formula is only exact for tiny swings. At 20° the real period is 0.8% longer. Set the start angle to 3° and the two agree to the millisecond.

How is the period measured?

The simulation records each time the ball passes the lowest point and takes the time between two passes in the same direction. It updates every half swing, so it keeps up when you change something.

Can students use it on an interactive whiteboard?

Yes. Every control is a big button or slider, and students can drag the ball with a finger. Two students can drag A and B at the same time.

Do I need to install anything or sign up?

No. It runs in any modern browser, on a computer, a tablet or a phone, and it's free.

← All simulations