Simple Harmonic Motion Calculator
The Motion That Keeps Repeating Itself Exactly
A mass bobbing on a spring, a guitar string vibrating, a swinging pendulum at small angles — all trace out the same mathematical pattern known as simple harmonic motion. What makes it "simple" is that the restoring force is always proportional to displacement, which produces a smooth, perfectly repeating sinusoidal oscillation with a fixed period no matter how large the displacement was to start.
The Formulas
Velocity: v(t) = −Aω × sin(ωt + φ)
Acceleration: a(t) = −Aω² × cos(ωt + φ)
A is amplitude, ω is angular frequency (2π/period or 2π×frequency), φ is phase angle, and t is time. Notice that velocity leads position by 90° and acceleration is always directed back toward the center, proportional to and opposite in sign to displacement — the defining signature of this kind of motion.
Where This Pattern Governs Real Systems
- Mechanical vibration analysis — suspension systems, engine mounts, and structural components are modeled as spring-mass oscillators to predict resonance and fatigue.
- Musical instruments — vibrating strings, air columns, and reeds all produce sound through some form of simple harmonic motion, with frequency setting pitch.
- Clocks and timekeeping — quartz crystal oscillators use the same underlying physics as a spring, vibrating at an extremely stable and predictable frequency.
- Seismology — buildings and structures respond to earthquake shaking in ways that can be approximated using harmonic oscillator models, especially near a structure's natural frequency.
One Full Cycle, Point by Point
For a 0.1 m amplitude oscillator with a 2-second period (ω = π rad/s) and zero phase, position, velocity, and acceleration trade off through the cycle:
| Time | Position | Velocity | Acceleration |
|---|---|---|---|
| t = 0 | 0.1 m | 0 m/s | −0.98696 m/s² |
| t = T/4 | 0 m | −0.31416 m/s | 0 m/s² |
| t = T/2 | −0.1 m | 0 m/s | 0.98696 m/s² |
| t = 3T/4 | 0 m | 0.31416 m/s | 0 m/s² |
Velocity peaks exactly when position crosses zero, and acceleration peaks exactly when position is at its extremes — the two are always 90° and 180° out of phase with position, respectively.
How to Use This Calculator
- Choose a mode: Using Period or Using Frequency.
- Enter Amplitude (m), Phase Angle (degrees, defaults to 0), and Time (seconds, defaults to 0).
- Enter Period T (s) or Frequency f (Hz) depending on the mode.
- Select Calculate to see position, velocity, and acceleration at that instant, plus maximum velocity and acceleration, along with the worked formula.
Related Calculations
For the specific case of a gravity-driven pendulum's period, see the Pendulum Period Calculator, or convert between this motion's frequency and period directly with the Frequency Calculator.