Solve for
Spring constant
Energy (U)Calculated below
Optional: energy change from a starting stretch
A spring with k = 50 N/m stretched 0.15 m stores 0.5625 J of elastic potential energy.
Hooke's law (F = kx) holds only below the spring's elastic limit. Past it the spring is permanently deformed and this formula no longer applies. Rubber bands and bungee cords are not linear, so for them the result is a rough estimate.
0.5625 J
Elastic energy U
= 0.41488 ft·lbf
7.5 N
Force F = kx
= 1.6861 lbf
In SI units: k = 50 N/m, x = 0.15 m, U = 0.5625 J, F = 7.5 N.
The energy in every unit
EnergyValue
Joules (J)0.5625
Millijoules (mJ)562.5
Kilojoules (kJ)0.0005625
Foot-pounds (ft·lbf)0.414879
Calories (cal)0.134441
Double the stretch (0.3 m) and the spring stores 4 times as much: 2.25 J. Energy grows with the square of x.
Show the math
FormulaU = ½ × k × x², with U in joules (J), k in newtons per meter (N/m) and x in meters (m). Rearranged: k = 2U / x² and |x| = √(2U / k). From a force: k = F / x and U = ½ × F × x.
Why the ½Stretching a spring from 0 to x, the force grows from 0 to kx, so the average force is ½kx. Work = average force × distance = ½kx × x = ½kx².
What x isx is the change from the rest length, not the total length. Stretching and compressing by the same amount store the same energy, because x is squared.
Convert to SIYour inputs are already in N/m, m, N and J.
Your numbersU = ½ × 50 N/m × (0.15 m)² = 0.5625 J
Spring forceF = k × |x| = 50 N/m × 0.15 m = 7.5 N. It points back toward the rest length (F = -kx).
Gravity instead of a spring? See the potential energy calculator.

Short answer: Elastic potential energy is U = ½ × k × x²: the spring constant k in newtons per meter, times the square of the stretch x in meters, halved. The result is in joules. A spring with k = 50 N/m stretched 0.15 m stores 0.5625 J of elastic potential energy.

Most wrong answers come from three slips: leaving the stretch in centimeters or inches, entering the spring’s total length instead of how far it moved from rest, and dropping the half or the square. Spring potential energy is the same quantity under another name. The calculator converts the units, solves for energy, k or stretch, and shows your numbers substituted so you can check your own working.

0.5625 J
Spring energy
For k = 50 N/m stretched 0.15 m.
0.4149 ft-lbf
Same energy
In foot-pounds of force.
7.5 N
Spring force
The pull at that stretch, from F = kx.
2.25 J
At double the stretch
0.3 m stores 4 times as much.

This article contains Amazon affiliate links. 33science earns a commission on qualifying purchases. See our affiliate disclosure.

How to use the elastic potential energy calculator

Choose what to solve for.
Pick energy, spring constant k or stretch x. A fourth option finds k from a measured force and stretch.
Enter k and the stretch with their units.
k takes N/m, N/cm, N/mm or lbf/in. The stretch takes m, cm, mm, in or ft and is measured from the rest length. Compression and stretch give the same energy.
Read the energy and the force.
The result shows in joules or your chosen unit, with the converted SI values and the spring force F = kx under it.
Add a mass or a second stretch if you need them.
A mass gives the launch speed when the spring releases. A starting stretch gives the energy change between two stretches. Open Show the math to copy or print the working.

Elastic potential energy formula: U = ½kx²

The elastic potential energy formula, also called the spring energy formula, is U = ½ × k × x². U is the stored energy in joules, k is the spring constant in newtons per meter and x is the displacement from the rest length in meters (OpenStax University Physics). It applies to any object that obeys Hooke’s law, which means the force is proportional to the stretch.

Worked example: a spring with k = 50 N/m stretched 0.15 m. U = ½ × 50 N/m × (0.15 m)² = 0.5625 J, or 0.4149 ft-lbf. The spring pulls back with F = kx = 7.5 N at that stretch.

StretchStretch (m)Energy (J)Compared with the first row
1 ×0.150.56251 ×
2 ×0.32.254 ×
3 ×0.455.0639 ×
Key point
Energy grows with the square of the stretch. Doubling the stretch quadruples the energy and tripling it multiplies the energy by nine.

