First Law of Thermodynamics

The first law of thermodynamics says that energy is conserved. For a closed system whose bulk kinetic and potential energies stay constant, ΔU = Q − W. Heat entering adds energy. Work done by the system carries energy out. The difference is the change in stored internal energy.

Try the energy balance calculator
Heat and work in a sealed piston–cylinder The gas absorbs 500 joules of heat. Expansion delivers 200 joules of work through the piston. The gas gains 300 joules of internal energy. 200 J outpiston work 500 J inheat Sealed gas +300 J Change in internal energy
The gas is the system. Follow each transfer across its boundary.

First law equation and sign conventions

Draw the system boundary first. For a closed system, the same mass stays inside. The full balance is ΔU + ΔKE + ΔPE = Q − Wby. All terms have energy units, such as joules. When speed and elevation changes are negligible, only ΔU remains on the left.

Work done by the system

ΔU = Q − Wby

Common in engineering. Expansion against a load gives positive Wby. Compression gives negative boundary work.

Work done on the system

ΔU = q + won

Common in chemistry. The same expansion gives negative won. Compression gives positive work input.

Translate signs once. Both conventions count heat entering as positive. For the same interaction, won = −Wby. A gas that loses 90 J as heat while receiving 140 J of compression work gains 50 J of internal energy. In engineering notation that is −90 − (−140). In chemistry notation it is −90 + 140.

What do internal energy, heat and work actually measure?

Internal energy, U, is a state property. It includes microscopic kinetic and interaction energies. Heat, Q, is energy crossing the boundary because of a temperature difference. Work, W, includes transfers such as moving a piston, turning a shaft or passing electric current across the boundary. Q and W depend on the path; ΔU depends only on the endpoints. A gas contains internal energy. Heat and work describe how energy gets there or leaves.

Worked example: a gas lifts a piston

A sealed gas absorbs 500 J and expands from 1.0 L to 2.0 L against a constant external pressure of 200 kPa. Assume a frictionless piston, negligible changes in bulk speed and elevation, and only pressure–volume work.

Boundary work at constant external pressureThe shaded rectangle extends from one to two litres at a height of 200 kilopascals. Its area represents 200 joules of work done by the gas. External pressure (kPa) 200001.02.0 200 JVolume (L)
Shaded area = pressure × change in volume. The arrow marks expansion.
  1. Find the work. Wby = PextΔV = 200 kPa × (2.0 − 1.0) L = 200 J. One kPa·L equals one joule.
  2. Balance the energy. ΔU = 500 − 200 = +300 J. Of the energy supplied, 200 J left through piston motion.
  3. Check the result. The gas gained energy despite doing work. To calculate a temperature change you would also need its mass and an appropriate property model.

If the resisting pressure changes during expansion, use the area under the actual pressure–volume path, Wby = ∫ Pext dV, for this piston model. A single endpoint pressure can give the wrong area.

First law of thermodynamics calculator

Find internal energy change, heat, or work for a closed system with negligible changes in kinetic and potential energy. Enter signed values. Switch conventions to see the same process written both ways.

Internal energy change+300 J
ΔU = Q − W = 500 − 200 = 300 J
The system gains 300 J of internal energy.

Which terms disappear in common processes?

For each closed-system case below, take work by the system as positive and neglect bulk kinetic and potential energy changes.

First-law shortcuts and their conditions
ProcessBalanceWhen it applies
AdiabaticΔU = −WbyQ = 0. Compression can raise the temperature even with no heat input.
Constant volumeΔU = Q if all work is zeroA rigid boundary eliminates expansion work. A paddle wheel or electrical connection can still supply work.
Isothermal ideal gasQ = WbyFor a fixed amount of ideal gas of fixed composition, internal energy depends only on temperature. A phase change at constant temperature can change U in a real substance.
Constant pressureQ = ΔHFor a simple compressible system at constant pressure with only quasi-static pressure–volume work. H = U + PV.
Complete cycleQnet = Wnet,byAll state properties return to their starting values. Heat and work transfers over the cycle may each be nonzero.

Compare adiabatic and isothermal processes: the first fixes heat transfer at zero, while the second holds temperature constant.

Open systems: when mass carries energy

Draw the boundary around a running turbine. Steam enters and leaves, carrying energy with it. For steady flow with one inlet (1) and one outlet (2), the mass flow rate is the same at both ports. The energy balance per unit mass is

q − ws,by = (h₂ − h₁) + (V₂² − V₁²)/2 + g(z₂ − z₁)

Here q is heat added per unit mass, ws,by is shaft work delivered per unit mass, h is specific enthalpy, V is speed, and z is elevation. Enthalpy already includes flow work through h = u + pv, where v is specific volume. With speeds in m/s and elevation in m, divide the kinetic and gravitational terms by 1,000 to combine them with enthalpy in kJ/kg.

Example: turbine shaft power

Steam enters an insulated turbine at 3,200 kJ/kg and exits at 2,800 kJ/kg. Neglect speed and elevation changes. The enthalpy drop gives 400 kJ/kg of shaft work out. At 2 kg/s, the power is 2 × 400 = 800 kW. A nozzle can use an enthalpy drop to accelerate a jet instead, so the kinetic term matters there.

A filling tank accumulates mass and energy. Use an unsteady control-volume balance for that case. A steady-flow equation would omit the very change you want to predict.

How to check an energy balance that looks wrong

  1. Sketch the boundary and arrows. A heater inside a sealed tank can receive electrical work across the tank boundary. Draw the boundary around the fluid alone, and energy from the heater surface enters the fluid as heat.
  2. Put every measurement on the same basis. A 2 kW heater running for 30 s delivers 60 kJ. Compare that energy with a change in kJ. Compare power in kW with other rates.
  3. Classify the result. A positive ΔU tells you energy was stored. For water boiling at a fixed pressure, some added energy can change the phase while the temperature stays constant.

Check feasibility separately. An engine absorbing 100 J from a single reservoir and producing 100 J of net work each cycle could close an energy balance on paper. The second law of thermodynamics rules out that cycle. Conservation alone cannot tell you which direction a process will run.

First law questions

How do you state the first law in one sentence?

The change in a system’s total energy equals the energy entering its boundary minus the energy leaving it, including energy carried by mass when the boundary is open.

Can the internal energy change when no heat is added?

Yes. If an insulated gas receives 80 J of compression work and its bulk motion and elevation stay constant, ΔU = 0 − (−80) = +80 J. Work alone can increase internal energy.

When is work negative?

With work by the system defined as positive, work entering the system is negative. A piston pushing inward on a gas is an example. If a problem defines work on the system as positive, reverse the sign of the work term and use the plus form.

Is heat added always equal to the change in internal energy?

Only under the appropriate conditions. For a fixed mass with no net work and no change in bulk kinetic or potential energy, Q = ΔU. An expanding gas can pass part of the incoming energy to the surroundings as work.

What is the difference between ΔU and ΔE?

ΔU is a change in internal energy. ΔE includes changes in the system’s kinetic and potential energy as well. Lifting a sealed vessel can raise its gravitational potential energy while its internal energy stays the same.

Sources and further reading

For the broader picture, compare the four laws of thermodynamics. To follow energy through a repeating process, explore thermodynamic cycles.

Scroll to Top