Expansion Work Calculator – W = PΔV & First Law ΔU = Q − W

Use this free Expansion Work Calculator to find the boundary work done when a gas expands (or is compressed) at constant pressure: W = PΔV. Add the heat supplied Q and it also applies the first law, ΔU = Q − W, to give the change in internal energy.

Push a piston out and you have done the oldest trick in thermodynamics: turned heat into motion. When a gas expands against a constant pressure — a piston under a steady load, a balloon against the atmosphere — the work it performs has the simplest formula in the subject: W = PΔV, pressure times the change in volume. No logarithms, no exponents; the push never weakens because the pressure never changes, so the whole calculation is a rectangle: height P, width ΔV, area equal to work. This calculator finds that work, and then finishes the story with the first law, ΔU = Q − W, splitting the heat you supplied into the part that left as work and the part that stayed behind as internal energy.

That split is where the physics lives. Feed 10,000 J of heat into a gas expanding at constant pressure and the gas does not keep 10,000 J: it spends some pushing the piston and banks the rest as a temperature rise. In the worked example below, 6,000 J leaves as work and 4,000 J stays. The proportions are not negotiable — they are set by P, ΔV and the first law — and they explain a fact that surprises everyone who meets it first: heating a gas at constant pressure takes more heat than heating it in a sealed rigid box, because the expanding gas is simultaneously spending energy on work. That is the entire difference between the heat capacities Cp and Cv, hiding inside one subtraction.

Expansion Work Calculator — formula and diagram

The constant-pressure assumption is less fragile than it looks. Any expansion against the open atmosphere qualifies; so does a piston loaded with weights, a steam engine's stroke while the valve holds boiler pressure, and the slow inflation of a weather balloon. Wherever the surroundings push back with a steady pressure, the rectangle formula rules, and its unit bookkeeping contains a gift: with P in kilopascals and V in litres, the product comes out in joules directly, because 1 kPa × 1 L = 1 J exactly.

constant pressure: the work is a rectangle on the P–V diagram W = P × ΔV V₁ V₂ P pressure never changes

Formula

Work at constant pressure W = PΔV = P(V₂ − V₁)  •  First law ΔU = Q − W

With P in pascals and V in cubic metres, PΔV is in joules directly. This calculator accepts kPa and litres and converts for you, exploiting the identity 1 kPa × 1 L = 1 J (1,000 Pa × 0.001 m³). Signs follow the physics convention used across this site: W is positive when the gas expands and does work, negative when it is compressed and work is done on it; Q is positive when heat flows into the gas; ΔU is the change in internal energy, positive when the gas ends hotter (for an ideal gas, ΔU and ΔT always share their sign). The general definition behind the shortcut is W = ∫P dV — the area under the path on a P–V diagram — which collapses to the rectangle PΔV only when P is constant. If the pressure varies, the isothermal and adiabatic pages carry the right formulas for those paths.

SymbolMeaningUnits
Wboundary work done by the gas (+ expansion, − compression)joules (J)
Pconstant pressure of the gaskPa here (Pa in SI)
V₁, V₂volumes before and afterlitres here (m³ in SI)
Qheat supplied to the gas (+ in, − out)joules (J)
ΔUchange in internal energy, Q − Wjoules (J)

Work is a path, ΔU is a destination

Here is the deepest fact on this page, and it is easy to miss because the arithmetic is so simple. Take a gas from state A to state B by two different routes — expand at constant pressure then cool, or cool then expand — and the values of W and Q will differ between the routes, sometimes wildly. But ΔU will be identical, because internal energy depends only on the state, and for an ideal gas only on the temperature. Work and heat are path functions: they describe the journey. Internal energy is a state function: it describes the destination. The first law, ΔU = Q − W, is the treaty between the two kinds of quantity — the path-dependent flows on the right always conspire to give the path-independent change on the left.

Constant pressure is the friendliest path because its work is a single rectangle, but the treaty holds on every path: isothermal (where ΔU = 0 forces Q = W), adiabatic (where Q = 0 forces ΔU = −W), and the rigid-container path (where ΔV = 0 forces W = 0 and ΔU = Q). Learn to see any process as a route on the P–V map with an area under it, and the whole of thermodynamics becomes one picture with one rule. The worked examples below deliberately include a compression and a no-volume-change case, because the signs are where the treaty is usually broken by accident.

There is a practical corollary engineers use daily: because ΔU is path-independent, you may compute it along whichever path is easiest — usually by pretending the change happened at constant volume, where ΔU = nCVΔT — even when the real process ran at constant pressure or along no named path at all. State functions grant this freedom; path functions deny it. Heat and work must be integrated along the actual route, but ΔU can be teleported along a convenient one. Half the speed of an experienced thermodynamicist is knowing which quantities may be teleported and which must walk.

two routes, same endpoints — different W, same ΔU A B route 1: expand hot, then cool route 2: cool first, then expand — less work volume →

