Simple Harmonic Motion Calculator
Calculate period, frequency, angular frequency, displacement, velocity, acceleration, spring constant, mass, pendulum length, and energy with SHM visuals and step-by-step solutions.
Background
Simple harmonic motion happens when a restoring force pulls an object back toward equilibrium and the motion repeats smoothly. This calculator connects formulas, phase, amplitude, energy exchange, and real systems like springs and pendulums.
How to use this calculator
- Choose the SHM mode that matches your problem: spring, pendulum, motion at time, or energy.
- Select the quantity you want to solve for.
- Enter known values with units, then click Calculate SHM.
- Use the graph and mass-spring visual to connect position, velocity, acceleration, and energy.
- Use quick examples to test common homework setups.
How this calculator works
- For a mass-spring system, it uses T = 2π√(m/k), ω = √(k/m), and f = 1/T.
- For a simple pendulum, it uses the small-angle approximation T = 2π√(L/g).
- For motion at time, it uses x(t)=A cos(ωt+φ), v(t)=−Aω sin(ωt+φ), and a(t)=−ω²x.
- For energy, it uses E = ½kA², PE = ½kx², and KE = E − PE.
Formula & Equations Used
Spring period: T = 2π√(m/k)
Pendulum period: T = 2π√(L/g)
Frequency: f = 1/T
Angular frequency: ω = 2πf
Position: x(t)=A cos(ωt+φ)
Velocity: v(t)=−Aω sin(ωt+φ)
Acceleration: a(t)=−ω²x
Spring energy: E = ½kA²
Example Problems & Step-by-Step Solutions
Example 1: Find spring period
A 0.5 kg mass is attached to a 20 N/m spring.
T = 2π√(m/k)
T = 2π√(0.5/20)
T ≈ 0.993 s
Example 2: Find pendulum period
A simple pendulum has length 1.0 m near Earth.
T = 2π√(L/g)
T = 2π√(1.0/9.81)
T ≈ 2.01 s
Example 3: Find maximum spring energy
A 20 N/m spring oscillates with amplitude 0.12 m.
E = ½kA²
E = ½(20)(0.12²)
E = 0.144 J
What simple harmonic motion means
Simple harmonic motion is repeating motion caused by a restoring force or restoring acceleration that points back toward equilibrium. The object moves fastest at equilibrium and slows to zero speed at maximum displacement.
FAQ
What is the difference between period and frequency?
Period is the time for one cycle. Frequency is the number of cycles per second, so f = 1/T.
Does amplitude affect the period?
For ideal mass-spring SHM, amplitude does not affect the period. For a simple pendulum, the usual period formula assumes small angles.
Where is speed maximum in SHM?
Speed is maximum at equilibrium, where displacement is zero and kinetic energy is greatest.
Where is acceleration maximum in SHM?
Acceleration magnitude is maximum at the amplitude points, where displacement from equilibrium is largest.