Skip to content
Mechanics

Simple Harmonic Motion Calculator

Calculate SHM period (spring & pendulum), frequency, displacement, velocity, acceleration, energy, and KE/PE split with 11 calculation modes and step-by-step solutions.

Interactive calculator

Simple Harmonic Motion Calculator

Calculate SHM period, frequency, displacement, velocity, acceleration, energy, and KE/PE split for spring and pendulum oscillations.

Try an example

Your result will appear here.

Choose a calculation mode, fill in the known values, and click Calculate.

Quick Guide

  • Choose a mode: period, frequency, displacement, velocity, energy, etc.
  • Enter spring constant, mass, amplitude, or position as needed.
  • Click Calculate for the result and formula steps.

Key Takeaways

  • SHM is periodic motion where the restoring force is proportional to displacement.
  • Spring: T = 2π√(m/k). Pendulum: T = 2π√(L/g).
  • Displacement: x(t) = A cos(ωt + φ).
  • Velocity is maximum at equilibrium, zero at turning points.
  • Acceleration is maximum at turning points, zero at equilibrium.
  • Total energy E = ½kA² is constant; it oscillates between KE and PE.
  • The period of SHM is independent of amplitude.

What Is Simple Harmonic Motion?

Simple harmonic motion (SHM) is the purest form of periodic motion. It occurs whenever a restoring force is proportional to displacement: F = −kx. A mass on a spring and a small-angle pendulum are the classic examples.

In SHM, the motion is sinusoidal: displacement, velocity, and acceleration all vary as sine or cosine functions of time. The period is constant regardless of amplitude.

SHM Formulas

x(t)=Acos(ωt+ϕ)x(t) = A\cos(\omega t + \phi)
v(t)=Aωsin(ωt+ϕ)v(t) = -A\omega\sin(\omega t + \phi)
a(t)=Aω2cos(ωt+ϕ)a(t) = -A\omega^2\cos(\omega t + \phi)
a=ω2xa = -\omega^2 x
Tspring=2πm/kT_{spring} = 2\pi\sqrt{m/k}
Tpend=2πL/gT_{pend} = 2\pi\sqrt{L/g}

Energy in SHM

E=12kA2=KE+PEE = \tfrac{1}{2}kA^2 = KE + PE

Total mechanical energy is constant. At equilibrium (x = 0), energy is all kinetic. At the turning points (x = ±A), energy is all potential. Energy oscillates between KE = ½mv² and PE = ½kx².

Spring vs Pendulum SHM

PropertySpringPendulum
Period2π√(m/k)2π√(L/g)
Depends onMass, spring constantLength, gravity
Independent ofGravity, amplitudeMass, amplitude (small)
Restoring forceF = −kxF ≈ −(mg/L)x

How to Use the Calculator

  1. Choose the SHM property you want to calculate.
  2. Enter spring constant, mass, amplitude, position, or time as needed.
  3. Click Calculate.
  4. Review the result, substitution, and explanation.

Example Calculations

Spring: 0.5 kg, k = 200 N/m

T = 2π√(0.5/200) = 0.314 s, f = 3.18 Hz

Energy: k = 500 N/m, A = 5 cm

E = ½ × 500 × 0.05² = 0.625 J

Max velocity: A = 0.1 m, ω = 10 rad/s

vₘₐₓ = 0.1 × 10 = 1 m/s

Common Mistakes

  • Confusing angular frequency (ω, rad/s) with regular frequency (f, Hz).
  • Forgetting that acceleration is maximum at the extremes, not at equilibrium.
  • Using the pendulum formula for large angles (> 15°).
  • Mixing up KE and PE locations (max KE at centre, max PE at edges).
  • Thinking amplitude affects the period in ideal SHM.

Accuracy and Limitations

SHM equations assume ideal conditions: no friction, no damping, no air resistance, massless springs, and small oscillations (for pendulums). Real oscillators lose energy to damping and may exhibit nonlinear behaviour. This tool is for education and estimation.

FAQ

What is simple harmonic motion?

SHM is periodic motion in which the restoring force is directly proportional to displacement from equilibrium and acts in the opposite direction: F = −kx.

What is the difference between SHM and oscillation?

All SHM is oscillation, but not all oscillation is SHM. SHM specifically requires F ∝ −x. Damped or driven oscillations are not strictly SHM.

Does amplitude affect the period in SHM?

No. The period of ideal SHM is independent of amplitude. This is a unique property of the linear restoring force.

What is the phase constant φ?

The phase constant sets the initial conditions. If x(0) = A (starts from max displacement), φ = 0. If x(0) = 0 (starts from equilibrium), φ = π/2 or −π/2.

Where is the energy maximum and minimum?

At equilibrium (x = 0): all KE, zero PE. At turning points (x = ±A): all PE, zero KE. Total E is constant throughout.

What is angular frequency ω?

ω = 2πf = 2π/T. For a spring: ω = √(k/m). For a pendulum: ω = √(g/L). It determines how fast the oscillation cycles.

What causes damping?

Friction, air resistance, and internal material deformation dissipate energy, causing the amplitude to decrease over time. SHM assumes no damping.

Is a bouncing ball SHM?

No. A bouncing ball has a restoring force (gravity) but the force is not proportional to displacement, and the collision is not elastic. Only spring-type systems produce true SHM.

Sources

Manish Kumar

Author & technical reviewer

Manish Kumar

PhysicsCalcs tools are reviewed with an educational focus: clear formulas, transparent assumptions, and practical context for students and science learners.

Learn more about Manish