Stretch. Release. Repeat.

Spring oscillator simulator

Stretch a spring, let go and watch simple harmonic motion with live energy bars. Hooke’s law F = −kx pulls the mass back toward equilibrium, the period is T = 2π√(m/k), and the total energy ½kA² swaps between spring potential energy and kinetic energy.

Printable classroom activity ↗
Spring oscillatorTRY IT YOURSELF
Displacement -0.5 mENERGY / JPotential2.5 JKinetic0 JTotal: 2.5 J
0.70 s
Period1.405 s
Displacement-0.5 m
Velocity-0 m/s
Total energy2.5 J
Teal + amber · follow the changing valuesIdealized physics model

What if you changed…

Try a starting point

YOUR NEXT AHA

At which point is the object fastest? Watch the energy bars.

See the calculation

F = −kx · T = 2π√(m/k)
  1. Angular frequency = √(k/m) = 4.47 rad/s. Period = 2π/ω = 1.4 s.
  2. Spring energy = ½kx² = 2.5 J. Kinetic energy = ½mv² = 0 J.
  3. Their sum remains ½kA² = 2.5 J.

What this model assumes

Horizontal ideal Hooke’s-law spring, no friction or damping. Displacement is measured from equilibrium.

Keep an eye on this

The minus sign in F = −kx describes direction; spring stiffness itself is positive.

Understand the physics ↗
Waves

Formulas used in this simulation

Hooke’s law
F = −kx
Force points back toward equilibrium
Period
T = 2π√(m/k)
Independent of amplitude
Angular frequency
ω = √(k/m)
In rad/s; f = ω/2π
Spring potential energy
PE = ½kx²
Largest at the turning points
Total energy
E = ½kA² = ½m·vmax²
vmax = Aω at equilibrium
Formulas explained with a worked example ↗
A little question. A clearer picture.

Spring oscillator: common questions

Wondering about the why? Start here.

How do you calculate the period of a mass on a spring?

Use T = 2π√(m/k) with mass in kg and the spring constant in N/m. A 1 kg mass on a 20 N/m spring has T = 2π√(0.05) ≈ 1.40 s.

What is the spring constant k?

k is the stiffness: the force needed per metre of stretch, measured in N/m. A larger k means a stiffer spring, a stronger restoring force and a shorter period.

Where is the mass moving fastest?

At the equilibrium position, where the spring’s potential energy is zero and all of the energy is kinetic. The mass stops momentarily at the turning points, ±A.

Does a larger amplitude change the period?

Not for an ideal linear spring. It increases maximum speed and stored energy, while the period stays the same.

How does doubling the mass affect the period?

The period is multiplied by √2. To double the period, multiply mass by four while keeping stiffness constant.