StatGardenREF. DESK
Calculators/Physics/Hooke's law & spring energy
Physics

Hooke's law & spring energy calculator

Restoring force and stored energy of a stretched or compressed spring.

Published 6 August 2026 · Updated 14 August 2026

What this calculator does

Elastic potential energy is the energy stored in a spring, elastic band or any other elastic object when it is stretched or compressed away from its natural, resting length. That stored energy is what gets released as motion when the object is let go, from a simple spring toy to a bow releasing an arrow.

This calculator uses Hooke’s law, F = kx, for the restoring force a spring pushes back with, and PE = ½kx² for the elastic potential energy stored at that displacement. Both formulas share the same two inputs, the spring constant and the displacement from rest, which is why this calculator reports force and stored energy together rather than as two separate tools.

The formula

FormulaF = kx; Elastic PE = ½kx²

The restoring force is the spring constant multiplied by displacement from rest: F = kx. Elastic potential energy is one half the spring constant multiplied by displacement squared: PE = ½kx². Because displacement is squared in the energy formula but not in the force formula, energy grows faster than force does as a spring stretches further.

TermMeaning
k (spring constant)How stiff the spring is, in newtons per metre: the force needed to stretch or compress it by one metre.
x (displacement)How far the spring has been stretched or compressed away from its natural, unloaded length.
Elastic potential energyThe energy stored in the spring at that displacement, in joules: PE = ½kx².

The inputs explained

FieldWhat to enter
Spring constant (N/m)The spring constant, a measure of stiffness: higher values mean a stiffer spring that pushes back harder for the same stretch.
Displacement from rest (m)How far the spring is stretched or compressed from its natural, unloaded length.

When to use it

Designing a spring for a known force or energy target

Rearranging this relationship in reverse, a required stored energy or restoring force at a given displacement points to the spring constant a design needs, before a real spring is chosen or ordered.

Understanding archery or catapult mechanics

A bow or a slingshot stores elastic potential energy while drawn back, which converts into the kinetic energy of the projectile on release; the draw distance directly determines how much energy is available.

Checking a suspension or mounting spring

Vehicle suspension and vibration-isolating mounts rely on a spring’s stiffness and the resulting stored energy to absorb impacts smoothly rather than transmitting them directly.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How does elastic potential energy change with spring stiffness?

A fixed displacement, across a range of spring constants.

0.05 m displacement from rest
Spring constantRestoring forceElastic potential energy
50 N/m2.500 N0.0625 J
100 N/m5.000 N0.1250 J
250 N/m12.500 N0.3125 J
500 N/m25.000 N0.6250 J
1000 N/m50.000 N1.250 J
2000 N/m100.000 N2.500 J
At the same 0.05 m stretch, both force and stored energy rise in direct proportion to stiffness: a 250 N/m spring stores 0.3125 J, while a four-times-stiffer 1,000 N/m spring stores exactly four times as much, 1.25 J.

How does elastic potential energy change with displacement?

A fixed spring constant, across a range of displacements.

250 N/m spring constant
Displacement from restRestoring forceElastic potential energy
0.01 m2.500 N0.0125 J
0.02 m5.000 N0.0500 J
0.05 m12.500 N0.3125 J
0.1 m25.000 N1.250 J
0.15 m37.500 N2.813 J
0.2 m50.000 N5.000 J
Stored energy grows with the square of displacement: doubling the stretch from 0.05 m to 0.1 m more than doubles the energy, from 0.3125 J to 1.25 J, a fourfold increase, while force only doubles over the same change.

Questions

Why is energy squared in displacement but force is not?

Force at any instant only depends on how far the spring is stretched right then, so it scales linearly with displacement. Energy is the accumulated work done stretching the spring from zero to that displacement, and because force itself was rising the whole way there, the total work done, and therefore the stored energy, ends up scaling with displacement squared.

Does this formula apply to compression as well as stretching?

Yes, for an ideal spring. Hooke’s law and the elastic potential energy formula both use displacement from the natural length in either direction, so a compressed spring stores the same energy as a stretched one at the same magnitude of displacement.

What happens if a spring is stretched beyond its elastic limit?

Hooke’s law only holds within a spring’s elastic limit. Stretch it further and the spring deforms permanently, no longer returning to its original length, and the simple F = kx and PE = ½kx² formulas stop accurately describing it.

Where does the stored energy go when a spring is released?

It converts into kinetic energy (motion) of whatever the spring is attached to, assuming no friction or other losses, which is the basis of a mass-spring oscillator continuing to bounce back and forth.

To see how that stored energy converts into oscillation, with period and maximum speed, see the mass-spring oscillator calculator.