Home ↓
CalculatorsVerified

Physics & Chemistry

Spring Oscillation Calculator (Mass–Spring Simple Harmonic Motion)

A mass attached to a spring is the classic example of simple harmonic motion, the kind of regular, repeating oscillation found in clocks, musical instruments, vehicle suspensions, buildings swaying in the wind and the vibrations of atoms in molecules. When the mass is pulled from its equilibrium position and released, the spring exerts a restoring force proportional to the displacement, as described by Hooke's law, and the mass oscillates back and forth. For an ideal spring without friction, the angular frequency of the motion equals the square root of the spring constant divided by the mass, and the period, the time for one complete cycle, equals two pi times the square root of the mass divided by the spring constant. A stiffer spring or a lighter mass oscillates faster. Remarkably, the period does not depend on the amplitude: pulling the mass further makes it move faster, but it travels further too, so each cycle takes the same time. The mass moves fastest as it passes through equilibrium, where its speed equals the amplitude times the angular frequency, and its acceleration is greatest at the turning points, equal to the amplitude times the angular frequency squared. The total energy, constantly exchanged between kinetic energy of the mass and potential energy in the spring, equals half the spring constant times the amplitude squared. This calculator takes the mass, the spring constant and the amplitude, and returns the period, frequency, angular frequency, maximum speed, maximum acceleration, total energy and the static stretch of the spring when the mass hangs from it.

How to use this calculator

  1. Enter the mass in kilograms.
  2. Enter the spring constant in newtons per metre.
  3. Enter the amplitude, the maximum displacement from equilibrium, in metres.
  4. Read the period and frequency.
  5. Read the maximum speed, maximum acceleration and energy.

Finding the spring constant

Hang a known mass from the spring and measure how far it stretches. The spring constant equals the weight, m × 9.81, divided by the stretch.

Alternatively, time several oscillations with a known mass and use k = 4π²m ÷ T², which avoids measuring small stretches.

Real springs and damping

Real oscillations gradually die away because of friction and air resistance, called damping. Car shock absorbers deliberately add damping so the suspension does not keep bouncing.

A heavy spring adds to the moving mass. A common correction adds about one third of the spring's mass to the mass in the period formula.

Formula & method

Angular frequency ω = √(k ÷ m); period T = 2π √(m ÷ k)Frequency f = 1 ÷ TMaximum speed = A ω; maximum acceleration = A ω²Total energy E = ½ k A²; ideal spring, no damping, spring mass neglected

ω = √(k/m), T = 2π√(m/k), f = 1/T, v_max = Aω, a_max = Aω² and E = ½kA².

Worked example

A 1 kg mass on a spring with k = 100 N/m and amplitude 0.1 m

  1. ω = √(100 ÷ 1) = 10 rad/s
  2. T = 2π ÷ 10 ≈ 0.628 s, f ≈ 1.59 Hz
  3. v_max = 0.1 × 10 = 1 m/s; E = ½ × 100 × 0.1² = 0.5 J

Answer: The mass completes about 1.6 oscillations per second and reaches 1 m/s at the centre.

Frequently asked questions

Does the amplitude affect the period?

No, not for an ideal spring obeying Hooke's law. The period depends only on the mass and the spring constant.

What happens if I double the mass?

The period increases by a factor of √2, about 1.41, so the oscillation becomes slower.

What is resonance?

If a system is pushed periodically at its natural frequency, the amplitude grows strongly. Engineers avoid resonance in bridges and machines, and use it in musical instruments.

Does gravity change the period of a vertical spring?

No. Gravity shifts the equilibrium position down by mg/k, but the oscillation about that point has the same period.

How is this related to a pendulum?

A pendulum also performs simple harmonic motion for small swings, with period 2π√(L/g), depending on its length and gravity rather than its mass.

Where does the energy go?

At the turning points all the energy is stored in the spring; at the centre it is all kinetic energy of the mass. Without damping the total stays constant.