Back to Physics calculators

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 calculator.

Other languages 日本語 | English | 简体中文 | Español | Português (Brasil) | Bahasa Indonesia | Français | हिन्दी | العربية

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's calculated

    Using the SHM modes

    This page covers spring motion and the small-angle pendulum. Pick the mode that matches your system first, because the required inputs and interpretation notes are different.

    Suggested workflow

    1. For a spring-mass system, enter m and k to get the period and frequency.
    2. For a pendulum, enter the length and local gravity, then treat large amplitudes as an approximation warning rather than an exact period prediction.
    3. Use the note under the result to see whether the small-angle assumption is still reasonable.

    What the page assumes

    The spring mode assumes an ideal Hooke's-law spring and no damping. The pendulum mode uses the standard small-angle approximation, so the warning becomes important once the release angle is no longer small.

    Common mistakes to avoid

    See also

    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.