Percentages and Math

Spring Oscillation Calculator

Enter the mass, the spring constant and how far you pull it to see how the mass on a spring bounces.

Your numbers

Example value.

Force per meter of stretch. Example value.

The largest stretch from the resting point. Example value.

More options

Optional. Gives the position and speed at this moment, starting at full stretch.

Result

Period

0.3142 s

3.183 swings every second.

Period
0.3142 s
Frequency
3.1831 Hz
Angular frequency
20.0000 rad/s
Top speed (at the resting point)
1.0000 m/s
Top acceleration (at full stretch)
20.0000 m/s2
Energy stored at full stretch
0.25000 J
Stretch from hanging the mass
0.02452 m
Position after 0.1 s
-0.02081 m
Velocity after 0.1 s
-0.90930 m/s
How this was calculated
  1. The angular frequency is omega = sqrt(k / m) = sqrt(200 / 0.5) = 20.00000 rad/s.
  2. The period is T = 2 x pi / omega = 0.31416 s and the frequency is 1 / T = 3.18310 Hz.
  3. Top speed is amplitude x omega = 1.00000 m/s, and the stored energy at full stretch is 0.5 x k x amplitude^2 = 0.250000 J. Hanging the mass stretches the spring by m x g / k, with g = 9.80665 m/s2.
  • This is an ideal spring with no friction and no mass of its own. The period does not depend on the amplitude in this model. A real spring slowly loses energy and adds a little of its own mass to the swing.

Calculated using SumPanda.com · https://sumpanda.com/spring-oscillation-calculator/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the spring oscillation calculator

  1. Enter the mass hanging on or attached to the spring in kilograms.
  2. Enter the spring constant, which is the force in newtons needed to stretch the spring by one meter.
  3. Enter the amplitude, the farthest the mass is pulled from its resting point before release.
  4. Read the period, the frequency, the top speed and acceleration, the energy stored at full stretch and how far the weight stretches the spring on its own. Add a time to see the position and velocity then.

Formula

angular frequency omega = sqrt(k / m)

period T = 2 x pi / omega, frequency f = 1 / T

top speed = A x omega, top acceleration = A x omega^2

energy at full stretch E = 0.5 x k x A^2

position x(t) = A x cos(omega x t)

k is the spring constant, m the mass and A the amplitude. The stretch from hanging the mass is m x g / k with g = 9.80665 m/s2.

A 0.5 kg mass on a 200 N/m spring

With a mass of 0.5 kg, a spring constant of 200 N/m and an amplitude of 0.05 m, omega is the square root of 200 / 0.5, which is 20 rad/s. The period is 2 x pi / 20 = 0.3142 s and the frequency is 3.183 Hz. The top speed is 0.05 x 20 = 1.0 m/s, the top acceleration is 20 m/s2 and the stored energy is 0.25 J.

After 0.1 seconds, starting from full stretch, the position is 0.05 x cos(2) = -0.02081 m and the velocity is -0.9093 m/s. The mass has passed its resting point and is on its way to the far side. Hanging the mass on the spring stretches it by 0.5 x 9.80665 / 200 = 0.02452 m.

What changes the period and what does not

The period depends only on the mass and the spring constant. A stiffer spring is quicker and a heavier mass is slower. Making the mass four times larger doubles the period. In this ideal model the amplitude does not change the period at all, which is why a swinging weight can be used to keep time. Doubling the amplitude does double the top speed and quadruple the stored energy.

Where the ideal model stops working

Real springs have mass of their own, friction takes energy out of the motion, and a spring stretched too far no longer follows a straight-line force law. Treat the numbers as the starting point for a design or an experiment, then measure the real period with a stopwatch over many swings.

More motion and materials tools

For other motion and material effects, try the Thermal Expansion Calculator, Pulley Belt Length Calculator and Terminal Velocity Calculator.

Assumptions and limits

  • The spring follows Hooke's law, so its force is proportional to its stretch.
  • There is no friction or air resistance, so the motion never dies away.
  • The spring itself has no mass.
  • The mass is released from rest at the full stretch you enter.
  • The mass, spring constant, amplitude and time are example values to replace with your own.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

How do I find the spring constant of a real spring?

Hang a known mass on it, measure how far it stretches and divide the weight in newtons by the stretch in meters. A 0.5 kg mass that stretches a spring by 0.0245 m gives about 200 N/m.

Why is the top speed at the resting point?

The spring pulls the mass toward the resting point, so the mass speeds up on the way there and slows down after it. Energy swings between stored in the spring at the ends and motion in the middle.

Does gravity change the period of a hanging spring?

No. Gravity moves the resting point lower by m x g / k but does not change the period. That is why the same spring oscillates at the same rate on the moon.

What is the difference between frequency and angular frequency?

Frequency counts full cycles per second in hertz. Angular frequency counts radians per second, and one cycle is 2 x pi radians, so it is about 6.28 times the frequency.