Hooke’s law spring calculator
How hard does a spring pull back when you stretch it? Enter the spring constant and the extension to get the force and the stored energy, and add a mass to see how it bounces.
See it for real: play Notebook Pinball or play Swing Across or play Pick the Lock.
The formula
Stretch a spring and it pulls back; squash it and it pushes back. In 1676 Robert Hooke found that, as long as you do not overstretch it, the force is proportional to how far you have moved it from its natural length. He published it as a Latin anagram and revealed the answer in 1678: ut tensio, sic vis, “as the extension, so the force”.
F = k x E = ½ k x² T = 2π √(m / k)
Here F is the force in newtons, x the extension (or compression) in metres, and k the spring constant in newtons per metre, which measures stiffness: a spring with k = 25 N/m needs 25 N to stretch it one metre, or 0.25 N per centimetre. E is the elastic potential energy stored in joules, and T the time for one full bounce of a mass m hanging on the spring. Strictly, the spring force points opposite to the extension, which is why textbooks often write F = −kx.
Why the energy is ½kx²
The force needed grows steadily from zero as you stretch the spring, so the average force over the stretch is half the final force, ½kx. Work is average force times distance, ½kx × x = ½kx². On a force–extension graph it is the area of the triangle under the straight line. Because of the square, stretching a spring twice as far stores four times the energy, which is what makes catapults, crossbows and pinball plungers so effective.
Why a mass on a spring bounces at a fixed rate
A mass on a spring is the classic example of simple harmonic motion. The further it is from its rest position, the harder the spring pulls it back, so a big bounce and a small bounce take the same time. The period depends only on the mass and the stiffness: four times the mass doubles the period, a stiffer spring shortens it. A 200 g mass on a 25 N/m school spring bounces with a period of about 0.56 s. Gravity does not change the period at all; it only shifts the rest position down by mg/k.
Typical spring constants
| Spring | Spring constant |
|---|---|
| Slinky-type toy coil, gently stretched | around 1 N/m |
| Spring in a school spring experiment | 10–50 N/m |
| Ballpoint pen spring | a few hundred N/m |
| Trampoline (whole bed, near the centre) | several thousand N/m |
| Car suspension coil spring | 20,000–50,000 N/m |
| Steel rod 1 m long, 1 cm² cross-section, in tension | about 20,000,000 N/m |
The last row shows that solid materials obey Hooke’s law too, just with enormous stiffness. For a rod, k = EA/L, where E is Young’s modulus (about 200 GPa for steel), A the cross-section and L the length.
Assumptions and limits
- The limit of proportionality. Beyond a certain extension the graph stops being a straight line. Go further, past the elastic limit, and the spring is permanently stretched. Rubber bands never really follow Hooke’s law: their force–extension curve is S-shaped.
- Light spring. The bounce formula assumes the spring’s own mass is small compared with m. If it is not, add about one third of the spring’s mass to m.
- No damping. Real bounces die away because of friction and air resistance; the period stays almost the same.
Everyday uses
- School practicals: the GCSE required practical hangs masses on a spring, plots force against extension and finds k from the gradient.
- Weighing: spring balances and luggage scales turn extension into a force reading.
- Engineering: sizing springs for suspensions, mattresses, valves and door closers.
Pull back the spring plunger in Notebook Pinball to feel stored elastic energy become the ball’s kinetic energy, notice that the rope in Swing Across behaves as a stiff spring that stretches a few centimetres under load, and see springs push the pins down in Pick the Lock.
Worked example
One corner of a family car rests on a coil spring with a stiffness of 30 N/mm (30,000 N/m) and carries about 350 kg. Driving over a bump squashes it a further 5 cm. What extra force does that make, and how fast does the car bounce?
| Spring constant (stiffness) | 30000 N/m |
|---|---|
| Extension or compression | 5 cm |
| Mass on the spring (optional, for bouncing) | 350 kg |
| Spring force | 1500 N |
| Elastic potential energy stored | 37.5 J |
| Mass that would hang at this stretch | 152.9 kg |
| Bounce period with the mass | 0.6787 s |
| Bounce frequency | 1.473 Hz |
The spring pushes back with an extra 1,500 N and stores 37.5 J. With 350 kg on it the corner would bounce about 1.5 times a second (a period of 0.68 s). Car makers aim for roughly 1–1.5 Hz because it feels close to a comfortable walking rhythm; the shock absorbers then damp the bounce out within one or two cycles.
Frequently asked questions
- What is Hooke’s law?
- The force needed to stretch or compress a spring is proportional to the distance it moves: F = kx. A spring with k = 40 N/m stretched by 5 cm (0.05 m) pulls back with 2 N.
- How do you find the spring constant?
- Hang known weights on the spring and measure the extension. k = force ÷ extension, or the gradient of a force–extension graph. If a 0.5 kg mass (4.9 N) stretches a spring by 12 cm, k = 4.9 / 0.12 ≈ 41 N/m.
- What is the formula for elastic potential energy?
- E = ½kx². A spring with k = 200 N/m compressed by 10 cm (0.1 m) stores ½ × 200 × 0.1² = 1 J.
- What is the limit of proportionality?
- The point beyond which extension is no longer proportional to force, so the force–extension graph curves. Slightly further is the elastic limit, after which the spring will not return to its original length.
- Does Hooke’s law apply to rubber bands?
- Only roughly, and only for small stretches. Rubber’s force–extension curve is S-shaped, and it also loses energy as heat when it is stretched and released, which is why it warms up.
- What are the units of the spring constant?
- Newtons per metre (N/m) in SI. Engineers often quote springs in N/mm, which is 1,000 N/m, or in pounds-force per inch: 1 lbf/in ≈ 175 N/m.
Sources
- Hooke’s law, Wikipedia
- Hooke’s law, Britannica
- Simple harmonic motion, Wikipedia
- Elastic potential energy, HyperPhysics (Georgia State University)
Related calculators
- Potential Energy Calculator: How much energy does it take to lift something, and how much does it give back when it falls? Enter a mass and a height to get the gravitational potential energy.
- Pendulum Period Calculator: How long does a pendulum take to swing there and back? Enter its length, and its swing angle if it swings wide, to get the period and frequency.
- Force Calculator: How much force does it take to speed something up? Enter a mass and an acceleration to get the force in newtons, using Newton’s second law.
Checked against the sources above. Last reviewed 2026-11-11. Calculators give estimates from standard formulas; see our disclaimer.


