Simple Harmonic Motion Calculator

Calculate displacement, velocity, acceleration, and energy for simple harmonic oscillators. Supports spring-mass, pendulum, and damped systems with motion tables and energy visualization.

m
Hz
s
°
kg/s
kg
Displacement x(t)
0.015451 m
Position at time t
Velocity v(t)
-0.5976 m/s
dx/dt at time t
Acceleration a(t)
-2.4399 m/s²
d²x/dt² at time t
Frequency
2.0000 Hz
ω = 12.57 rad/s
Period
0.500000 s
T = 1/f
Max Velocity
0.6283 m/s
v_max = Aω
Total Energy
0.394784 J
E = ½kA²
Damping Ratio
Undamped
Underdamped

Energy Distribution at t = 0.1 s

Kinetic
90.5%
Potential
9.5%

Motion Over One Period

Time (s)Displacement (m)x/APhaseVisual
0.000000.0500001.0000°
0.041670.0433010.86630°
0.083330.0250000.50060°
0.125000.0000000.00090°
0.16667-0.025000-0.500120°
0.20833-0.043301-0.866150°
0.25000-0.050000-1.000180°
0.29167-0.043301-0.866210°
0.33333-0.025000-0.500240°
0.37500-0.000000-0.000270°
0.416670.0250000.500300°
0.458330.0433010.866330°
0.500000.0500001.0000°
Planning notes, formulas, and examples

About the Simple Harmonic Motion Calculator

Simple harmonic motion (SHM) is the most fundamental type of periodic motion, describing any system where the restoring force is proportional to displacement from equilibrium: F = −kx. This idealized motion produces the sinusoidal oscillations that appear everywhere in physics and engineering — from the vibration of atoms in a crystal lattice to the swaying of skyscrapers in wind, from the oscillation of electrical circuits to the motion of a child on a swing.

The defining equation x(t) = A·cos(ωt + φ) encapsulates the complete motion: amplitude A sets the maximum displacement, angular frequency ω = √(k/m) determines how fast the system oscillates, and phase φ specifies the starting position. The beauty of SHM is that all these oscillators — springs, pendulums, LC circuits, molecular vibrations — share identical mathematical descriptions despite their vastly different physical mechanisms.

This calculator handles three input modes (frequency, period, and spring-mass), evaluates position, velocity, and acceleration at any time, tracks the kinetic-potential energy exchange, and supports damping. The motion table with visual position indicators brings the abstract equations to life, showing how the oscillator moves through one complete cycle.

When This Page Helps

SHM is the base model for springs, pendulums, LC circuits, and any system that oscillates around equilibrium with a linear restoring force. This calculator makes it easy to see how mass, stiffness, damping, amplitude, and phase change the motion, energy exchange, and decay behavior over time.

How to Use the Inputs

  1. Select a preset scenario or choose an input mode (frequency, period, or spring-mass).
  2. Enter the amplitude of oscillation in meters.
  3. Enter the frequency/period or spring constant and mass.
  4. Set the evaluation time (t), phase shift (φ), and damping coefficient (b).
  5. Review displacement, velocity, acceleration, and energy values.
  6. Examine the energy distribution bar to see kinetic vs potential balance.
  7. Study the motion table to trace the oscillator through one full period.
Formula used
x(t) = A·cos(ωt + φ). v(t) = −Aω·sin(ωt + φ). a(t) = −Aω²·cos(ωt + φ). ω = 2πf = √(k/m). T = 1/f = 2π√(m/k). KE = ½mv². PE = ½kx². Total E = ½kA². Damping ratio: ζ = b / (2√(km)).

Example Calculation

Result: x(0.1) = 0.04388 m, v = −0.1199 m/s, a = −1.0966 m/s²

ω = √(50/2) = 5 rad/s, f = 0.796 Hz. x(0.1) = 0.05·cos(5 × 0.1) = 0.05·cos(0.5) = 0.04388 m. v(0.1) = −0.05·5·sin(0.5) = −0.1199 m/s. a(0.1) = −0.05·25·cos(0.5) = −1.0966 m/s². Total energy = ½ × 50 × 0.05² = 0.0625 J, exchanged continuously between kinetic and potential.

Tips & Best Practices

  • Doubling the mass halves ω² (doubles the period) but does not change the total energy for the same amplitude.
  • For a pendulum, ω = √(g/L) — period depends only on length and gravity, not mass.
  • Critical damping (ζ = 1) returns to equilibrium fastest without overshooting — used in door closers and car suspensions.
  • LC circuits exhibit electrical SHM: L acts as inertia (mass), 1/C as stiffness (spring), ω = 1/√(LC).
  • Phase space plots (x vs v) form ellipses for undamped SHM and spirals for damped oscillations.
  • Resonance frequency for damped systems is ω_d = ω₀√(1 − 2ζ²), slightly less than the natural frequency.

SHM in Nature and Technology

| System | Spring-like Restoring Force | Period/Frequency | |---|---|---| | Mass on spring | F = −kx | T = 2π√(m/k) | | Simple pendulum | F = −mg sin θ ≈ −(mg/L)x | T = 2π√(L/g) | | LC circuit | V = −q/C | T = 2π√(LC) | | Molecular bond vibration | F = −k_bond·Δr | f ~ 10¹³–10¹⁴ Hz | | Floating object | F = −ρgAx | T = 2π√(m/(ρgA)) |

Damping Regimes

Underdamped (ζ < 1): The system oscillates with exponentially decaying amplitude. Most musical instruments and mechanical systems operate here. Critically damped (ζ = 1): The fastest return to equilibrium without overshooting. Used in measuring instruments and shock absorbers. Overdamped (ζ > 1): Sluggish return to equilibrium without oscillation. Used in heavy door closers and some electrical circuits.

Forced Oscillations and Resonance

When an external periodic force F₀cos(ω_d·t) drives the oscillator, the steady-state amplitude depends on how close ω_d is to ω₀. At resonance (ω_d = ω₀), amplitude becomes A = F₀/(bω₀) — limited only by damping. The famous Tacoma Narrows Bridge collapse (1940) demonstrated the destructive power of resonance when wind vortices matched the bridge's torsional frequency.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • The restoring force must be linearly proportional to displacement: F = −kx. This linear relationship produces purely sinusoidal motion. When the restoring force is nonlinear (e.g., large-angle pendulums), the motion is periodic but not simple harmonic.