The ideal gas law links pressure, volume, moles and temperature for a gas that behaves “ideally.” This solves for any one of the four given the other three.
How it works
Ideal gas law
PV = nRT
R = 0.0820574 L·atm/(mol·K), derived from the exact SI-defined gas constant (8.31446261815324 J/(mol·K), exact since the 2019 redefinition) and the exact atmosphere-to-pascal conversion.
“Ideal” is doing real work in the name
Real gases deviate from this law most noticeably at high pressure or low temperature, where the underlying assumptions — gas particles have negligible volume and no intermolecular attraction — start to break down. For ordinary classroom conditions, moderate pressure and temperature, the ideal gas law is an excellent approximation; it is not the right tool for a gas near its liquefaction point.
How to use this calculator
- Choose which quantity you want solved.
- Enter the other three, with temperature always in kelvin.
Frequently asked questions
Why must temperature be in kelvin?
Because the law is a direct proportion measured from an actual zero point, and only kelvin’s zero is a genuine physical floor (absolute zero) — Celsius’s zero is arbitrary (water’s freezing point), so using Celsius numbers directly would give a wrong answer.
What is STP, and why does 1 mole occupy 22.414 litres there?
Standard Temperature and Pressure, conventionally 0°C (273.15 K) and 1 atm. Plugging n = 1, T = 273.15 K and P = 1 atm into the ideal gas law gives that figure directly — it isn’t a separately memorised constant, it falls straight out of the equation.
Does this work for a mixture of gases?
For the total pressure of a mixture, yes, treating n as the total moles of all gases combined (Dalton’s law of partial pressures builds on this same equation for each individual gas in the mixture).
Why is a temperature of exactly 0 K declined?
The equation is undefined there — solving for pressure or volume would require dividing by zero. Physically, absolute zero is also unreachable, so it isn’t a meaningful input regardless.
How accurate is the ideal gas approximation for air at room temperature?
Very good — air at ordinary room conditions behaves close enough to ideally that the law’s predictions match measurements within a small fraction of a percent, which is why it remains the standard teaching tool despite being an approximation.