Physics · Oscillation

Simple harmonic motion (SHM) calculator

Compute period, angular frequency, max speed, acceleration, and energy for a spring–mass oscillator, and compare with a small-angle pendulum.

Runs entirely in your browser; no data leaves this page.

How to use (3 steps)

  1. Choose Spring or Pendulum and keep the sample values or enter your own.
  2. For the spring, enter mass m, spring constant k, amplitude A, and optional time t. For the pendulum, enter length L, gravity g, and an amplitude angle (Earth and Moon presets are one tap).
  3. Press Compute to view ω, period, frequency, peak speed/acceleration/energy, and a step-by-step breakdown for each mode.

Key formulas: spring ω = √(k/m); pendulum ω = √(g/L) (small-angle approximation).

Inputs

kg
N/m
m
s

Results

Results update after you compute. Values are formatted for quick inspection.

How it is calculated

    FAQ

    What is simple harmonic motion?

    Simple harmonic motion is a repeating oscillation where the restoring force is proportional to displacement. Mass–spring systems and small-angle pendulums are classic examples.

    Does pendulum period change with amplitude?

    In the small-angle approximation used here, the period is nearly independent of amplitude. Large swings deviate and the actual period becomes slightly longer.

    How do mass and spring constant affect the period?

    For a spring–mass system, T = 2π√(m/k). Heavier masses oscillate more slowly, and stiffer springs (larger k) oscillate faster.

    Ads

    Comments

    Feedback is welcome. Comments load only after you click.