Elastic potential energy is one of the forms of energy in our forms of energy guide. For energy stored by height instead of stretch, use the potential energy calculator.

Why the formula has a half

The force is not constant while you stretch a spring. It starts at zero and rises in a straight line to kx, so the average force is ½kx. Work is average force times distance, which gives ½kx × x = ½kx², and that work is the energy the spring stores (HyperPhysics).

You can check it with the worked example. The final force is 7.5 N, and half of that times 0.15 m is 0.5625 J. Using the full 7.5 N would overstate the energy by a factor of two.

Stretch, compression and the rest length

Compression uses the same formula as stretching. The stretch x is squared, so a negative displacement gives the same positive energy, and elastic potential energy is never negative. A spring squeezed 0.15 m stores 0.5625 J, the same as one stretched that far (OpenStax).

Careful
Use the displacement from the rest length, not the spring’s total length. A spring that measures 20 cm and has a rest length of 15 cm has been stretched 5 cm.

To get the energy between two stretches, subtract the two energies. Do not square the difference in stretch. With k = 4 N/cm (400 N/m), 0.18 J is stored at 3 cm and 0.72 J at 6 cm, so the second 3 cm costs 0.54 J, three times the first. For k = 200 N/m, going from 0.1 m to 0.3 m takes 8 J (9 J minus 1 J), not the 4 J that squaring the 0.2 m difference gives.

Units and converting to meters

The formula gives joules only when k is in newtons per meter and x is in meters. A stretch left in centimeters makes the answer 10,000 times too large, because the stretch is squared. The calculator converts for you and shows the SI values under the result (NIST).

InputConversionExample
Stretch in cm or mmDivide by 100 or 1,0006 cm is 0.06 m
Stretch in inchesMultiply by 0.02542 in is 0.0508 m
k in N/cmMultiply by 1004 N/cm is 400 N/m
k in lbf/inMultiply by 175.126810 lbf/in is 1,751.3 N/m

Pound-force per inch works without conversion if you stay in imperial units: k = 10 lbf/in stretched 2 in stores 20 in-lbf. That is 1.667 ft-lbf or 2.26 J (NIST).

Energy unitJoules per unitThe 0.15 m example
Joule (J)10.5625 J
Millijoule (mJ)0.001562.5 mJ
Foot-pound (ft-lbf)1.3558180.4149 ft-lbf
Calorie (cal)4.1840.1344 cal

Find the spring constant or the stretch from the energy

Rearrange U = ½kx² to solve for either unknown. The spring constant k measures stiffness: a larger k means more force, and more energy, for the same stretch.

Solve forFormulaExample
Energy UU = ½ × k × x²A spring with k = 50 N/m stretched 0.15 m stores 0.5625 J of elastic potential energy.
Spring constant kk = 2U / x²A spring that stores 1 J of elastic potential energy when stretched 0.1 m has a spring constant of k = 200 N/m.
Stretch xx = √(2U / k)A spring with k = 4 N/cm that stores 0.72 J of elastic potential energy is stretched or compressed 6 cm from its rest length.
k from force and stretchk = F / x, then U = ½ × F × xA spring that stretches 1.2 cm under a force of 784 N has k = 65,333 N/m and stores 4.704 J of elastic potential energy.

Solving for k needs a stretch other than zero, and solving for x returns a magnitude: the spring can be stretched or compressed by that amount. With U = 1 J and k = 50 N/m the stretch is 0.2 m or 20 cm. The last row is a spring-and-weight case: an 80 kg person settles a car suspension by 1.2 cm, which is a whole-system value and not one coil spring (OpenStax College Physics).

Measure the spring constant of your own spring

Hang a known mass from the spring and measure how far it stretches from its unloaded length. Multiply the mass in kilograms by 9.8 to get the force in newtons, then k = F / x. A pull of 7.5 N that stretches a spring 0.15 m gives k = 50 N/m, and the calculator’s force-and-stretch mode does the division and adds the energy.

A hand holds a ruler beside a steel spring hanging from a shelf with a small cloth bag of coins on its end
Read the stretch against a ruler held beside the spring, from the unloaded length to the loaded length.