How to use

  1. Enter the constant pressure in kPa.
  2. Enter the initial volume V₁ and final volume V₂ in litres (V₂ larger for expansion, smaller for compression).
  3. Enter the heat Q supplied to the gas in joules — negative if heat actually leaves the gas.
  4. Click "Calculate Work & ΔU" to get the work done by the gas and the change in its internal energy, with the direction of the work stated in words.

Worked examples

Example 1 — heat split between work and warmth. A gas at a constant pressure of 200 kPa expands from 20 L to 50 L while absorbing Q = 10,000 J of heat:
W = PΔV = 200,000 × (0.050 − 0.020) = 6,000 J done by the gas
ΔU = Q − W = 10,000 − 6,000 = 4,000 J — the gas keeps 4,000 J as extra internal energy (it gets hotter) and spends the rest pushing the piston.

Example 2 — compression with heat loss. A gas is compressed at 150 kPa from 40 L to 25 L while 2,000 J of heat escapes (Q = −2,000 J): W = 150 × (25 − 40) = −2,250 J — 2,250 J of work done on the gas — and ΔU = −2,000 − (−2,250) = +250 J. Despite leaking heat, the gas ends slightly hotter: the compression work more than replaced what escaped.

Example 3 — expansion against the atmosphere. A balloon-like expansion at atmospheric pressure, 101.325 kPa, from 10 L to 12 L, with Q = 500 J absorbed: W = 101.325 × 2 = 202.65 J, ΔU = 500 − 202.65 = 297.35 J. Even a gentle two-litre swell against the sky spends two-fifths of the heat on work.

Example 4 — a steam stroke. Steam at 500 kPa pushes a piston from 100 L to 300 L while Q = 150,000 J is supplied: W = 500 × 200 = 100,000 J, ΔU = 150,000 − 100,000 = 50,000 J. Two-thirds of the heat became work in a single stroke — a flattering figure real engines dilute with losses, but the bookkeeping is identical.

Example 5 — the rigid box. Seal the gas in a fixed 30 L vessel (V₂ = V₁) and supply Q = 800 J at any pressure: W = P × 0 = 0 J, so ΔU = 800 J — every joule stays home. This is why constant-volume heating is the reference case for heat capacity, and why pressure cookers (nearly rigid) convert heat to temperature so efficiently.

Example 6 — the quick pump stroke. A pump compresses gas at 300 kPa from 0.5 L to 0.2 L so fast that essentially no heat flows (Q = 0): W = 300 × (0.2 − 0.5) = −90 J, ΔU = 0 − (−90) = +90 J. All 90 J of your work is now internal energy — the warming pump barrel of the adiabatic page, computed from the work side.

Expansion work in real life

Steam and gas engines. Every power stroke is boundary work against a piston. Real engines trace a loop on the P–V diagram, and the net work per cycle is the loop's enclosed area — the rectangle of this page, generalised to a closed tour.

Inflating tyres and air springs. Compressing air into a tyre at roughly constant supply pressure is W = PΔV paid by the compressor; the stored energy returns the favour when the air does work again. Air suspension is the same ledger, ridden on.

Weather balloons. A balloon rising into thinner air expands against a steadily falling pressure — not constant, so the rectangle becomes an integral — but the work it does on the atmosphere is what limits its lift and bursts it at altitude.

Breathing. Your diaphragm does boundary work on every breath, expanding the lungs against atmospheric pressure; quiet breathing costs a fraction of a joule per breath, and the first-law split explains why hard breathing warms you.

Cooking gas and LPG. Gas expanding from a cylinder through a regulator does work and cools — the frost on a hard-working regulator is ΔU being spent. The amounts follow the same PΔV bookkeeping at the pressures involved.

Hot-air balloons. A balloon envelope is an isobaric system open at the mouth: the burner heats air at essentially atmospheric pressure, the expanding surplus spills out, and the remaining air is less dense — lift is ΔU bookkeeping with the work term leaving through the mouth. The pilot's burner bursts are timed additions of Q at constant P, exactly this page's process flown at altitude.

Compressed-air tools. A pneumatic drill is an expansion-work machine: stored compressed air expands through the tool, and its work capacity per tank is set by the pressure–volume ledger this page computes.

one identity worth memorising 1 kPa × 1 L = 1 J exactly because 1,000 Pa × 0.001 m³ = 1 J — piston problems in kPa and litres need no unit conversion at all

The four standard paths, side by side

Constant pressure is one of the four paths that organise all of elementary thermodynamics, and seeing them together prevents most formula mix-ups. Isobaric (constant P): W = PΔV, ΔU = Q − W. Isochoric (constant V): W = 0, ΔU = Q — all heat becomes internal energy. Isothermal (constant T, ideal gas): ΔU = 0, so Q = W = nRT ln(V₂/V₁) — all heat becomes work. Adiabatic (Q = 0): ΔU = −W, with W = (P₁V₁ − P₂V₂)/(γ − 1) — internal energy alone pays for the work. Notice the pattern: each path pins one variable, and the first law distributes the consequences among the other two. This calculator owns the first row; its sibling pages own the other three, and any cycle — Carnot, Otto, diesel — is just these four paths stitched into a loop.

