Physics · Mechanics · Motion & Energy

Hooke’s law calculator — spring force and stiffness

Calculate force, stiffness or deformation of a linear spring using magnitudes. Displacement is measured from the unloaded rest position.

Created v1.0

By Thibaut Grzelak, Mechanical Analysis Engineer

Mechanics · Motion & Energy
01Calculation inputsF = kx
kxx = 0F
Dashed block: unloaded rest position. x measures the shift to the solid block. F is the applied force; the restoring force points the other way.
02

Results

Spring stiffness
—

Force increment per unit displacement.

Displacement
—

Extension or compression magnitude from the unloaded rest position.

Stored elastic energy
—

Energy relative to the undeformed spring, shown as a secondary result.

Relation and numerical substitutionF = kx

—

Linear elastic spring with constant positive stiffness. Quasi-static force balance; x is measured from the unloaded spring length.

01Formulas and symbols

Formulas used

FF = kxMagnitudes: F = kx.
kk = F/xFind stiffness from force and nonzero displacement.
xx = F/kFind displacement from force and positive stiffness.
UU = ½kx²Stored energy is the area under the linear force–displacement curve.
02Assumptions and limits

Scope of validity

  • Linear elastic spring with constant positive stiffness.
  • Quasi-static force balance; x is measured from the unloaded spring length.
03Validation example

Reference numerical case

  1. Given k = 200 N/m and x = 50 mm = 0.05 m, find the force and stored energy.
  2. F = 200 × 0.05 = 10 N; U = ½ × 200 × 0.05² = 0.25 J. Inverse modes give k = 200 N/m and x = 0.05 m.
04References

FAQ

What is the difference between the applied force and the spring restoring force?

For a signed displacement, the spring restoring force is Fₛ = −kx and points back toward equilibrium. This calculator reports positive magnitudes and uses F = kx for the applied force that balances the spring quasi-statically.

What displacement should I enter in Hooke’s law?

Enter the change in spring length from its unloaded rest position, not the total spring length. A preload or a different equilibrium reference requires a separate model.

05How it works

At constant stiffness k, doubling displacement doubles the applied force and quadruples stored energy. A stiffness of 200 N/m means an additional 1 mm requires an additional 0.2 N in the linear range.

The calculator uses nonnegative magnitudes. With a signed displacement, the restoring force is Fₛ = −kx: it points opposite the displacement. The diagram’s F is the applied force, not the restoring force.

06Limits of the model

This relation does not model hysteresis, plastic deformation, coil contact or changing stiffness.

With an existing preload, the unloaded length and loaded equilibrium differ. Use increments about equilibrium for an incremental relation; this calculator has no preload input.

07Common mistakes

1 N/mm equals 1000 N/m, not 1 N/m.

Enter the change in length, not the total spring length. The dashed position marks the unloaded reference.

A magnitude calculation cannot determine the direction of a vector force.