Engineering Mechanics

Potential Energy Calculator

Calculate gravitational or elastic spring potential energy, or solve for the missing variable in either formula.

Formulas PE = m g h · PE = 1/2 k x²Reviewed Sep 8, 2026

Potential energy is stored energy associated with position or configuration. This calculator supports two of the most common textbook and engineering-reference forms: gravitational potential energy near Earth's surface, PE = mgh, and elastic spring potential energy, PE = 1/2 kx². Choose the mode that matches your system, then enter the known values to solve for the missing one.

Calculation Bench
Energy Mode
Solve for
01

m · Mass of the elevated object in the gravitational model.

02

g · Local gravitational field strength used in the mgh approximation.

03

h · Vertical height above the chosen zero-potential reference level.

Solution

Enter the required values to calculate potential energy in gravitational mode.

PE = m g h

Formula Sheet

PE=mghPE = mgh
m=PEghm = \dfrac{PE}{gh}
g=PEmhg = \dfrac{PE}{mh}
h=PEmgh = \dfrac{PE}{mg}
PE=12kx2PE = \frac{1}{2}kx^2
k=2PEx2k = \dfrac{2PE}{x^2}
x=2PEkx = \sqrt{\dfrac{2PE}{k}}
  • PEPotential Energy
  • mMass
  • gGravitational Acceleration
  • hHeight
  • kSpring Constant
  • xDisplacement

Variables & Units

SymbolVariableDescriptionCommon Units
PEPotential EnergyStored energy due to position or elastic deformation.J, kJ, MJ, ft·lbf
mMassMass of the elevated object in the gravitational model.g, kg, lb
gGravitational AccelerationLocal gravitational field strength used in the mgh approximation.m/s², ft/s², g
hHeightVertical height above the chosen zero-potential reference level.cm, m, ft
kSpring ConstantStiffness of a linear spring that obeys Hooke's law.N/m, kN/m, lbf/in
xDisplacementStretch or compression measured from the spring's unloaded position.mm, cm, m, in

How to Use This Calculator

  • 01Choose the energy mode first: Gravitational for an object raised above a reference height, or Spring for an ideal linear spring stretched or compressed from its unloaded position.
  • 02Select which variable to solve for using the solve-for strip. The calculator will show only the inputs needed for that formula.
  • 03Enter the known values with the correct units, then select Calculate to see the answer, the active formula, and the substitution in base units.
  • 04For gravitational problems, choose the zero-height reference first. For spring problems, displacement can be entered as either extension or compression when solving for energy - the sign does not affect stored energy because x is squared. When solving for displacement from energy, the calculator returns the magnitude.

How the Formula Works

Gravitational potential energy near the Earth's surface is modeled as PE = mgh, where mass m is lifted through a height h in a gravitational field with acceleration g. In this form, potential energy increases linearly with all three quantities: doubling the mass, gravity, or height doubles the stored energy.

Elastic spring potential energy is modeled as PE = 1/2 kx² for a spring that obeys Hooke's law. Because displacement x is squared, stored spring energy rises much faster with deflection than with spring stiffness - doubling the displacement stores four times as much energy, while doubling the spring constant only doubles it.

Worked Example 01

Gravitational potential energy of a lifted object

Known

  • Mass (m): 10 kg
  • Gravity (g): 9.81 m/s²
  • Height (h): 5 m

Formula

PE = m g h

Substitution

PE = 10 × 9.81 × 5

Result

PE = 490.5 J

Lifting a 10 kg object by 5 m on Earth stores 490.5 J of gravitational potential energy relative to the chosen zero-height reference.

Worked Example 02

Solving for height from potential energy

Known

  • Potential Energy (PE): 300 J
  • Mass (m): 5 kg
  • Gravity (g): 10 m/s²

Formula

h = PE / (m g)

Substitution

h = 300 / (5 × 10)

Result

h = 6 m

A 5 kg object needs to be raised 6 m in a 10 m/s² field to store 300 J of gravitational potential energy.

Worked Example 03

Elastic spring energy from stiffness and displacement

Known

  • Spring Constant (k): 200 N/m
  • Displacement (x): 0.1 m

Formula

PE = 1/2 k x²

Substitution

PE = 1/2 × 200 × 0.1²

Result

PE = 1 J

A spring with stiffness 200 N/m stores 1 J when stretched or compressed by 0.1 m from its unloaded position.

Worked Example 04

Solving for spring displacement magnitude

Known

  • Potential Energy (PE): 8 J
  • Spring Constant (k): 400 N/m

Formula

x = √(2 PE / k)

Substitution

x = √((2 × 8) / 400)

Result

x = 0.2 m

A 400 N/m spring must be displaced by 0.2 m in magnitude to store 8 J of elastic potential energy.

Applications

  • 01Introductory mechanics, dynamics, and work-energy calculations
  • 02Checking lifting, drop-height, or stored-energy estimates in preliminary engineering work
  • 03Estimating energy stored in springs, suspensions, and elastic test setups
  • 04Comparing potential energy with kinetic energy before a fall, launch, or spring release

Assumptions

  • 01Gravitational mode uses the near-Earth constant-gravity approximation PE = mgh.
  • 02Spring mode assumes an ideal linear spring that obeys Hooke's law.
  • 03The reported energy is relative to the chosen zero-potential reference level or undeformed spring position.

Where This Model Stops

  • 01Gravitational mode is not intended for large orbital-distance problems where gravity changes significantly with radius; it is a near-surface approximation.
  • 02Spring mode does not apply once a spring leaves its linear elastic range or experiences plastic deformation, friction, damping, or coil binding.
  • 03Does not convert potential energy directly into impact force; stopping distance or stopping time is needed for that next step.

References

  1. [1]
    7.3 Gravitational Potential Energy

    OpenStax College Physics

    Explains the near-Earth gravitational model and the role of the chosen reference level.

  2. [2]
    7.4 Conservative Forces and Potential Energy

    OpenStax College Physics 2e

    Derives spring potential energy as PE = 1/2 kx² for a Hooke's-law spring.

Frequently Asked Questions

Why does the spring formula use x²?

Because a Hooke's-law spring gets harder to deform as displacement increases. Integrating the linearly increasing spring force produces PE = 1/2 kx², so doubling displacement stores four times as much energy.

Can spring displacement be negative?

Yes for direction, but not for stored-energy magnitude. A spring compressed 20 mm and stretched 20 mm store the same elastic potential energy because the displacement term is squared.

Why does gravitational potential energy depend on a reference height?

Potential energy is relative, not absolute. The formula mgh tells you the energy relative to whatever height you choose as zero, so values above that level are positive, values below it are negative, and what matters physically is the difference in potential energy between two positions.

How is this different from the Impact Force Calculator?

Potential energy tells you how much energy is available before a fall or spring release. Impact force depends on how that energy is stopped, so you also need stopping distance, stopping time, or deformation data.