How it works
Gravitational potential energy is the work needed to lift a mass against gravity, and the energy it can release by falling back down. Near a planet’s surface it is simply mass × gravity × height.
Height is measured from whatever reference level you choose, usually the floor or the ground. Only differences in potential energy matter physically.
Choose another world to see how gravity changes the result. The same 10 kg lifted 5 m stores about 490 J on Earth but only 81 J on the Moon.
Formula
PE = m × g × h
Questions people ask
What value of g should I use?
Standard gravity is 9.80665 m/s². Actual gravity varies from about 9.78 m/s² at the equator to 9.83 m/s² at the poles, which changes results by under 0.3%.
Can potential energy be negative?
Yes, if the object is below your chosen reference level. For orbits and astronomy, PE is usually defined as zero at infinite distance, making it always negative.
How fast will it be going if it falls?
Ignoring air resistance, all potential energy becomes kinetic energy, so v = √(2gh). A 5 m drop on Earth gives about 9.9 m/s.