Skip to content
Tool Corner

Pendulum Simulator

Set a length and release angle, then watch the swing run in real time — with the true period alongside the textbook approximation, so you can see exactly where the shortcut breaks down.

Built and verified by Jogeswara, Founder and Engineer, MSc, PMP — Tool CornerModel checked against the period formulas and constants listed belowReviewed
Start with a real example

Angle 10 degrees, bob speed 0.08 metres per second, period 2.01 seconds. The textbook formula is 0.00 swings ahead of the real pendulum.

Drag the bob to set the release angle. The dashed ghost is the pendulum the textbook formula predicts; the amber one is the real swing. Watch the two drift apart: the wider the angle, the faster they part. The bars show kinetic and potential energy trading places.

Skip to content
Tool Corner

Pendulum Simulator

Set a length and release angle, then watch the swing run in real time — with the true period alongside the textbook approximation, so you can see exactly where the shortcut breaks down.

Built and verified by Jogeswara, Founder and Engineer, MSc, PMP — Tool CornerModel checked against the period formulas and constants listed belowReviewed
Start with a real example

Drag the bob to set the release angle. The dashed ghost is the pendulum the textbook formula predicts; the amber one is the real swing. Watch the two drift apart: the wider the angle, the faster they part. The bars show kinetic and potential energy trading places.

Mass is deliberately absent — it has no effect on the period.

There are two period figures below on purpose. The true period is what the swing actually does; the small-angle estimate is the formula in every textbook, which assumes the swing is narrow. The third number is the gap between them.

True period
{{ periodTxt }}
Small-angle estimate
{{ smallTxt }}
Approximation error
{{ errTxt }}
How far the textbook formula is out at this angle
Maximum bob speed
{{ vmaxTxt }}
In plain English

A {{ lTxt }} pendulum pulled back {{ aTxt }} takes {{ periodTxt }} to swing over and back. The textbook shortcut predicts {{ smallTxt }}, so it is out by {{ errTxt }} — and the bob is doing {{ vmaxTxt }} as it passes the bottom.

What next?

What your result means

True period is the time for one complete there-and-back swing, calculated without approximating. Small-angle estimate is the same period from the textbook formula that assumes tiny swings, and approximation error is how far apart the two have drifted.

Maximum bob speed is reached at the lowest point of the arc, where all the height the bob lost has become motion. That exchange is the same energy accounting covered by the kinetic energy calculator.

Why this one is different

Two periods are given, not one: the true value and the small-angle approximation taught in schools, with the error between them stated as a figure. That is the whole point of the tool — the textbook formula quietly drifts as the swing widens, and here you can watch it happen rather than being told it happens.

How it works

Gravity pulls the bob straight down, but the rod only lets it move along an arc, so the useful part of that pull is the component along the arc — proportional to the sine of the angle. That gives a restoring force which always points back towards the bottom, and the bob overshoots each time, producing a swing.

Because the force follows the sine of the angle rather than the angle itself, the motion is not quite a simple oscillation. For small swings the difference is negligible and the classic formula works; for large ones the pendulum spends longer near the top of its arc, where the restoring force is weakest, and the real period stretches out. This simulator integrates the true equation step by step, which is why its animation and its period agree even at 170°.

How to use this simulator

  1. Set the length — the distance from pivot to the centre of the bob.
  2. Set the release angle. Start at 10°, then push it to 90° and watch the approximation error climb.
  3. Switch gravity to the Moon and the same pendulum slows to roughly half its Earth rate.
  4. Press play to release, or read the figures straight off the panel as you drag.

Formula

small-angle: T₀ = 2π · √( L ÷ g )
true period: T = T₀ · (2/π) · K( sin( θ₀ ÷ 2 ) )
max speed: v = √( 2 g L · ( 1 − cos θ₀ ) )
frequency: f = 1 ÷ T
  • L — length from pivot to bob centre, in metres
  • θ₀ — release angle from vertical, in degrees
  • g — gravitational field strength, in m/s² (9.80665 on Earth)
  • K — the complete elliptic integral of the first kind, which is what makes the true period exact rather than approximate

Example calculation

A 1 metre pendulum released at 10° on Earth:

T₀ = 2π × √( 1 ÷ 9.80665 ) = 2.006 s
T = 2.006 × (2/π) × K( sin 5° ) = 2.010 s
error = 0.19 %
v = √( 2 × 9.80665 × 1 × ( 1 − cos 10° ) ) = 0.546 m/s

Set the controls to those values and the panel shows the same figures. Raise the release angle to 90° and the true period grows to 2.368 s while the estimate stays at 2.006 s — an 18% error.

How far the approximation drifts

At 10°
0.19 %
At 45°
4.00 %
At 90°
18.03 %

Frequently asked questions

Does the mass of the pendulum change its period?

No. Period depends on length and gravitational field strength, not on mass. A heavy bob and a light bob on the same string swing in step, because gravity accelerates both equally. Mass does affect the tension in the string and the energy stored, but not the timing.

Why does the textbook formula go wrong at large angles?

