Hooke's Law Calculator

Enter two of spring force, spring constant and extension to find the third, or start from stored energy U to find k or x, with the spring energy shown.

Spring force50.0000 N
N/m

1e-12 – 1000000000000

0 – 1000000000

Spring force

50.0000 N

  • Force50.0000 N
  • Spring constant500.0000 N/m
  • Extension or compression0.1000 m
  • Elastic potential energy2.5000 J

Hooke's law holds only within the spring's elastic (linear) range. The spring pushes back opposite to the displacement, which is why it is often written F = −kx; this calculator reports magnitudes.

How this was calculated

x = 10 cm = 0.1 m.

F = k × x = 500 N/m × 0.1 m = 50 N.

Stored energy U = ½kx² = ½ × 500 × 0.1² = 2.5 J.

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.

References

Frequently asked questions

What are the units of the spring constant?

Newtons per meter (N/m). A spring with k = 500 N/m needs 500 N to stretch it one meter, or 5 N per centimeter.

Why is there a minus sign in F = −kx?

It shows direction: the spring's force points opposite to the displacement, pulling back toward the rest length. The size of the force is kx.

Does the energy formula work for compression too?

Yes. U = ½kx² is the same whether x is a stretch or a compression, as long as the spring stays in its linear range.

Last updated . Results are estimates for informational purposes only.