Hooke’s law says that a spring’s force is proportional to how far it is stretched or compressed from its rest length. This calculator solves the law for the force, the spring constant or the displacement, and lets you choose whether the force is the spring’s own pull (with the minus sign) or the force you apply to it. It also reports the force’s direction and the elastic energy stored.
How to use the Hooke’s law calculator
- Under Solve for, choose Force, Spring constant or Displacement.
- Pick the Sign convention: Spring’s force (F = −kx) for the restoring force the spring exerts, or Applied force (F = kx) for the force you must exert to hold it deformed.
- Enter the known values. Spring constant (k) accepts N/m, N/cm, N/mm, kN/m, lbf/in or lbf/ft. Displacement from rest length (x) accepts m, cm, mm, in or ft and is positive for stretching, negative for compressing.
- Choose the result unit. The tape adds the force magnitude in N and lbf, the elastic energy stored and a plain-language direction.
The spring constant must be greater than zero. When solving for k, a zero displacement is rejected, as are a force and displacement whose signs do not match the chosen convention.
Hooke’s law formula
Worked example
A spring with k = 200 N/m is stretched 5 cm (x = +0.05 m).
Spring's force: F = −200 × 0.05 = −10 N (2.248 lbf pulling back toward rest length).
Stored energy: U = ½ × 200 × 0.05² = 0.25 J.
Switch to the applied convention and the same spring reads +10 N, the pull your hand supplies. Compress it by 3 cm instead (x = −3 cm) and the restoring force becomes +6 N, pushing outward, with 0.09 J stored.
Which sign convention should you use?
Both describe the same spring; they answer different questions. The restoring form, F = −kx, describes the force the spring exerts on whatever is attached. Use it in equations of motion, such as a mass bouncing on a spring, where getting the direction right makes the oscillation come out. The applied form, F = kx, describes the force you exert to hold the spring at x. It is what spring catalogs, testing machines and most engineering spring-rate charts use, and it keeps F and x positive in everyday problems.
The magnitude is identical either way, and so is the energy, because x² is positive whether the spring is stretched or compressed.
Spring constant units
The spring constant (or spring rate) is force per unit of deformation. In SI it is newtons per meter. Useful equivalents: 1 N/cm = 100 N/m, 1 N/mm = 1,000 N/m, and 1 lbf/in ≈ 175.13 N/m. A 20 lbf/in compression spring compressed 1.5 in pushes back with 30 lbf (133.4 N) and stores about 2.54 J.
Springs in series and parallel
Real assemblies often combine springs. Side by side, they share the load and each stretches the same amount, so their stiffnesses add. End to end, they carry the same force and their stretches add, so their flexibilities (1/k) add:
Two 200 N/m springs in parallel act like one 400 N/m spring: at 5 cm they exert 20 N and store 0.5 J. In series they act like 100 N/m, giving 5 N and 0.125 J at the same total stretch, with each spring stretched only 2.5 cm. The same logic explains why cutting a coil spring in half doubles the stiffness of each piece. Work out the combined k first, then enter it in the calculator.
The elastic limit
Robert Hooke published the law in 1678 as the Latin phrase “ut tensio, sic vis” — as the extension, so the force. It holds only for small deformations. Push a spring past its elastic limit and the wire yields: it no longer returns to its original length, and the force–stretch line bends. Coil springs can also bottom out when the coils touch. Treat any result near a spring’s rated maximum deflection with caution.
For the energy side in more detail, see the elastic potential energy calculator; to weigh an object with a spring scale, combine this page with the weight calculator.
Frequently asked questions
Why is there a minus sign in F = −kx?
It shows that the spring's force points opposite to its displacement. Stretch a spring in the positive direction and it pulls back in the negative direction; compress it and it pushes outward. A 200 N/m spring stretched 5 cm exerts −10 N.
How do I find the spring constant?
Hang or apply a known force, measure the change in length, and divide: k = F ÷ x. A 15 N load that stretches a spring by 3 cm gives k = 500 N/m, which is 5 N/cm or about 2.86 lbf/in.
What is the elastic limit of a spring?
The largest deformation a spring can take and still return to its original length. Beyond it the material yields, the spring takes a permanent set, and force is no longer proportional to stretch, so Hooke's law no longer applies.
How much energy does a stretched spring store?
U = ½kx², whichever way the spring is deformed. A 200 N/m spring stretched 5 cm stores 0.5 × 200 × 0.05² = 0.25 J. Doubling the stretch quadruples the energy.
What is the spring constant of two springs combined?
Side by side (parallel), add them: k = k₁ + k₂. End to end (series), add the reciprocals: 1/k = 1/k₁ + 1/k₂. Two 200 N/m springs give 400 N/m in parallel but only 100 N/m in series.