Potential Energy Calculator: Gravitational mgh and Spring ½kx²
By FindMySum · Last reviewed
A potential energy calculator works out the energy stored in an object because of its position or shape: a weight lifted above the floor, water behind a dam, or a stretched spring. This calculator handles both common kinds, gravitational (mgh) and elastic (½kx²), and can solve for any quantity in either formula. This article explains both, with worked examples using the calculator's opening values.
Gravitational potential energy
Near the surface of a planet, lifting a mass m through a height h against gravity g stores:
PE = m × g × h
With m in kilograms, g in m/s² and h in metres, the energy is in joules. The calculator rearranges it as needed:
- Mass: m = PE ÷ (g × h)
- Height: h = PE ÷ (m × g)
Worked example (the defaults). A 10 kg mass lifted 5 m on Earth: PE = 10 × 9.806 65 × 5 = 490.3 J. If it fell back, all of that would turn into kinetic energy: ½mv² = mgh, so v = √(2gh) = √(2 × 9.806 65 × 5) = 9.90 m/s, whatever the mass.
The calculator uses standard gravity, gₙ = 9.806 65 m/s², a value fixed by international agreement for defining units. Real gravity varies a little with latitude and altitude, from about 9.78 m/s² at the equator to 9.83 m/s² at the poles, a difference of about half a percent. In imperial units the pound-force is defined with the same gₙ, so lifting 150 lb by 10 ft stores exactly 1,500 ft·lbf.
On the Moon and Mars
Gravity on other worlds changes the result in proportion. The calculator uses NASA's planetary fact sheet values:
| Body | Surface gravity | 10 kg lifted 5 m |
|---|---|---|
| Earth (standard) | 9.806 65 m/s² | 490.3 J |
| Mars | 3.73 m/s² | 186.5 J |
| Moon | 1.62 m/s² | 81.0 J |
You can also enter any gravity value, for example a measured local value or a figure for another planet.
Choosing the height
Potential energy is always measured from a reference level that you pick, usually the lowest point the object could reach: the floor, the ground or the bottom of a ramp. Only differences matter. A book on a shelf has more energy relative to the basement than relative to the floor it stands on, and both are correct.
Elastic potential energy
A spring that obeys Hooke's law pushes back with a force proportional to how far it is stretched or compressed, F = k × x. The energy stored is:
PE = ½ × k × x²
- k is the spring constant in newtons per metre: how many newtons it takes to stretch the spring by one metre.
- x is the extension or compression from the spring's natural length, in metres.
Worked example. A spring with k = 200 N/m stretched 10 cm (0.1 m) stores ½ × 200 × 0.1² = 1 J and pulls back with 200 × 0.1 = 20 N. Stretch it to 20 cm and the stored energy quadruples to 4 J, because x is squared.
The rearrangements are k = 2 × PE ÷ x² and x = √(2 × PE ÷ k). To measure k yourself, hang a known weight from the spring and divide the weight in newtons by the stretch in metres.
Potential and kinetic energy together
Potential energy is energy waiting to become motion. A pendulum swaps it back and forth with kinetic energy; a roller coaster turns the height of the first hill into speed; a drawn bow passes the spring energy of its limbs to the arrow. Ignoring friction and air resistance, the total of potential and kinetic energy stays the same, which is the quickest way to solve many mechanics problems.
Limits of the formulas
mgh assumes gravity is the same over the whole height, which is accurate within a few kilometres of the surface. For rockets and satellites, gravity weakens with distance and the full form −GMm ÷ r is needed. ½kx² assumes an ideal spring within its elastic limit; stretch a real spring too far and it deforms permanently. Real falls also lose energy to air resistance, so the landing speed is an upper limit.
More questions
How much energy does it take to climb a flight of stairs?
A 70 kg person climbing 3 m (one storey) gains 70 × 9.81 × 3 ≈ 2,060 J of potential energy. The body is only about 20 to 25% efficient at turning food energy into work, so the climb burns roughly 8 to 10 kJ, about 2 kcal. Climbing for an hour is far more work because you repeat it many times.
Can potential energy be negative?
Yes, relative to the reference level you chose. A ball in a hole 2 m below the floor has negative gravitational potential energy relative to the floor. Only changes in potential energy have physical meaning, so the sign depends entirely on where you put zero.
How does a hydroelectric dam use potential energy?
Water held behind the dam has potential energy mgh relative to the turbines below. Each cubic metre (1,000 kg) dropping 100 m releases 1,000 × 9.81 × 100 = 981 kJ, about 0.27 kWh. Modern turbines convert around 90% of that into electricity, so a large flow through a large drop gives a power station.
Why is a spring's energy proportional to x squared?
The force grows as you stretch it (F = kx), so each extra millimetre takes more effort than the last. The work done is the area under the force-against-stretch line, a triangle of base x and height kx, which is ½kx². That is also why a bow or a trampoline stores so much more energy when drawn or pressed further.
What is the elastic limit?
The largest stretch a spring can take and still return to its original length. Beyond it the spring deforms permanently and Hooke's law no longer applies, so ½kx² overestimates the stored energy. Spring manufacturers give a maximum deflection; stay below it for the formula to hold.
Sources
This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.