How to use this calculator
Choose the process, enter the initial pressure and volume, then the final volume (or final pressure for constant volume). Pick the gas to set the specific heat ratio k.
Formulas
Boundary workW = ∫P dV isobaric: PΔV isothermal: P1V1 ln(V2/V1)
Polytropic / adiabaticPVn = const W = P2V2 − P1V11 − n (n = k for adiabatic)
First lawQ = ΔU + W ΔU = P2V2 − P1V1k − 1
Worked example
Air compressed isothermally from 10 L to 2 L at 100 kPa (the default)
- P2 = 100 × 10/2 = 500 kPa.
- W = 100 kPa × 0.01 m³ × ln(2/10) = −1.61 kJ (work done on the gas).
- ΔU = 0 (constant temperature), so Q = W = −1.61 kJ: heat must leave the gas.
Done adiabatically instead, the same compression needs 2.26 kJ and the gas heats up by a factor of 1.9.
Frequently asked questions
Why is the work negative?
W here is work done by the gas. During compression the surroundings do work on the gas, so W is negative.
What does n mean physically?
It describes how heat transfer relates to the volume change: n = 0 is constant pressure, n = 1 constant temperature, n = k no heat transfer, and n → ∞ constant volume.