Isothermal Work Calculator – W = nRT ln(V₂/V₁)

Use this free Isothermal Work Calculator to find the work done when an ideal gas expands or is compressed at constant temperature: W = nRT ln(V₂/V₁). Enter the moles, the temperature in kelvin and the two volumes, using R = 8.314 J/(mol·K).

V₁ V₂ piston moves out — T stays constant

Formula

Isothermal work: W = nRT ln(V₂/V₁) — the work done by the gas. It comes from integrating W = ∫P dV with P = nRT/V at constant T. A positive result means expansion (gas does work); a negative result means compression (work is done on the gas). Because T is constant, ΔU = 0, so all the work equals the heat absorbed: Q = W.

How to use

Worked example

1 mol of gas at 300 K expands isothermally from 0.01 m³ to 0.02 m³:
W = 1 × 8.314 × 300 × ln(0.02/0.01) = 2,494.2 × ln 2 = 1,728.85 J = 1.73 kJ
The gas does 1,728.85 J of work, and must absorb exactly the same amount of heat to stay at 300 K.

FAQ

Why is there a logarithm in the formula?
During an isothermal expansion the pressure falls as the volume grows (P = nRT/V), so the push gets weaker along the way. Adding up P dV over the whole path gives the natural logarithm of the volume ratio.

What if V₂ is smaller than V₁?
Then ln(V₂/V₁) is negative and W is negative: the gas is being compressed and work is done on it. The size of the number is the work input needed.

How is this different from work at constant pressure?
At constant pressure the simple formula W = PΔV applies. In an isothermal change the pressure is not constant, so the logarithmic formula must be used instead.