Hooke's law and spring energy
An ideal spring pulls or pushes back with a force proportional to how far it is stretched or compressed: F = kx, where k is the spring constant in N/m and x is the displacement from the relaxed length in meters. Because the force opposes the displacement it is often written F = −kx; this calculator works with magnitudes.
The work done stretching the spring is stored as elastic potential energy U = ½kx². Doubling the stretch doubles the force but quadruples the stored energy.
Worked example
A spring with k = 500 N/m is stretched 10 cm. Convert to meters: x = 0.1 m. Force F = 500 × 0.1 = 50 N. Stored energy U = ½ × 500 × 0.1² = 2.5 J.
To find k from a test, hang a known weight and measure the stretch: 50 N stretching a spring 100 mm gives k = 50 ÷ 0.1 = 500 N/m.
Solving k or x from elastic potential energy
Rearranging U = ½kx² gives k = 2U ÷ x² when you know the energy and the stretch, and x = √(2U ÷ k) when you know the energy and the spring constant.
Example: a spring stores 2.5 J when compressed 10 cm. k = 2 × 2.5 ÷ 0.1² = 500 N/m. A 500 N/m spring holding 2.5 J is stretched x = √(2 × 2.5 ÷ 500) = 0.1 m, and pushes back with F = 500 × 0.1 = 50 N.
Limits
Hooke's law applies only in the elastic range. Past the elastic limit the spring deforms permanently and force is no longer proportional to extension. Rubber bands and many soft materials are noticeably non-linear even at small stretches.