Menu

Potential Energy Calculator

Gravitational potential energy, mgh, and the energy stored in a spring.

By Nethanel Bar, Co-founder & CEO

Last updated

Want to solve these without the calculator?

The Coddy physics course teaches the method: you solve each problem in steps on an interactive board, and it tells you which step went wrong.

The potential energy formula, and what it says

Potential energy is energy stored by position. Lift an object and you store energy that it gives back as it falls: PE = mgh, where m is the mass, g the strength of gravity (9.81 m/s² near the Earth's surface) and h the height. A 2 kg box lifted 10 m stores 2 · 9.81 · 10 = 196.2 J.

The height h is measured from a reference level you choose: the floor, the ground, the bottom of a hill. Only differences in height matter, so pick the level that makes the problem easy. Below that level h is negative and so is PE. A stretched or squashed spring stores energy too, by a different formula: PE = ½kx², where k is the spring constant and x the stretch.

The calculator has a tab for each. On the gravitational tab, fill in any three of PE, m, g and h and it finds the fourth; g starts at 9.81 m/s², and you can change it for the Moon or for a problem that uses 9.8. On the elastic tab, give two of PE, k and x. Heights in cm, ft or km and energies in kJ or kcal are converted to SI first, as their own step.

What to notice

  • PE = mgh gives joules only when the mass is in kilograms, g in m/s² and the height in metres. 1 J is 1 kg·m²/s².
  • Gravitational potential energy grows in step with each value: double the height, or the mass, and the energy doubles.
  • The height is above a level you choose. Change the level and every PE changes by the same amount, so the energy gained or lost between two points stays the same.
  • Elastic potential energy, ½kx², grows with the square of the stretch: pull a spring twice as far and it stores four times the energy.
  • Going backwards to the stretch takes a square root, x = √(2PE/k). It gives the size of the stretch, and a compression by the same amount stores the same energy.
  • As an object falls, its potential energy turns into kinetic energy. Ignoring air resistance, mgh at the top equals ½mv² at the bottom.

How to calculate potential energy

  1. Put the mass in kilograms

    Grams divide by 1000, pounds multiply by 0.4536. A 500 g book is 0.5 kg.

  2. Measure the height from your reference level, in metres

    Centimetres divide by 100, feet multiply by 0.3048. A shelf 150 cm above the floor is at h = 1.5 m.

  3. Multiply m, g and h

    PE = m · g · h with g = 9.81 m/s² on Earth. The book on the shelf stores 0.5 · 9.81 · 1.5 = 7.36 J.

  4. For a spring, square the stretch, then halve

    PE = ½ · k · x², with x in metres. A 200 N/m spring stretched 5 cm stores ½ · 200 · 0.05² = 0.25 J.

Potential energy of everyday things

Values from PE = mgh with g = 9.81 m/s², and from PE = ½kx² for the springs. Each height is measured from the floor or the ground below.

SituationValuesPotential energy
Apple on a high branch0.1 kg, 2 m up1.96 J
Book on a 1 m shelf1 kg, 1 m up9.81 J
Person one floor up70 kg, 3 m up2,060 J
Hiker climbing a hill80 kg, 500 m up392 kJ
1 m³ of water behind a dam1,000 kg, 100 m up981 kJ
Lab springk = 200 N/m, x = 5 cm0.25 J
Stiff springk = 5,000 N/m, x = 30 cm225 J

Worked examples

A box lifted 10 m

plain
m = 2 kg, h = 10 m, g = 9.81 m/s²

PE = m · g · h = 2 · 9.81 · 10 = 196.2 J. Everything is already in SI, so there is nothing to convert. The calculator also gives it as 0.1962 kJ.

The height from an energy

plain
PE = 1000 J, m = 50 kg, g = 9.81 m/s²

Rearrange for h: h = PE / (m · g) = 1000 / (50 · 9.81) = 1000 / 490.5 = 2.04 m. Leave the height box blank and the calculator works it out this way.

A spring stretched 5 cm

plain
k = 200 N/m, x = 5 cm

Convert the stretch first: 5 cm = 0.05 m. Then PE = ½ · 200 · 0.05² = ½ · 200 · 0.0025 = 0.25 J. Using 5 instead of 0.05 would give 2,500 J, ten thousand times too much.

The same box on the Moon

plain
m = 2 kg, h = 10 m, g = 1.62 m/s²

Change the g box to 1.62. PE = 2 · 1.62 · 10 = 32.4 J, about a sixth of the 196.2 J it stores on Earth, because the Moon's gravity is about a sixth as strong.

How far a spring was stretched

plain
PE = 4 J, k = 500 N/m

Rearrange for x: x = √(2PE/k) = √(2 · 4 / 500) = √0.016 = 0.126 m, about 12.6 cm. The same 12.6 cm of compression would store the same 4 J.

Common mistakes

  • Using centimetres or feet for the height. Convert to metres first: 150 cm is 1.5 m, and using 150 makes the answer a hundred times too big.
  • Using grams instead of kilograms. 500 g is 0.5 kg; using 500 makes the answer a thousand times too big.
  • Measuring the height from the wrong place. h is the height above your chosen reference level; for a drop, use the height of the fall, not the height of the building above sea level.
  • Forgetting g. PE = mh is not an energy; multiply by 9.81 m/s², or by the g the problem gives.
  • Leaving out the ½ or the square in the spring formula. Elastic PE is ½kx², not kx and not kx².
  • Using the total length of the spring for x. x is the change in length from its natural, unstretched length.

Potential energy FAQ

What is the formula for potential energy?

Gravitational potential energy is PE = mgh: mass in kilograms, g = 9.81 m/s² on Earth, height in metres, energy in joules. The energy stored in a spring is PE = ½kx², with the spring constant k in N/m and the stretch x in metres.

How do you find the height from potential energy?

Rearrange the formula: h = PE / (mg). Divide the energy by the mass times g. 1000 J on a 50 kg object gives 1000 / (50 · 9.81) = 2.04 m.

How do you find the mass from potential energy?

Rearrange for m: m = PE / (gh). An object that stores 588.6 J at a height of 3 m has a mass of 588.6 / (9.81 · 3) = 20 kg.

What is the reference level for the height?

Any level you choose, usually the floor, the ground or the lowest point in the problem. Only the change in height decides how much energy is gained or released, so the choice never changes that answer.

Can potential energy be negative?

Gravitational potential energy can: an object below your reference level has a negative h, so mgh is negative. The calculator accepts a negative height. Elastic potential energy, ½kx², is never negative.

Should I use g = 9.81 or 9.8?

Use whatever your course or textbook uses. The calculator starts g at 9.81 m/s², and you can type 9.8, 10, or 1.62 for the Moon into the g box instead.

What is elastic potential energy?

The energy stored in something stretched or squashed, like a spring or a rubber band. For a spring that obeys Hooke's law it is ½kx², where k is how stiff the spring is and x how far it is stretched or compressed.

What is the difference between potential and kinetic energy?

Potential energy is stored energy of position, mgh. Kinetic energy is energy of motion, ½mv². A dropped ball turns one into the other: at the top it is all potential, just before landing almost all kinetic.

More physics calculators

Coddy programming languages illustration

Learn physics with Coddy

Get started