About
Ideal gas law PV = nRT relates pressure, volume, moles, and temperature for ideal gases. Real gases deviate at high pressure / low temperature. R = 0.08206 L·atm/(mol·K) when units are atm + L. STP: 1 atm, 273.15 K - 1 mol = 22.414 L.
Formula
Frequently asked questions
What value of R should I use in PV = nRT?
It depends on your units. With pressure in atmospheres and volume in litres, use R = 0.08206 L-atm/(mol-K). With SI units (pressure in pascals, volume in cubic metres), use R = 8.314 J/(mol-K). If pressure is in mmHg or torr, R = 62.36 L-torr/(mol-K). The gas constant is the same physical quantity expressed in different units, so the trick is to match R to the units you entered.
Why must temperature be in Kelvin for the ideal gas law?
PV = nRT is a direct proportionality between pressure-volume and temperature, and that proportionality only holds from absolute zero. Celsius and Fahrenheit have arbitrary zero points, so plugging in 0 degrees C would wrongly imply zero pressure or volume. Convert first: Kelvin = Celsius + 273.15. At 25 degrees C you would use 298.15 K.
What is standard temperature and pressure (STP)?
The classic STP definition is 0 degrees C (273.15 K) and 1 atm. Under those conditions one mole of an ideal gas occupies 22.414 litres, the molar volume. IUPAC redefined STP in 1982 to 0 degrees C and 100 kPa (1 bar), which gives a molar volume of 22.711 litres. Always check which standard a problem assumes, because the two differ by about 1.3 percent.
When does a real gas stop behaving ideally?
The ideal gas law assumes molecules have no volume and do not attract each other. That breaks down at high pressure (molecules are forced close together) and at low temperature (attractions matter when kinetic energy is low). Near the boiling point or above roughly 10 atm, real gases deviate by several percent and the van der Waals equation gives a better fit.
How do I solve for moles or volume instead of pressure?
Rearrange the single equation. For moles, n = PV / (RT). For volume, V = nRT / P. For temperature, T = PV / (nR). The calculator does this automatically when you pick a variable from the Solve for menu, but the algebra is just isolating the unknown on one side.
About the ideal gas law
The ideal gas law, written PV = nRT, is the single equation that ties together the four properties used to describe a gas: pressure (P), volume (V), the amount of gas in moles (n), and absolute temperature (T). The constant R links them, and its value depends only on the units you choose. The law is a combination of three older relationships: Boyle's law (pressure and volume are inversely related at fixed temperature), Charles's law (volume rises with temperature at fixed pressure), and Avogadro's law (volume scales with the number of molecules). Bundling them gives one formula that solves for any one variable when you know the other three.
The word ideal signals an assumption: the gas molecules are treated as points with no volume of their own, and they neither attract nor repel one another except during brief elastic collisions. Real gases obey this almost perfectly at everyday temperatures and pressures, which is why the ideal gas law is accurate enough for chemistry homework, scuba diving tables, weather balloons, and engine intake calculations. It only starts to drift when conditions push molecules close together.
How the formula works
The whole tool rests on one equation that you rearrange to isolate the unknown.
PV = nRT Solve for P: P = nRT / V Solve for V: V = nRT / P Solve for n: n = PV / (RT) Solve for T: T = PV / (nR) R = 0.08206 L-atm/(mol-K) when P is in atm and V in litres R = 8.314 J/(mol-K) when P is in pascals and V in cubic metres
- P is absolute pressure, not gauge pressure. A tyre gauge reading of 0 means atmospheric pressure, not a vacuum.
- T must be in Kelvin. Convert from Celsius with K = degrees C + 273.15.
- n is moles. To get moles from mass, divide grams by the molar mass (for example 32 g/mol for oxygen gas).
- R is fixed in nature but expressed in whichever units match P and V.
Worked example
How much volume does 2 moles of an ideal gas occupy at 1 atm and 273.15 K (0 degrees C)?
- Pick the rearrangement: we want V, so V = nRT / P.
- Insert values: V = (2 mol x 0.08206 L-atm/(mol-K) x 273.15 K) / 1 atm.
- Multiply the top: 2 x 0.08206 x 273.15 = 44.83 L-atm.
- Divide by pressure: 44.83 / 1 = 44.83 litres.
Gas constant R in common units
| Pressure unit | Volume unit | R value | Typical use |
|---|---|---|---|
| atm | litres | 0.08206 L-atm/(mol-K) | General chemistry |
| pascal (Pa) | cubic metres | 8.314 J/(mol-K) | Physics and SI work |
| kPa | litres | 8.314 L-kPa/(mol-K) | IUPAC STP problems |
| mmHg / torr | litres | 62.36 L-torr/(mol-K) | Lab manometers |
| bar | litres | 0.08314 L-bar/(mol-K) | Engineering |
Common pitfalls
- Leaving temperature in Celsius. The single most frequent error. Always convert to Kelvin before substituting.
- Mismatching R and the units. Using 0.08206 with pressure in pascals gives an answer off by a factor of about 100,000. Match R to P and V.
- Using gauge pressure. Pressure must be absolute. Add atmospheric pressure (about 1 atm or 101.3 kPa) to a gauge reading.
- Applying it to non-ideal conditions. Near a gas's boiling point or above roughly 10 atm, switch to the van der Waals equation for accuracy.
- Confusing mass with moles. n is moles, not grams. Divide mass by molar mass first.
