How the ideal gas law works
The ideal gas law, PV = nRT, ties together the four properties that describe a gas sample: pressure, volume, the amount of gas in moles, and absolute temperature. R is the gas constant that makes the units balance.
Choose which variable you want to find, then enter the other three. The calculator rearranges the equation to isolate your chosen quantity and solves it directly. It uses R = 0.082057 L·atm/(mol·K), with pressure in atmospheres, volume in litres, amount in moles, and temperature in kelvin.
Using the result
Because all four quantities are linked, the law lets you predict how a gas responds when conditions change. Solving for volume at a new temperature, for example, shows how much a balloon expands as it warms.
- Solve for moles to estimate how much gas occupies a known container.
- Solve for pressure to check whether a vessel stays within a safe limit.
Keep your units consistent
The chosen gas constant fixes the units you must supply. Temperature in particular must be absolute.
- Convert Celsius to kelvin by adding 273.15 before entering it.
- Convert other pressure units (kPa, bar, psi) to atmospheres first.
- Volume should be in litres to match the constant used here.
Caveats and common mistakes
The law assumes an ideal gas with no molecular volume or attraction. Real gases deviate from it at high pressure and low temperature, where corrections such as the van der Waals equation become necessary.
The most frequent mistake is entering temperature in degrees Celsius instead of kelvin, which throws off every result.
Formula
PV = nRT, R = 0.082057 L·atm/(mol·K)
