Spring Oscillator Calculator — Hooke’s Law, Period & Energy

Enter k (N/m), m (kg), and x (m) to get force, SHM period/frequency, angular frequency, and max potential energy. Private by design—everything runs locally in your browser.

Inputs

Assumptions: ideal linear spring (Hooke’s law), no damping, small oscillations about equilibrium. Horizontal or vertical setups give the same period (gravity just sets equilibrium).

Results

Force at x (Hooke’s Law):
F = −k x (negative sign = restoring toward equilibrium)
Period / Frequency / ω:
T = 2π√(m/k), f = 1/T, ω = √(k/m)
Max potential energy at |x|:
Umax = ½ k A² with A = |x|
Peak velocity / acceleration (from A = |x|):
vmax = ωA, amax = ω²A

What This Spring Oscillator Calculator Does

This tool computes the basics of a mass–spring system (simple harmonic motion, SHM) from three inputs: spring constant k (N/m), mass m (kg), and a current displacement x (m). You get the instantaneous force via Hooke’s law F = −kx, the oscillation period T = 2π√(m/k), frequency f = 1/T, angular frequency ω = √(k/m), and the max spring energy at the entered amplitude U = ½ k x².

Assuming you release the mass from rest at amplitude A = |x|, SHM gives: x(t) = A cos(ωt), v(t) = −Aω sin(ωt), and a(t) = −Aω² cos(ωt). Peak values are vmax = Aω and amax = Aω².

Units & Tips

  • Use SI units: N/m, kg, m → outputs in N, s, Hz, rad/s, and J.
  • Period does not depend on gravity; it’s set by m and k.
  • If your spring is vertical, include the static stretch in your equilibrium, then measure x from that point.

Educational use only — not for safety-critical design. Real systems have damping, friction, and coil limits.

Explore more tools