Elastic Potential Energy Calculator: U = ½kx²
Solve spring energy, spring constant or stretch with U = ½kx². Use joules, kJ or ft·lbf and N/m, N/cm or lbf/in, with every step shown. Free and private in your browser.
Fill in all but one field: the empty field is the one you solve for.
About the Elastic Potential Energy Calculator
The Elastic Potential Energy Calculator solves U = ½ k x² for a spring. Fill in any two of Energy, Spring constant and Displacement and the third is worked out as you type, with the equation and the substitution shown beneath the result.
Stretch or compress a spring and you do work on it. That work is stored as elastic potential energy and is released again when the spring returns to its resting length. The calculator shares its spring-constant and displacement fields with the Hooke's law tool, so the same units and rules apply on both pages.
How to use the elastic energy calculator
Steps
- Enter two values and leave the one you want empty.
- Pick units. Energy is offered in joules and other energy units. The spring constant accepts N/m, N/cm and lbf/in, and displacement accepts m, cm, mm and in.
- Read the result and the same value in the other units of that quantity.
The spring constant must be greater than zero. Displacement may be negative, because compressing a spring by 3 cm stores exactly the energy of stretching it by 3 cm. When you solve for displacement the answer is the size of the stretch, a positive number.
Formula
U is the stored energy in joules, k the spring constant in newtons per metre and x the displacement in metres. Because x is squared, doubling the stretch quadruples the energy. This follows from Hooke's law: the force grows from 0 to kx as the spring moves, so the average force is ½ k x and the work over a distance x is ½ k x².
Worked examples
Example 1: energy in a stretched spring
A spring with k = 200 N/m is stretched by 0.10 m. U = ½ × 200 × 0.10² = 1 J.
Example 2: find the spring constant
A spring holds 2 J when compressed by 0.05 m. k = 2 × 2 ÷ 0.05² = 1 600 N/m.
Example 3: find the compression
A spring with k = 800 N/m must store 4 J. x = √(2 × 4 ÷ 800) = 0.1 m, which is 10 cm.
Good to know
- Energy depends on the square of the displacement, so a small increase in stretch costs a lot more energy.
- A spring launching a mass converts U into kinetic energy. Setting ½ k x² equal to ½ m v² gives the launch speed when friction is ignored.
- The formula assumes the spring stays inside its elastic limit and has negligible mass.
Privacy
Nothing is uploaded; every calculation runs in your browser and never leaves your device.
Related tools
Use the Hooke's Law Calculator for the force at a given stretch, the Kinetic Energy Calculator for the motion the energy can create, and the Work Calculator for the work done on the spring.
Frequently asked questions
What is elastic potential energy?
It is the energy stored in a stretched or compressed spring, or any elastic object. It is released when the object returns to its resting shape. For a spring the amount is U = ½ k x².
How do I calculate the energy stored in a spring?
Multiply half the spring constant by the square of the displacement. A spring with k = 200 N/m stretched by 0.10 m stores ½ × 200 × 0.10² = 1 J. Enter k and x, leave energy empty and read the result.
Why is displacement squared?
The force on a spring grows as it moves, from 0 up to kx, so the average force is half of kx. Work is average force times distance, which gives ½ k x². Doubling the stretch therefore stores four times the energy.
Does compressing store the same energy as stretching?
Yes. The displacement is squared, so the sign does not matter. You can enter a negative displacement, and when you solve for it the calculator returns the size of the stretch or compression.
How is this different from Hooke's law?
Hooke's law, F = kx, gives the force at a given displacement. Elastic potential energy gives the work stored in reaching that displacement. Both use the same spring constant and displacement fields.
Which units can I use?
Energy is offered in joules and other common energy units, the spring constant in N/m, N/cm or lbf/in, and displacement in m, cm, mm or in. Values are converted to SI before the calculation and back afterwards.
Is all the energy returned by the spring?
In an ideal spring, yes. Real springs lose a little to heat and internal friction, and the formula only holds inside the elastic limit of the spring.
Does it send my numbers anywhere?
No. The spring constant, displacement and energy you enter are all calculated locally in your browser, and nothing is uploaded, stored or shared with any server.