Hooke’s law calculator
Enter any two values, get the third and the spring energy.
What is Hooke’s law?
The force a spring exerts is proportional to how far it is stretched or compressed from its equilibrium length: F = −k·x. The minus sign means the force pulls back toward equilibrium, opposite the displacement.
What is the spring constant?
k measures stiffness — the force per unit of stretch, in newtons per meter (or pounds per inch). A spring that stretches 0.1 m under 20 N has k = 20 ÷ 0.1 = 200 N/m.
How much energy does a spring store?
U = ½·k·x². The 200 N/m spring stretched 0.1 m stores ½ × 200 × 0.1² = 1 joule.
How do I use the calculator?
Fill in any two of force, spring constant and displacement and leave the third blank. The calculator works with sizes only; the minus sign in F = −kx is about direction.
When does Hooke’s law stop working?
Only within the elastic range. Stretch a spring too far and it deforms permanently, and force is no longer proportional to stretch.
How do I find the spring constant from a hanging weight?
At rest the spring force balances the weight, so k = mg ÷ x. A 2.0 kg mass that stretches a spring 0.15 m weighs 2.0 × 9.80665 = 19.61 N, so k = 19.61 ÷ 0.15 = 130.8 N/m. Ignore the spring’s own mass, and remember that x is the stretch from the natural length, not the length of the spring under load.
How much work does it take to stretch a spring further?
The work you do equals the change in stored energy, ½k(x₂² − x₁²); the work done by the spring itself is the negative of that (OpenStax University Physics, Volume 1, section 7.1, Eq. 7.5). In OpenStax Example 7.5 a spring stretched 6 cm stores 0.54 J, so k = 300 N/m; stretching it on to 12 cm needs 1.62 J more, three times as much as the first 6 cm (0.54 J), because the energy grows with the square of the stretch.
How fast does a mass on a spring oscillate?
The period is T = 2π√(m ÷ k), independent of the amplitude (OpenStax University Physics, Volume 1, section 15.1, Eq. 15.10). A 2.00 kg mass on a 32.00 N/m spring has T = 1.57 s (OpenStax Example 15.2).
The formula and what it assumes
Hooke’s law says the force of a spring is proportional to its displacement from the unstretched position: F = −kx (OpenStax University Physics, Volume 1, section 7.1 and section 15.1). The minus sign makes the force a restoring one, opposite to the displacement; the calculator works with sizes only. The energy stored is U = ½kx² (section 8.1, Eq. 8.7). The law holds only in the linear range: beyond the proportionality limit force and stretch are no longer in proportion, and beyond the elastic limit the spring is permanently deformed (section 12.4).
Worked example: a spring that stretches 2.5 in under 15 lbf
Choose US units and enter F = 15 and x = 2.5. The spring constant is k = 15 ÷ 2.5 = 6.0 lbf/in. The stored energy is ½ × 6.0 × 2.5² = 18.75 in·lbf, which is 2.118 J. Note that F × x = 37.5 in·lbf is twice that: the force rises from zero to 15 lbf during the stretch, so the work is the average force, half of 15 lbf, times the distance.
Common mistakes
The first is entering the length of the stretched spring instead of the displacement: a spring 10 in long that is pulled to 12.5 in has x = 2.5 in, not 12.5. The second is forgetting the ½ in the energy, or using F × x, which is double the stored energy. The third is mixing units, such as a spring constant in lbf/in with a displacement in meters; choose one system and the calculator converts the others.
Sources: OpenStax University Physics, Volume 1, sections 7.1 (work; Hooke’s law; Example 7.5), 8.1 (elastic potential energy, Eq. 8.7), 12.4 (elasticity and plasticity) and 15.1 (simple harmonic motion, Eq. 15.10); the pound-force (4.448222 N) and standard gravity (9.80665 m/s²) are from NIST SP 811, Appendix B.8. Related: potential energy calculator, Young’s modulus calculator, work calculator and pendulum calculator.