The familiar formula assumes sin of the angle equals the angle, which only holds for small swings. At a 10 degree release it is out by 0.19 percent, at 90 degrees by 18 percent, and at 170 degrees by 144 percent. This simulator reports both the true period and the approximation so you can see the gap open up.

What length gives a one-second swing?

A pendulum about 0.994 metres long has a period near 2 seconds on Earth, meaning one second per swing in each direction. That is the basis of the seconds pendulum used in clock design, and it is why longcase clocks are roughly a metre tall inside.

Related calculators

Pendulum periods by angle, length and gravity

The simulator integrates the true equation of motion and reports the exact period. The small-angle formula T = 2π√(L ÷ g) is the one in most textbooks, and the table shows how far it drifts as the swing gets wider.

A 1 m pendulum on Earth: estimate against true period
Release angleSmall-angle T₀True period TTrue period longer by
5°2.006 s2.007 s0.05%
10°2.006 s2.010 s0.19%
20°2.006 s2.022 s0.77%
30°2.006 s2.041 s1.74%
45°2.006 s2.087 s4.00%
60°2.006 s2.153 s7.32%
90°2.006 s2.368 s18.03%
120°2.006 s2.755 s37.29%
150°2.006 s3.536 s76.22%
170°2.006 s4.894 s143.94%

Up to 20° the estimate is within about 0.8% of the true period, which is why the simple formula survives. By 90° the true period is 18% longer, and at 170° the true period is 4.89 s against an estimate of 2.006 s, because the bob lingers near the top where the restoring force is weakest.

Length sets the period

Period by length at small angles on Earth
LengthPeriodSwings a minute
0.25 m1.003 s59.8
0.5 m1.419 s42.3
0.9936 m2.000 s30.0
2 m2.837 s21.1
5 m4.486 s13.4
10 m6.345 s9.5

A pendulum of about 0.99 m has a period close to 2 s on Earth, which is the origin of the “seconds pendulum”. Because the period depends on the square root of the length, you need four times the length to double it.

The same pendulum elsewhere

A 1 m pendulum released at 10° on different worlds
WorldPeriod
Earth (9.80665 m/s²)2.010 s
Mars (3.7278 m/s²)3.260 s
Moon (1.625 m/s²)4.938 s

Gravity enters under the square root as well, so the Moon’s weaker gravity slows the swing by about the square root of six, which is a factor of about 2.5.

Five pendulum mistakes to avoid

  • Thinking the mass matters. It does not enter the formula. A heavy bob and a light one of the same length swing with the same period in this model.
  • Measuring the wrong length. The length runs from the pivot to the centre of the bob, not to its bottom or to the end of the string.
  • Using the simple formula for wide swings. Beyond roughly 20° the error grows quickly, as the table shows.
  • Timing one swing. To measure a real period, time 20 swings and divide, so that reaction time spreads across many.
  • Expecting it to keep swinging. There is no friction or air resistance here. A real pendulum loses amplitude and stops.

Embed this calculator on your site

You can put this tool on your own page, blog or lesson site for free. Copy the code below and paste it into your page. Please keep the credit line under the tool. The embedded version shows no ads, loads no analytics and sets no cookies.

<iframe src="https://toolcorner.net/embed/pendulum-simulator" title="Pendulum Simulator" width="100%" height="1230" style="border:0;max-width:760px" loading="lazy"></iframe>
<p style="font-size:13px">Calculator by <a href="https://toolcorner.net/labs/pendulum-simulator">Tool Corner</a></p>

Cite this page

If you use this tool in a report, assignment or article, you can cite it like this.

Tool Corner. (2026). Pendulum Simulator [Online calculator]. https://toolcorner.net/labs/pendulum-simulator

Pendulum Simulator. Tool Corner. https://toolcorner.net/labs/pendulum-simulator. Retrieved [date].

For teachers

A printable classroom activity for this simulator, with a student sheet and an answer key: open the Pendulum Simulator activity.

Assumptions & limitations

  • No friction or air resistance. The swing never dies away here. A real pendulum loses amplitude and eventually stops.
  • The rod is rigid and weightless. All the mass sits at a single point, so this is an idealised simple pendulum rather than a swinging bar.
  • The bob is a point. A real bob has size and spin, which shifts the effective length slightly.
  • The pivot is fixed. No support flexing, and no driving force, so resonance is out of scope.
  • Motion stays in one plane. A real pendulum can trace an ellipse; this one only swings back and forth.

Further reading

Our guide to the pendulum and simple harmonic motion works through the period formula, the small-angle approximation and exactly how large the error grows at wide swings. For the energy exchange that sets the bob's top speed at the bottom of its arc, see force, work, energy and power.

Sources & references

The constants and both period formulas used on this page come from the following. These are specific to pendulum motion and gravitational field strength.

Last updated
Was this result right?
This is a physics model, not a measurement

The swing you see is an idealised pendulum: a point mass on a massless rod, with no air resistance, no friction at the pivot and no driving force. A real pendulum loses amplitude and its period drifts as it does. Use the figures to understand how length, gravity and angle interact — not to calibrate a clock.