Pendulum and simple harmonic motion calculator
Three oscillators from a first physics course. For the simple pendulum, the small-angle period and the exact period at any amplitude. For the mass–spring system, the frequency, the amplitude and the phase from the initial conditions, and the energy. For the physical pendulum, a rigid body swinging about a pivot, with its equivalent length.
Theory and worked examples: Pendulum and simple harmonic motion.
What you can do
- Simple pendulum: period 2π√(L/g) and the exact period with the complete elliptic integral.
- θ(t) integrated numerically and compared with θ₀ cos ω₀t, to see when the approximation stops working.
- Maximum speed and string tension at the bottom and at the ends of the swing.
- Mass–spring: ω, T and f; amplitude and phase from x₀ and v₀; maximum speed and acceleration, energy and static stretch when it hangs vertically.
- Physical pendulum: a rod hung from one end or pivoted at a distance d from its center, a disc hung from its rim, or any body with known I and d.
- Animation of the oscillation.
Frequently asked questions
When does T = 2π√(L/g) hold?
Only for small amplitudes. With a 1 m string at 10° it gives 2.006 s, against 2.010 s for the exact period; at 60° the exact period is already 7.32% longer.
Does the period of a pendulum depend on its mass?
Not for a simple pendulum: it depends on the length, g and the amplitude. The mass only changes the string tension. For a mass–spring system, however, T = 2π√(m/k) does depend on the mass.
What is the equivalent length of a physical pendulum?
The length of a simple pendulum with the same period: L_eq = I/(m·d), where I is the moment of inertia about the pivot and d the distance from the pivot to the center of mass. A 1 m rod hung from one end swings like a 0.667 m simple pendulum.
Guide: pendulums and simple harmonic motion
Simple harmonic motion (SHM) is an oscillation in which the force pulling a body back to equilibrium is proportional to how far it has moved away. A mass–spring system follows it exactly; pendulums only do for small angles. This guide explains the tool's three oscillators, when the simple formulas hold and what happens when they do not, with examples checked in the tool and g = 9.81 m/s².
Mass–spring
A mass m on a spring of constant k, with no friction, obeys m·a = −k·x. The solution is
x(t) = A·cos(ω·t + φ) ω = √(k/m) T = 2π/ω f = 1/T
The amplitude A and the phase φ come from the initial position and velocity: A = √(x0² + (v0/ω)²). The maximum speed is A·ω, as it passes the center, and the maximum acceleration is A·ω², at the ends. The energy, E = ½·k·A², goes from elastic to kinetic and back without loss. If the spring hangs vertically, the weight stretches it by m·g/k at equilibrium, but the period does not change: the mass oscillates about that new position.
Simple pendulum
A point mass on a string of length L obeys θ″ = −(g/L)·sin θ. For small angles, sin θ ≈ θ (in radians) and the motion is SHM with
ω0 = √(g/L) T0 = 2π·√(L/g) θ(t) ≈ θ0·cos ω0t
At larger amplitudes the period grows. The exact one is T = 4·√(L/g)·K(k), where K is the complete elliptic integral of the first kind and k = sin(θ0/2). The tool computes it and integrates θ(t) numerically to compare it with the approximation. By conservation of energy, the maximum speed is vmax = √(2gL(1 − cos θ0)), and the string tension is m·g·(3 − 2 cos θ0) at the bottom and m·g·cos θ0 at the ends of the swing.
Physical pendulum
A rigid body swinging about a pivot, with moment of inertia I about it and its center of mass at a distance d, has, for small angles,
T = 2π·√(I/(m·g·d)) Leq = I/(m·d)
The equivalent length Leq is that of a simple pendulum with the same period. For a rod of length L hung from one end, I = m·L²/3 and d = L/2, so Leq = 2L/3; for a disc of radius R hung from its rim, I = (3/2)·m·R² and d = R, so Leq = 1.5·R. In both cases the mass cancels out.
Worked examples
- A 1 m pendulum with a 10° amplitude. T0 = 2π·√(1/9.81) = 2.006 s, and the exact period is 2.010 s: at 10° the simple formula is very good.
- The same pendulum at 60°, with 0.5 kg. The exact period is 2.153 s, 7.32% longer than T0. The maximum speed is √(2·9.81·1·(1 − cos 60°)) = 3.132 m/s; the tension is 9.81 N at the bottom and 2.453 N at the ends.
- A seconds pendulum. With L = 0.994 m, T0 = 2.000 s: each swing, there or back, lasts one second.
- Mass–spring: 0.5 kg, k = 200 N/m, A = 5 cm. ω = √(200/0.5) = 20 rad/s and T = 2π/20 = 0.3142 s; vmax = 0.05·20 = 1 m/s, amax = 0.05·20² = 20 m/s² and E = ½·200·0.05² = 0.25 J. Hanging vertically, the spring stretches 0.5·9.81/200 m = 2.45 cm at equilibrium.
- Mass–spring with x0 = 2 cm and v0 = 0.5 m/s (0.2 kg, k = 80 N/m). ω = √(80/0.2) = 20 rad/s, A = √(0.02² + (0.5/20)²) m = 3.202 cm and vmax = 0.6403 m/s.
- A 1 m rod hung from one end. Leq = 2·1/3 = 0.667 m and T = 2π·√(2·1/(3·9.81)) = 1.638 s.
- A disc of radius 0.2 m hung from its rim. Leq = 1.5·0.2 = 0.30 m and T = 2π·√(0.30/9.81) = 1.099 s.
How to use the tool
- Choose the system: simple pendulum, mass–spring or physical pendulum.
- Simple pendulum: type the length L, the amplitude θ0 (it is released from rest), the mass —it only matters for the tension— and g. Compare the small-angle period with the exact one, and the θ(t) curve with the approximation.
- Mass–spring: type m, k and the amplitude A, or x0 and v0 if the motion starts with a velocity; the amplitude and phase then come from them.
- Physical pendulum: choose the body (a rod hung from one end, a rod pivoted at a distance d from its center, a disc hung from its rim, or another body with known I and d) and type its dimensions.
- Press ▶ or move the slider t to animate the oscillation, and load the cases in this guide under Examples.
Common mistakes
- Using T = 2π√(L/g) at large amplitudes. At 60° the real period is already 7.32% longer.
- Computing cos ω0t with the calculator in degrees. ω0t is in radians.
- Believing the mass changes the period. Not for a simple pendulum; for a spring, it does.
- Taking the string tension equal to the weight. At the bottom it is larger, because it also provides the centripetal acceleration; at the ends it is smaller.
- Using the moment of inertia about the center of mass for a physical pendulum instead of the one about the pivot: add m·d² (parallel-axis theorem).
- Confusing ω0 with the pendulum's angular velocity. ω0 = √(g/L) is the angular frequency of the oscillation and is constant; the angular velocity of the string changes at every instant.
Further reading
The chapters on oscillations and rigid-body rotation of any university physics textbook. On Simuveliq, circular motion explains angular velocity and acceleration, and torque balance covers the moment of a force that makes a physical pendulum swing.
More tools
Versión en español
About Simuveliq · How we verify the calculations · Terms of use · Privacy policy · Contact