Pendulum Simulator

Drag the bob and let it swing. Change length, angle, and gravity and watch the period, velocity, and potential-to-kinetic energy trade update live.

Offline ● Works without internet after loading After the first page load, no network connection is needed.

Drag the bob and let go

Controls

Live measurements

Period (small-angle)
Bob speed
Potential energy
Kinetic energy

Graph

Formula

T ≈ 2π √(L / g)

Type your own values to solve the formula. The simulation follows along.

T Period (small-angle)

Observations

    What's happening

    Real-world examples

    Grandfather clock

    A clock pendulum near one metre long swings with a period close to 2 seconds, which is why long-case clocks are the height they are.

    Gravity on the Moon

    Moon gravity is about one sixth of Earth, so the same pendulum swings roughly 2.4 times slower.

    Energy conservation

    Watch the potential and kinetic energy bars trade in opposite step while the total stays fixed.

    Wide swings

    Release from a large angle and the true period runs longer than the small-angle formula predicts.

    Common Questions

    What determines the period of a pendulum?

    For small swings the period is T is about 2 pi times the square root of L / g: it depends only on the length L and the gravitational field g. A longer pendulum swings more slowly, and stronger gravity speeds it up. Strikingly, the mass of the bob does not appear, so a heavy and a light bob of the same length swing at the same rate. The simulator shows the period updating as you change length and gravity.

    Why does the mass not affect the period?

    Gravity pulls harder on a heavier bob, but a heavier bob also resists changes in motion more, and the two effects cancel exactly. This is the same reason all objects fall at the same rate in a vacuum. In the formula T is about 2 pi times the square root of L / g there is simply no mass term. The simulator keeps mass fixed at one kilogram and display-only for this reason.

    How does energy change during a swing?

    Energy trades between two forms. At the top of a swing the bob is momentarily still, so all the energy is potential (stored in its height). At the bottom it moves fastest, so the energy is all kinetic. In between it is a mix, and the total stays constant. The PE and KE bars in the simulator rise and fall in opposite step to show this conservation.

    Is the small-angle formula always accurate?

    No. T is about 2 pi times the square root of L / g is an approximation that is excellent for small swings but drifts for large ones. At a 60 degree release the true period is around 7 percent longer than the formula predicts. This simulator integrates the full nonlinear equation, so releasing the bob from a wide angle makes it visibly swing slower than the small-angle reading suggests.

    How do I set the starting angle?

    Drag the bob to wherever you want and let go: it swings from rest at that angle. You can also use the initial-angle slider, or load a preset such as the grandfather clock. Dragging is the most direct way to feel how a wider release stores more potential energy and produces a faster bottom-of-swing speed.

    Does the simulator upload anything?

    No. It runs entirely in your browser on the HTML canvas, computing the motion locally. Nothing is sent anywhere and it works offline once loaded.