Physics Laws & Theorems
Intermediate

First Law of Thermodynamics

Change in internal energy equals heat added minus work done.

Formula

ΔU=Q−W\Delta U = Q - W

Live Calculator

Members

Variables

\Delta UInternal energy
QHeat
WWork

Example

Energy accounting for systems

How it works

The first law of thermodynamics is the energy-balance rule for a system: any increase in a system’s internal energy must come from heat entering the system, from work being done on it, or both. The sign convention in U = Q - W means Q is positive when heat flows in, and W is positive when the system does work on its surroundings, so that work output reduces the system’s internal energy. It is essentially conservation of energy applied to thermal processes.

When to use it

Use this formula whenever you need to track how heating, compression, expansion, or engine-like processes change a gas or thermodynamic system. It is common in problems about pistons, refrigerators, boilers, and any closed system where heat transfer and work are both involved.

Worked example, step by step

A gas in a cylinder absorbs 500 J of heat and does 180 J of work on the piston. Use the first law: U = Q - W Substitute the values: U = 500 J - 180 J Calculate: U = 320 J Final answer: the internal energy of the gas increases by 320 J.

Common mistakes to avoid

  • Using the wrong sign for work, especially confusing work done by the system with work done on the system
  • Forgetting that Q is positive only when heat enters the system
  • Assuming internal energy change depends only on temperature and ignoring work or heat transfer

Did You Know?

The first law of thermodynamics is simply energy conservation applied to heat, dooming all perpetual-motion machines.

Share this formula

Reviewed & maintained by the FormulaWon editorial teamLast reviewed September 2026