The isobaric row hides one more identity worth extracting. Heat 1 mol of a diatomic gas at constant pressure through 100 K: the heat required is Q = nCPΔT = 3.5 × 8.314 × 100 = 2,909.9 J, of which the expansion work is W = PΔV = nRΔT = 831.4 J and the internal-energy rise is ΔU = 2,909.9 − 831.4 = 2,078.5 J — exactly (5/2)RΔT, as the internal-energy page insists. The fraction of the heat that escapes as work at constant pressure is R/CP = 1 − 1/γ ≈ 29% for a diatomic gas, a little constant that reappears inside every heat-engine efficiency estimate.

Quick reference: work for common expansions

PressureΔVW = PΔV
100 kPa (≈ atmosphere)1 L100 J
100 kPa10 L1,000 J
200 kPa30 L6,000 J
500 kPa200 L100,000 J
1,000 kPa (10 bar)5 L5,000 J
50 kPa−8 L (compression)−400 J

Because 1 kPa × 1 L = 1 J, every row is just a multiplication of the two left-hand columns — the fastest work estimate in thermodynamics.

Common mistakes

  • Using W = PΔV when the pressure changes. The rectangle needs a constant height. Isothermal and adiabatic paths have sloping curves; their areas are the logarithmic and (P₁V₁ − P₂V₂)/(γ − 1) formulas respectively.
  • Unit slips. P in kPa with V in cubic metres overstates the work a thousandfold. Either convert properly (Pa × m³) or use the kPa × L = J identity consistently.
  • Losing the sign on compression. V₂ < V₁ makes ΔV — and W — negative. Reporting compression work as positive output double-counts it in ΔU = Q − W and reverses conclusions.
  • Entering heat lost as positive Q. If heat leaves the gas, Q is negative in this convention. Example 2 shows how much rides on it: the sign of ΔU itself flips.
  • Assuming all the heat becomes work (or none of it). At constant pressure the heat always splits. Only the isothermal path converts Q entirely to W, and only the rigid path converts it entirely to ΔU.

FAQ

Why is 1 kPa × 1 litre exactly 1 joule?
1 kPa = 1,000 Pa and 1 L = 0.001 m³, so PΔV = 1,000 × 0.001 = 1 J. It is a handy shortcut for piston problems.

What if the gas is compressed instead?
Then V₂ < V₁ and W comes out negative: work is done on the gas. With the same heat input, ΔU = Q − W grows, because both the heat and the compression work add energy.

When can I NOT use W = PΔV?
Only when the pressure stays constant during the change. If the pressure varies (for example in an isothermal or adiabatic change), the work must be found from the area under the P–V curve instead.

What does "boundary work" mean?
Work done by the system moving its boundary — a piston face, a balloon skin — against the surroundings. It is the W in W = ∫P dV. Work from a spinning shaft or an electric current crossing the boundary is a different kind and is not PΔV.

Why does heating at constant pressure need more heat than at constant volume?
Because the expanding gas spends part of the heat on work. The difference per mole per kelvin is exactly R — which is why Cp = Cv + R for an ideal gas.

Can ΔU be negative in an expansion?
Yes — if the work done exceeds the heat supplied. Expand a gas adiabatically (Q = 0) and ΔU = −W is negative by construction: the gas cools itself to pay for the work.

How much work does the atmosphere do on a collapsing can?
The classic steam-can demo: steam condenses, internal pressure collapses, and the atmosphere crushes the can doing W ≈ PatmΔV of work on it — for a 5 L can, roughly 100 × 5 = 500 J delivered in a bang.

Does the gas's own weight or the piston's matter?
Only through the pressure. A heavy piston or a loaded spring simply sets a higher constant P; once P is fixed, the formula does not ask what maintains it.

What if the expansion is into a vacuum?
Then there is no resisting pressure and no boundary work: W = 0 despite ΔV > 0, because the gas pushes against nothing. For an ideal gas ΔU = 0 too (Joule's free expansion) — the exception that proves work needs resistance.

How is net work found for a whole engine cycle?
Add the works of the strokes with their signs — or measure the area enclosed by the cycle on the P–V diagram. Expansions contribute positive area, compressions negative, and the loop's interior is the net payment per cycle.

Anna Kowalski

Anna Kowalski

Physics Editor · Heat & Atoms

Anna Kowalski creates and reviews our thermodynamics and nuclear physics calculators at CalcVIP. Every calculator is checked against hand-worked examples before it is published, so the formula, the diagram and the answer all agree.

View full profile & all calculators by Kowalski →