Physics Tools

Active tool: Simple Harmonic Motion & Pendulum

Selected option: Results update automatically

What It Does

Works out how fast something oscillates — its period, frequency, and angular frequency — for a mass on a spring or a simple pendulum, and (when you add an amplitude) its energy, peak speed, and peak acceleration. Everything runs in your browser.

How to Use It

  1. Pick a mode — Spring or Pendulum.
  2. Spring: enter any two of mass, spring constant, and period/frequency (add an amplitude for energy and peak speed). Pendulum: enter a length or a period/frequency and pick a planet for gravity (add a bob mass and angular amplitude for energy and peak speed).
  3. Read the derived values and the equation for each, and see the motion in the displacement-vs-time graph (and the pendulum schematic in pendulum mode).
  4. Click Copy on any value, or Copy all.

Options Explained

OptionDescription
ModeChoose a mass-spring system or a simple pendulum.
Mass, spring constant, length, period, frequencyEnter the known system values; the required combination depends on the selected mode.
AmplitudeAdd spring displacement or pendulum angle to calculate energy and peak motion.
PlanetSet gravity for pendulum calculations.
PrecisionChoose how many significant digits to show.
💡 Tip: a pendulum’s period doesn’t depend on how heavy the bob is — only on its length and gravity. A spring’s period doesn’t depend on amplitude either; amplitude changes the energy and top speed, not the timing.
Oscillator
Enter two of mass, spring constant, and period

About Simple Harmonic Motion

Formula and symbols

  • Timing: f = 1 / T; ω = 2π / T
  • Mass on a spring: ω = √(k / m); T = 2π × √(m / k)
  • Spring energy and peak motion: E = ½ × k × A²; v_max = A × ω; a_max = A × ω²
  • Small-angle pendulum: T = 2π × √(L / g)
  • Exact pendulum period: T = 4 × √(L / g) × K(sin(θ₀ / 2))
T, f, ω — oscillation timing
Period in s, frequency in Hz, and angular frequency in rad/s.
m, k, A — spring quantities
Mass in kg, spring stiffness in N/m, and displacement amplitude in m.
E, v_max, a_max — spring outputs
Energy in J, maximum speed in m/s, and maximum acceleration in m/s².
L, g, θ₀ — pendulum quantities
Length in m, gravity in m/s², and angular amplitude (converted to radians for the formula).
K — complete elliptic integral of the first kind
The argument is the elliptic modulus sin(θ₀/2), not its square; this accounts for the longer period of a large swing.

The period-model selector controls the pendulum formula. The spring relations assume an ideal linear spring; neither model includes damping or driving forces.

Simple harmonic motion is the back-and-forth of anything pulled toward a resting point by a force proportional to how far it has moved — a mass on a spring, or a swinging pendulum. The motion repeats with a fixed period T (seconds per cycle); its frequency f = 1/T counts cycles per second (hertz), and its angular frequency ω = 2πf measures the same thing in radians per second. For a spring, ω = √(k/m), so a stiffer spring or a lighter mass oscillates faster; for a pendulum, ω = √(g/L), so a shorter pendulum or stronger gravity ticks faster. Two famous, counter-intuitive facts fall out: a pendulum’s period doesn’t depend on the mass of the bob, and (for small swings) it barely depends on the amplitude — Galileo’s observation that makes pendulum clocks keep time. A spring is isochronous: its amplitude sets the stored energy E = ½kA² and the peak speed v_max = Aω, but not the period. A real pendulum is not perfectly isochronous, though, so this tool gives you a period-model switch. By default it computes the exact large-amplitude period using the elliptic integral T = 2π·√(L/g)·(2/π)·K(sin(θ₀/2)), so it stays accurate for wide swings (a 90° swing takes about 18% longer than the ideal small-amplitude period) — no small-angle (sinθ ≈ θ) approximation. Or switch to the small-angle approximation T = 2π·√(L/g) that most introductory lessons start with, so the tool matches whatever formula your class is using. In the exact model, enter an angular amplitude to see that correction; leave it blank for the ideal small-amplitude period (in the small-angle model the period stays 2π·√(L/g) whatever the amplitude). Damping and driving forces are beyond this model. Everything here is computed on your device.

Example

A 1 m pendulum on Earth (small swing) → T ≈ 2.006 s; swung to 90° → T ≈ 2.368 s. A m = 0.5 kg, k = 200 N/m spring → T ≈ 0.3142 s, f ≈ 3.183 Hz.

Frequently Asked Questions

Why doesn’t the pendulum’s mass matter?

Gravity pulls harder on a heavier bob, but a heavier bob also resists acceleration by exactly the same factor, so the two cancel. The period depends only on the length L and the local gravity g — not on the mass.

Does this tool use the small-angle approximation?

Your choice. Many calculators always assume sinθ ≈ θ, which is only accurate for tiny swings (to ~1% up to about 15°). By default this tool uses the exact period from the complete elliptic integral, so the period is correct for any swing angle up to 90°. If your class hasn’t introduced that formula yet, switch the period model to small-angle approximation to use T = 2π·√(L/g) instead.

Does amplitude change the period?

For an ideal spring, no — it is isochronous, so amplitude changes only the energy and peak speed. For a real pendulum it does: larger swings take longer. The tool shows that dependence in the exact period model when you enter an angular amplitude; the small-angle model deliberately ignores it, keeping the textbook T = 2π·√(L/g) for any amplitude.

How do I model a different planet?

In pendulum mode, pick a planet from the gravity presets or type a custom g. The Moon’s gravity is about 1.62 m/s², so the same pendulum swings far more slowly there than on Earth.

Is my data sent to a server?

No. Every calculation runs locally in your browser; nothing you enter is transmitted or stored.