For a stiffer spring that a hanging mass barely moves, clamp one end and pull the other with a handheld luggage scale. Read the force, measure the stretch, and repeat at two or three stretches. A scale that reads in pounds is giving pound-force, which the calculator accepts directly; a scale that reads in kilograms needs the 9.8 multiplier. If k comes out about the same each time, the spring is following Hooke’s law.

A hand pulls a handheld digital scale hooked to a long steel spring clamped in a workbench vise
Pull slowly and keep your face clear of the line of the spring, in case the clamp slips.

When the formula stops being accurate

U = ½kx² holds only while force is proportional to stretch. Past the proportionality limit the graph of force against stretch curves, and past the elastic limit the spring stays deformed after release (OpenStax University Physics). No single stretch marks that limit for every spring, so the calculator shows a warning instead of a number. Check the maker’s rated extension if you have it.

Rubber bands and bungee cords are never linear, and they lose energy as heat on each cycle, so the formula gives a rough estimate for them (University of Maryland, Vernier). Real values of k run from a toy to a car suspension:

Springk (N/m)StretchEnergy
Slinky (estimate)610 cm0.03 J
Homemade tubing bungee (one measurement)15.21 m7.6 J
Toy gun spring500.15 m0.5625 J
Car suspension, whole system65,3001.2 cm4.704 J

The table draws on University of Leicester for the Slinky, a BYU demonstration for the tubing and OpenStax for the toy gun and the car. More everyday cases are in our examples of elastic potential energy.

Where the stored energy goes when the spring is released

On release the stored energy becomes kinetic energy of whatever the spring pushes, and with no losses ½kx² = ½mv², so v = √(2U / m). The 2 g ball in a toy gun with k = 50 N/m, compressed 0.15 m, leaves at 23.7 m/s, about 85.38 km/h or 53.05 mph. Friction and the spring’s own mass make real speeds lower. Check the result against the kinetic energy calculator.

First-person view of a hand drawing a wooden recurve bow back with an arrow aimed at a target in the woods
Drawing a bow stores elastic potential energy in the bent limbs, and the arrow carries it away as kinetic energy. Photo by Koray Guler on Unsplash

The stored energy does not depend on mass, only on k and x. Mass decides how fast the energy leaves: a spring with k = 300 N/m compressed 5 cm stores 0.375 J, and it launches a 0.226796 kg mass (half a pound) at 1.818 m/s. A heavier mass leaves slower and a lighter one faster, with the same energy.

Sources

A coil spring that is twisted instead of stretched follows the same linear rule with torque and angle. The torsion spring calculator finds its rate, the torque at an angle and the bending stress.

A spring stores energy of 1/2 k x^2. To find k for a real coil spring from its wire and coil size, use the compression spring calculator.

Frequently asked questions

What is elastic potential energy?

Elastic potential energy is the energy stored in a spring or other elastic object when it is stretched or compressed from its rest length. It is released as kinetic energy when the object springs back.

What is the elastic potential energy formula?

U = 1/2 x k x x^2, where k is the spring constant in newtons per meter and x is the stretch from the rest length in meters. The result is in joules, and k = 50 N/m stretched 0.15 m gives 0.5625 J.

How do you calculate spring potential energy?

Convert k to newtons per meter and the stretch to meters, square the stretch, multiply by k and halve it. A spring with k = 50 N/m stretched 0.15 m stores 0.5625 J.

Why is there a 1/2 in the elastic potential energy formula?

The spring force rises from zero to kx as the spring stretches, so the average force is 1/2 kx. Work is average force times distance, which gives 1/2 kx^2.

Does compression use the same formula as stretching?

Yes. The stretch is squared, so compressing a spring by a distance stores the same energy as stretching it by that distance, and the energy is never negative.

How do you find the spring constant from energy and displacement?

Use k = 2U / x^2. A spring that stores 1 J at a stretch of 0.1 m has k = 200 N/m.

Does elastic potential energy depend on mass?

No. The stored energy depends only on the spring constant and the stretch. Mass sets how fast the energy moves an object when the spring is released.

Why must the stretch be converted to meters?

The formula gives joules only when k is in newtons per meter and x is in meters. Because x is squared, a stretch left in centimeters makes the answer 10,000 times too large.