Virtual Labs / Spring–Mass System

Physics · Oscillations

Spring–Mass System

Explore simple harmonic motion by changing the attached mass, spring stiffness and initial displacement. Observe the oscillation and investigate its period, frequency and energy.

Oscillation simulation

The mass oscillates around its equilibrium position.

Ideal vertical spring with no damping. Gravity shifts the equilibrium position but does not change the ideal oscillation period.

Experiment controls

Change a parameter and watch the motion respond.

0.50 kg
0.1 kg2.0 kg
20 N/m
5 N/m100 N/m
0.15 m
0.05 m0.30 m

Oscillation running.

Period0.99 s
Frequency1.01 Hz
Angular frequency6.32 rad/s
Maximum speed0.95 m/s
Total mechanical energy0.225 J
Vertical equilibrium stretch0.245 m

Simple harmonic motion formulas

T = 2π√(m/k)
f = 1/T
ω = √(k/m)
E = ½kA²

T = period, f = frequency, ω = angular frequency, m = mass, k = spring constant, A = amplitude.

For an ideal spring, increasing mass increases the period. Increasing stiffness decreases the period. Increasing amplitude increases the energy but does not change the period in the ideal linear model.

Energy during oscillation

The graph shows kinetic and spring potential energy over one oscillation. Their sum remains constant in this ideal, undamped model.

Kinetic energy is greatest near equilibrium; spring potential energy is greatest at the extreme positions.

Experiment procedure

  1. Begin with the default mass and spring constant.
  2. Observe the motion and note the period.
  3. Increase the mass while keeping the spring constant fixed.
  4. Restore the mass, then increase the spring constant.
  5. Change the initial displacement and compare the energy.
  6. Record the results and look for patterns.

Observation table

Record each parameter setting and its calculated results.

#MassSpring kAmplitudePeriodEnergy
No observations recorded yet.

You can record up to 20 observations.

Model limitations: This simulation assumes an ideal linear spring, small enough oscillations for Hooke's law to apply, and no air resistance or internal damping. Real springs can lose energy and may behave nonlinearly.