Chemistry
Ideal gas law calculator (PV = nRT)
PV = nRT with the formula reversed at will: clear the quantity you need — pressure, volume, moles or temperature — and the calculation adapts. The same goes for the transformation between two states, where any of the six quantities can be the unknown.
The equation of state and the three laws that follow from it
PV = nRT ties together in a single relation the four quantities that describe a gas: pressure, volume, amount of substance and temperature. The constant R is 0.0821 if you work in litres and atmospheres, 8.314 if you use pascals and cubic metres. The model assumes the molecules take up no volume of their own and do not interact: a good approximation at ordinary pressures and temperatures far from condensation, and one that degrades rapidly as the liquefaction point approaches.
The gas laws studied separately are all special cases of this equation. If the temperature is held constant, PV is constant and that is Boyle's law: compressing a gas to half its volume doubles its pressure. If the pressure is held constant, V/T is constant and that is Charles's law. If the volume is held constant, P/T is constant and that is Gay-Lussac's law. These are not three formulas to memorise but three ways of freezing one variable.
The temperature must be in kelvin, and this is not a formality. The relations are direct proportionalities, and they hold only on a scale that starts at absolute zero: doubling the temperature from 20 °C to 40 °C does not double the volume, because in kelvin you go from 293 to 313, a rise of 7%. It is the most frequent error in the whole topic, and the calculator avoids it by accepting degrees Celsius and showing the kelvin it uses.
Common mistakes
- Using degrees Celsius in the formulas: they must always be converted to kelvin by adding 273.15. It is the one genuinely compulsory conversion of the whole topic.
- Pairing R with the wrong units: R = 0.0821 needs litres and atmospheres, R = 8.314 needs cubic metres and pascals. Mixing them throws the answer off by several orders of magnitude.
- Applying P₁V₁/T₁ = P₂V₂/T₂ when the amount of gas changes: the relation holds only if n stays constant, that is if the vessel is closed and no reaction occurs.
Frequently asked questions
What is the ideal gas equation of state?
PV = nRT, where P is pressure, V volume, n moles, T the absolute temperature in kelvin and R the universal gas constant, equal to 0.0821 L·atm/(mol·K) or 8.314 J/(mol·K).
Why must the temperature be in kelvin?
Because the gas laws are direct proportionalities, and a proportionality needs a scale that starts at zero. The zero of the Celsius scale is arbitrary; the zero of the Kelvin scale is the temperature at which the pressure of an ideal gas would vanish.
What do Boyle's, Charles's and Gay-Lussac's laws say?
They are the equation of state with one variable held fixed. Boyle: at constant temperature PV is constant. Charles: at constant pressure V/T is constant. Gay-Lussac: at constant volume P/T is constant.
When does the ideal gas model stop working?
At high pressures and low temperatures, that is when the molecules get close enough to feel each other's forces and their own volume is no longer negligible. In those regimes the van der Waals equation is used.
How this calculation works
Equation of state: P·V = n·R·T, with T in kelvin and R = 0.0821 L·atm/(mol·K) when pressure and volume are in atmospheres and litres (equivalent to 8.314 J/(mol·K) in SI). Solved forms: P = nRT/V, V = nRT/P, n = PV/(RT), T = PV/(nR). Temperature conversion: T(K) = t(°C) + 273.15. Transformation at constant amount of gas: P₁V₁/T₁ = P₂V₂/T₂. Special cases: Boyle's law at constant T, P₁V₁ = P₂V₂; Charles's law at constant P, V₁/T₁ = V₂/T₂; Gay-Lussac's law at constant V, P₁/T₁ = P₂/T₂.