Skip to content
MoneyDeck

Hooke's Law Calculator

Solve F = kx for spring force, spring constant or extension

Updated · Free, no signup

N/m

Stiffness: the force needed per metre of stretch.

Distance from the spring’s natural (unloaded) length.

Answer

F = 50 N

Spring force (F)

50 N

Spring constant (k)

200 N/m

Extension (x)

0.25 m

Extension (x)

25 cm

Elastic potential energy (½kx²)

6.25 J

Equivalent hanging mass on Earth

5.0986 kg

  • Stretching or compressing this spring by 25 cm stores 6.25 J of elastic energy.
  • The same 50 N force equals the weight of about 5.099 kg hanging from the spring on Earth.

Spring force (N) vs extension (m)

About the Hooke's Law Calculator

This Hooke's law calculator solves the spring equation F = kx in any direction. Pick what you want to find — the force a spring exerts, its spring constant (stiffness) or how far it stretches or compresses — and enter the other two values. Extension can be typed in metres, centimetres, millimetres, feet or inches and is converted to SI units automatically.

It is aimed at physics students working through spring problems, teachers building lab worksheets, and makers or engineers sizing a spring for a mechanism. Alongside the answer you get the elastic potential energy stored in the spring (½kx²) and the mass that would hang from it in Earth gravity to produce the same force, which is handy when you calibrate a spring with weights.

Hooke's law only holds inside a spring's elastic limit, where the force-extension graph is a straight line. Stretch a real spring too far and it deforms permanently, so treat very large extensions with caution.

How to use the hooke's law calculator

  1. 1Choose whether you want the force, the spring constant or the extension.
  2. 2Pick the length unit you measured the stretch in.
  3. 3Enter the two known values.
  4. 4Read the answer, then check the stored energy and equivalent hanging mass.
  5. 5Use the force-extension chart to see the linear relationship.

Formula and method

F = k · x E = ½ · k · x²

Hooke's law says the restoring force of an ideal spring is proportional to how far it is displaced from its natural length: F = kx. Strictly the force points back toward equilibrium, so it is often written F = −kx; this calculator reports the magnitude. Rearranging gives k = F ÷ x and x = F ÷ k.

The energy stored in a stretched or compressed spring is the area under the force-extension line, a triangle with area ½ × x × kx = ½kx². All lengths are converted to metres first, so force is in newtons, k in N/m and energy in joules. The hanging-mass figure divides the force by standard gravity (9.80665 m/s²).

F
Spring force (N)
k
Spring constant or stiffness (N/m)
x
Extension or compression from natural length (m)
E
Elastic potential energy (J)

Worked examples

Force from a 200 N/m spring stretched 25 cm

Converting 25 cm to 0.25 m, the force is 200 × 0.25 = 50 N. The stored energy is ½ × 200 × 0.25² = 6.25 J, and 50 N is the weight of about 5.1 kg.

Spring constant from a lab measurement

A 30 N load stretches the spring 4 cm (0.04 m), so k = 30 ÷ 0.04 = 750 N/m. The spring then holds ½ × 750 × 0.04² = 0.6 J of energy.

Compression of a stiff 25,000 N/m spring under 1,200 N

x = F ÷ k = 1,200 ÷ 25,000 = 0.048 m, or 4.8 cm. The energy stored is ½ × 25,000 × 0.048² = 28.8 J.

Frequently asked questions

What is Hooke's law?+

Hooke's law states that the force needed to stretch or compress a spring is proportional to the distance it moves from its natural length, F = kx, as long as the spring stays within its elastic limit.

What are the units of the spring constant?+

In SI units the spring constant k is measured in newtons per metre (N/m). A spring with k = 500 N/m needs 500 N of force to stretch it one metre, or 5 N to stretch it one centimetre.

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

The minus sign shows the spring force acts opposite to the displacement: stretch a spring to the right and it pulls back to the left. For magnitudes, as in this calculator, the sign is dropped.

How do I find the spring constant experimentally?+

Hang known masses from the spring, measure each extension, and plot force (mass × 9.81) against extension. The slope of the straight-line part of the graph is k.

How much energy does a spring store?+

A spring stores elastic potential energy E = ½kx². Doubling the extension quadruples the stored energy, which is why heavily compressed springs can be dangerous to release.

When does Hooke's law stop working?+

Beyond the elastic limit (or limit of proportionality) the force-extension graph curves and the spring may be permanently deformed. Rubber bands and many materials are non-linear even at small stretches.

Related tools