Find the period, frequency, and angular frequency of a spring-mass system or a simple pendulum, plus displacement, velocity, and acceleration at any instant.
Simple harmonic motion (SHM) describes any system where the restoring force is proportional to displacement — a mass on a spring and a pendulum swinging through small angles are the two textbook examples, and both produce the same sinusoidal position, velocity, and acceleration equations, just with a different formula for the angular frequency ω.
For a mass m on a spring with stiffness k, Newton's second law (F = ma = −kx) gives the equation of motion for SHM, with angular frequency ω = √(k/m). The period — time for one full oscillation — is T = 2π/ω = 2π√(m/k), and the frequency is simply f = 1/T. Notice a stiffer spring (larger k) or lighter mass both shorten the period.
With amplitude A and the mass released from maximum displacement at t = 0, position follows x(t) = A·cos(ωt), velocity is its derivative v(t) = −Aω·sin(ωt), and acceleration is a(t) = −Aω²·cos(ωt) = −ω²x(t). The maximum speed, Aω, occurs at the equilibrium position (x = 0); the maximum acceleration, Aω², occurs at maximum displacement, where the restoring force is largest.
A pendulum of length L swinging through small angles (roughly under 15°) behaves like SHM with angular frequency ω = √(g/L) and period T = 2π√(L/g) — notably independent of both mass and amplitude. This independence from amplitude is what made pendulum clocks practical: the period stays constant even as the swing gradually decays from friction.
Take m = 2 kg and k = 50 N/m. ω = √(50/2) = 5 rad/s, so T = 2π/5 ≈ 1.257 s and f ≈ 0.796 Hz. With amplitude A = 0.1 m, at t = 0.5 s: x = 0.1·cos(2.5) ≈ −0.0801 m, v = −0.1(5)·sin(2.5) ≈ −0.2996 m/s. For a 1 m pendulum, T = 2π√(1/9.81) ≈ 2.006 s — the basis for the "seconds pendulum" historically used to define the second.
In the small-angle equation of motion for a pendulum, both the restoring torque and the moment of inertia scale with mass identically, so mass cancels out — exactly the same way it cancels out of the incline-friction sliding condition. Only length and gravitational acceleration determine the period.
The small-angle approximation (sin θ ≈ θ) breaks down for large swings, and the true period becomes slightly longer than 2π√(L/g), increasingly so as the amplitude grows. This calculator assumes small-angle motion, which is accurate to within about 1% for swings under roughly 20°.
Both share the same mathematical form, T = 2π/ω — only the formula for ω differs (√(k/m) for a spring, √(g/L) for a pendulum). Any system whose restoring force or torque is proportional to displacement will produce this same 2π/ω period relationship.
This calculator assumes the mass starts at maximum positive displacement (x = A) at t = 0, which is why position is a pure cosine with no phase shift. Starting from a different initial condition — for example, released from equilibrium with some initial velocity — would add a phase angle, but the period and frequency stay exactly the same regardless of starting condition.