Simple Harmonic Motion (SHM) & Pendulum Calculator
Period, frequency and maximum speed for a pendulum or a mass on a spring, with the motion animated beside a live graph of position, velocity and acceleration.
Period, frequency and maximum speed for a pendulum or a mass on a spring, with the motion animated beside a live graph of position, velocity and acceleration.
One full swing takes 2.006 s — 0.498 cycles per second
T = 2π√(L/g) = 2π√(1 ÷ 9.807). Notice what is missing: the mass of the bob. A lead weight and a paperclip on the same string swing at exactly the same rate, because gravity pulls harder on the heavier one in exactly the proportion that makes it harder to accelerate.
At 15° the small-angle formula is safe
The exact period is 2.015 s against the small-angle 2.006 s — a difference of 0.43%, smaller than you can time by hand. The approximation only starts to hurt past about 20°, where it passes 1%.
To halve the period you must quarter the length
Period goes as √L, not L. This 1 m pendulum beats at 2.006 s; a 0.25 m one would beat at 1.003 s. It is also why a seconds pendulum — one second per half-swing — has to be very close to 0.994 m at sea level, a length that fixed the height of grandfather clocks.
Position, velocity and acceleration are one wave a quarter-cycle apart
x = A·cos(ωt), v = −Aω·sin(ωt), a = −Aω²·cos(ωt), with ω = 3.132 rad/s. Acceleration is always exactly the opposite of displacement — that relation, a = −ω²x, is the definition of simple harmonic motion, and everything else on this page follows from it.
What the model leaves out
A massless string, a point bob, no air resistance and no friction at the pivot. A real pendulum loses amplitude slowly and, because the exact period depends on amplitude, its period drifts as it decays. That is why precision clocks keep the swing tiny.
Worked out in your browser — nothing is sent anywhere.
Save this result, change your inputs, and recalculate to compare scenarios side by side.
Isochronism is what makes a swinging weight a timekeeper at all — and why precision clocks keep the swing as small as they can.
The standard experiment: time twenty swings, divide, and compare against 2π√(L/g) to measure g.
A car body on its springs is a mass–spring oscillator, and its natural frequency is why some roads feel worse at particular speeds.
Tall buildings carry a deliberately tuned pendulum near the top, set to swing out of step with the tower and cancel its sway.
A mechanical watch replaces the pendulum with a wheel on a hairspring, obeying the same equation and free of gravity's direction.
Every point on a vibrating string is doing simple harmonic motion; the pitch you hear is its frequency.
T = 2π√(L/g), where L is the length from the pivot to the centre of the bob and g is the acceleration due to gravity. A one-metre pendulum on Earth takes about 2.006 seconds per full swing. The formula contains no mass term at all, because gravity pulls harder on a heavier bob in exactly the proportion that makes it harder to accelerate — the two effects cancel completely.
No. A lead weight and a cork on identical strings swing at identical rates, which is one of the least intuitive results in mechanics. What does affect it is length — and only as a square root, so quartering the length halves the period. Air resistance eventually separates the two in practice, because it slows a light bob far more than a heavy one, but that is drag, not the pendulum law.
T = 2π√(m/k), with m the mass in kilograms and k the spring constant in newtons per metre. A stiffer spring or a lighter mass gives a faster oscillation. Note what is absent here: the amplitude. Pull the mass twice as far and the period does not change at all — it simply travels twice as fast over twice the distance.
Because the restoring force grows in proportion to the displacement. Pull the mass twice as far and the spring pulls back twice as hard, so it accelerates twice as fast and covers the doubled distance in the same time. This property is called isochronism, and it is the entire reason a pendulum can keep time — a clock whose swing decays slightly would otherwise run fast or slow as its mainspring unwound.
T = 2π√(L/g) is derived by replacing sin θ with θ, which is only accurate for small swings. The error is 0.19% at 10°, about 0.8% at 20°, 1.7% at 30% and roughly 18% at 90°. For a laboratory measurement with a stopwatch, anything under about 15° is safe. Beyond that the true period is genuinely longer, and this calculator shows both figures so you can see the gap.
They are the same wave, each shifted a quarter of a cycle from the last. Position is A·cos(ωt), velocity is −Aω·sin(ωt), acceleration is −Aω²·cos(ωt). So velocity peaks exactly where position crosses zero — at the centre of the swing — and acceleration is always the exact mirror of position, largest at the extremes where the object is momentarily still. That last relation, a = −ω²x, is the definition of simple harmonic motion.
Frequency f counts cycles per second, in hertz. Angular frequency ω counts radians per second, and ω = 2πf. The angular version is what appears inside the sine and cosine, because those functions take radians. For a pendulum ω = √(g/L); for a spring ω = √(k/m). Everything else — period, maximum speed, maximum acceleration — is built from ω.
Nowhere — it swaps. At the extremes the object is momentarily still and all the energy is stored, as spring tension or as the height the bob has risen. At the centre the store is empty and all of it is kinetic. The total stays at ½kA² for a spring, and the exchange happens twice per cycle, not once, because the object passes through the centre twice. Doubling the amplitude quadruples the energy.
One that takes exactly one second per half-swing, so two seconds for a complete cycle. That requires a length of about 0.994 m at sea level, which is why longcase (grandfather) clocks are the height they are — the case exists to house that specific pendulum. Because g varies slightly with latitude and altitude, the exact length differs from place to place, a fact eighteenth-century surveyors used to measure the shape of the Earth.