Science & engineering

Spring force energy and work calculator

Keep signed restoring force separate from stored energy and work between two displacements.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your numbers and select Calculate.

Try it, understand it

Explore the result

Compare force direction, stored energy and endpoint work using one unstressed displacement reference.

Worked example comparison
ExampleOutputWhat to notice
Stretch from 0 to +0.1 mFinal restoring force-20 NFinal restoring force is −20 N, stored energy 1 J and external work +1 J.
Compress from 0 to −0.1 mFinal restoring force20 NForce reverses to +20 N while the final stored energy remains 1 J.
Relax from +0.2 m to +0.1 mFinal restoring force-20 NStored energy falls from 4 J to 1 J; quasi-static external work is −3 J.

Check your understanding

Why not multiply final force by travel?

The linear-spring force changes along the path; use the difference of ½kx² endpoint energies.

Can nonzero travel have zero net spring work?

Yes. Opposite equal-magnitude endpoint displacements have equal stored energy.

Behind the numbers

How this calculation works

Normalize signed displacements relative to the unstressed spring. Force reverses with displacement, whereas stored energy depends on its square. Work compares endpoint energies rather than multiplying the final force by the whole travel.

THE FORMULARestoring force = −kx; stored energy = ½kx²; quasi-static external work = Ufinal − Uinitial

A worked example

For k = 200 N/m and a change from 0 to +0.1 m, the final restoring force is −20 N, stored energy is 1 J and quasi-static external work is +1 J. Returning to zero reverses the work sign.

Good to know

Ideal positive-stiffness linear spring within an assumed Hooke-law range. No preload, damping, plasticity, material limit, gravitational energy or attached-mass dynamics.

The sign of force and the sign of energy answer different questions

For the default 200 N/m spring at +0.1 m, restoring force is −20 N and stored energy is 1 J. At −0.1 m, restoring force is +20 N but stored energy is still 1 J. Force points toward the unstressed reference; squaring displacement makes both equal-size deformations store the same energy.

The coordinate must be measured from the unstressed spring reference used by this model. A spring holding a mass vertically may already be stretched at its gravity-loaded equilibrium. Entering a displacement from that shifted equilibrium without accounting for the reference would describe a different energy question.

The kinetic energy calculator covers a separate motion term. Elastic spring energy depends on deformation relative to the unstressed reference, not automatically on an attached object’s speed.

Work uses the energy difference, not final force times travel

Moving quasi-statically from 0 to +0.1 m needs +1 J of external work in the ideal spring-only model. Multiplying the final 20 N force by the 0.1 m travel gives 2 J and overstates the answer because the force grows from zero throughout the change.

Starting at +0.2 m instead gives an initial 4 J. Ending at +0.1 m leaves 1 J, so external work is −3 J and the spring does +3 J. Moving between −0.1 m and +0.1 m leaves endpoint energy unchanged; nonzero travel does not by itself imply positive net work by a conservative spring.

Stiffness units can hide a factor of one thousand

A stiffness of 0.2 N/mm equals 200 N/m. With an entered final deformation of 100 mm, the result is the same −20 N and 1 J as the default SI example. Both displacement and stiffness units are converted before the force and energy are calculated.

The kinetic energy calculator addresses the motion of an attached object, which this page does not simulate. The gravitational potential energy calculator adds a different energy term when height changes. Here the work interpretation assumes a quasi-static deformation, no change in kinetic energy and no damping or other energy terms.

A few questions, answered

Can compression be entered as negative displacement?

Yes. Use one consistent signed coordinate relative to the unstressed reference. The restoring force reverses and stored energy remains non-negative.

Can external work be negative?

Yes. It is Ufinal − Uinitial under the stated quasi-static assumptions. The spring can return energy as deformation decreases.

Is this an oscillation or material-strength calculator?

No. It does not model mass motion, preload, damping, coil binding or an elastic limit.

Does equal initial and final stored energy mean no travel?

No. Equal-magnitude opposite displacements have equal stored energy while representing different positions.

Find your calculator

Start typing to explore the library.