Hookes Law

Solve Hooke’s law for spring force, stiffness, or displacement and calculate ideal elastic potential energy.

Hooke’s law for an ideal linear spring

Within its linear elastic range, an ideal spring produces a restoring force proportional to displacement from equilibrium. This calculator works with magnitudes: |F| = k|x|.

The restoring-force vector has the opposite direction from displacement, written F = −kx. Stored elastic potential energy is ½kx² when zero energy is defined at the equilibrium position.

How to use the spring calculator

  1. Choose the unknown: Select force magnitude, spring constant, or displacement magnitude.
  2. Enter known magnitudes: Use newtons, newtons per meter, and meters.
  3. Calculate: Review the solved property and the associated elastic potential energy.
  4. Check linear range: Confirm the spring has not exceeded its proportional or elastic limit.

Formula and variables

Force magnitude is proportional to displacement magnitude. Energy is the area under the linear force–displacement curve.

|F| = k|x|; U = ½kx²
FSpring force
Restoring-force magnitude (N)
kSpring constant
Linear stiffness (N/m)
xDisplacement
Magnitude from equilibrium length (m)
UElastic potential energy
Ideal stored deformation energy (J)

Half-meter extension

An ideal spring with k = 100 N/m is displaced by 0.5 m.

Spring constant
100 N/m
Displacement
0.5 m
  1. |F| = 100 × 0.5
  2. U = ½ × 100 × 0.5²

Result: Force magnitude is 50 N and stored energy is 12.5 J.

The restoring force points opposite the displacement even though the displayed magnitude is positive.

Understanding your results

Magnitude does not show direction

Use a coordinate sign convention separately when a force vector is required.

  • Zero displacement gives zero force and zero stored energy.
  • Doubling displacement doubles force but quadruples stored energy.
  • A measured nonlinear force curve cannot be represented by one constant k over the whole range.

Assumptions

  • The spring or elastic system is linear over the entered displacement.
  • The spring constant is positive and constant.
  • Energy zero is defined at equilibrium and dissipative losses are ignored.

Limitations

  • Does not model damping, preload, hysteresis, plastic deformation, coil binding, buckling, or nonlinear stiffness.
  • Does not include spring mass, oscillation dynamics, or multiple-spring arrangements.
  • Uses nonnegative magnitudes rather than signed vector components.

Common mistakes

  • Using centimeters as though they were meters.
  • Forgetting that restoring force direction opposes displacement.
  • Applying one k value beyond the measured linear range.
  • Using U = kx² instead of ½kx².

Practical use cases

Spring mechanics education

Solve ideal force, displacement, stiffness, and energy examples.

Linear-range screening

Check a preliminary calculation when stiffness and displacement are already validated.

Frequently asked questions

Why is Hooke’s law sometimes written with a minus sign?

F = −kx represents the restoring-force direction opposite displacement. This calculator reports magnitudes.

Can force or displacement be zero?

Yes. At equilibrium, both force magnitude and displacement are zero and the stored elastic energy is zero.

Does every spring obey Hooke’s law?

Only approximately within a range where force is proportional to displacement.

Sources and review

Reviewed 2026-07-13.

Continue with calculators that answer nearby questions and help compare the next step.