CCalclabhub

Chemistry

How To Calculate The Ideal Gas Law

The ideal gas law ties pressure, volume, amount and temperature into one equation, and the only genuinely awkward part is choosing the right value of R for the units you are holding.

Quick Answer

PV = nRT

P
Pressure of the gas
V
Volume occupied by the gas
n
Amount of gas in moles
R
Gas constant — its value depends on the pressure and volume units
T
Absolute temperature, always in kelvin

Multiply pressure by volume, then divide by the gas constant and the absolute temperature to get the amount of gas. For 101.325 kPa, 22.4 litres and 273.15 K, that gives 0.9993767483 moles, essentially one mole. The value of R must match the units: 8.314462618 for kilopascals and litres, 0.08206 for atmospheres and litres, 8.314 for pascals and cubic metres, and 62.36 for millimetres of mercury and litres. Temperature is always in kelvin, so add 273.15 to any Celsius reading before substituting.

What Is The Ideal Gas Law?

The ideal gas law is the equation of state written PV = nRT. It states that for a fixed amount of gas, the product of pressure and volume is proportional to the absolute temperature, the constant of proportionality being nR. Because four quantities are linked, fixing any three fixes the fourth, which is what makes the equation so widely used. Boyle's law, Charles's law and Avogadro's law are all special cases of it, recovered by holding two of the variables constant. That economy is the reason it is taught as a single relation rather than as three separate ones.

The letter R is called the gas constant, and it is the part of the equation that confuses people most. R is a genuine physical constant, equal to the Avogadro constant multiplied by the Boltzmann constant, but its numerical value depends entirely on the units chosen for pressure and volume. Write pressure in kilopascals and volume in litres and R is 8.314462618; write pressure in atmospheres and volume in litres and R is 0.08206. The constant has not changed; only the way it is expressed has. Understanding this before substituting anything is the single most useful habit you can build on this topic.

Four values of R cover nearly every school and laboratory problem. With pressure in kilopascals and volume in litres, R is 8.314462618. With pressure in atmospheres and volume in litres, R is 0.08206. With pressure in pascals and volume in cubic metres, R is again 8.314, because the pascal multiplied by the cubic metre is the joule, the same case in disguise. With pressure in millimetres of mercury and volume in litres, R is 62.36. Pairing any of these with the wrong pressure or volume unit is the most frequent error on the topic, and it is the one this page exists to prevent.

Temperature in the ideal gas law is always absolute, which for practical purposes means kelvin. The equation is built on a scale that begins at absolute zero, so a Celsius reading has to be shifted by 273.15 before it can be used. Substituting 25 for a room temperature of 25 C, when the correct value is 298.15 K, understates the temperature by a factor of roughly twelve. The resulting error is not a rounding difference but an order-of-magnitude one, and it usually shows up as an absurd number of moles. Convert first, then substitute.

At standard temperature and pressure, one mole of an ideal gas occupies a volume that textbooks round to 22.4 litres. The exact value at 0 C and 101.325 kPa is 22.4139695 litres, so 22.4 is a convenience rather than a definition. This is why the worked calculation on this page returns 0.9993767483 moles for 22.4 litres instead of exactly one mole. The shortfall of about 0.06 per cent is the rounding in the textbook figure showing through the arithmetic. Treating 22.4 as exact quietly caps the accuracy of everything built on it.

The two standard states that appear in questions are not interchangeable. STP, standard temperature and pressure, is defined at 0 C, while SATP, standard ambient temperature and pressure, is defined at 25 C. The reference pressure has also shifted over time, from one atmosphere at 101.325 kPa to exactly 100 kPa under the current IUPAC convention. Because SATP is the warmer of the two, the molar volume there is larger than at STP, and the difference is not negligible in careful work. Always establish which standard a question intends before quoting a molar volume, because the two answers differ by a few per cent.

The word ideal in the name is a warning as much as a description. An ideal gas is an imaginary substance whose particles have no volume of their own and exert no forces on one another. Real gases approach that picture at low pressure and high temperature, where the molecules are far apart and moving quickly. At high pressure or near the point of condensation the approximations break down, because molecular volume and intermolecular attraction both start to matter. The van der Waals equation adds two correction terms to patch these failures, which is why it appears whenever real-gas accuracy is needed.

Rearranging the law is straightforward once the units are settled. Solving for amount gives n = PV / RT; solving for volume gives V = nRT / P; solving for pressure gives P = nRT / V. A useful variant replaces n with mass divided by molar mass, producing PM = dRT, which connects the law to gas density and lets a measured density yield a molar mass. Dividing through by n gives the molar volume Vm = V / n = RT / P, the quantity that turns 22.4139695 litres per mole into a property of the conditions rather than of the gas. Every one of these forms is the same equation seen from a different angle.

Precision should follow the inputs, as it does everywhere else. The gas constant is known to many digits, but the pressure and temperature you measure rarely are, so carry full precision through the arithmetic and round only the final answer. A temperature read to the nearest degree does not justify six decimal places in the result. The one place where extra digits genuinely matter is the gap between 22.4 and 22.4139695, which is small but real and occasionally the difference between a correct and an incorrect exam answer. Report an answer that the measurement can defend.

Formula

P V = n R T

The full equation of state. Pressure times volume on one side, amount times gas constant times absolute temperature on the other.

SymbolMeaning
PPressure of the gas
VVolume occupied by the gas
TAbsolute temperature

n = P V / (R T)

The rearrangement used most often. Pressure and volume multiply on top; the gas constant and temperature divide below.

SymbolMeaning
nAmount of gas in moles
RGas constant in the units you are using

V m = V / n = R T / P

The volume one mole occupies. At 0 C and 101.325 kPa it equals 22.4139695 litres per mole.

SymbolMeaning
V mMolar volume
PPressure at which the molar volume is measured

How To Calculate The Ideal Gas Law

  1. 1

    Convert every temperature to kelvin first

    Add 273.15 to any Celsius reading before it goes anywhere near the formula: 25 C becomes 298.15 K. A Celsius number substituted directly understates the temperature by a factor of about twelve and produces a wildly wrong amount. Absolute zero is 0 K, or -273.15 C, and no legitimate reading sits below it.

  2. 2

    Put pressure and volume into matching units

    Decide on one unit system and stay inside it. Kilopascals go with litres, atmospheres go with litres, pascals go with cubic metres, and millimetres of mercury go with litres. Write the units down beside the numbers, because a volume given in millilitres has to be divided by 1000 before it joins the calculation.

  3. 3

    Pick the value of R that matches those units

    Use 8.314462618 for kilopascals and litres, 0.08206 for atmospheres and litres, 8.314 for pascals and cubic metres, and 62.36 for millimetres of mercury and litres. The wrong choice is not a small error: using 8.314 where 0.08206 belongs inflates the answer by a factor of about 101.

  4. 4

    Rearrange PV = nRT for the quantity you want

    Solving for amount gives n = PV / RT, with pressure and volume multiplied together on the same side and the gas constant and temperature dividing beneath them. Solving for volume gives V = nRT / P. Do the rearrangement on paper before substituting, so the units of the answer are obvious before any arithmetic begins.

  5. 5

    Substitute, then sanity-check the size of the answer

    The default case of 101.325 kPa, 22.4 litres and 273.15 K gives 0.9993767483 moles, close to the one mole a textbook expects. If a molar amount comes out near a thousand or near a thousandth, the units are almost certainly mismatched rather than the arithmetic being wrong.

Examples

Example 1: One mole of gas at standard temperature and pressure

Pressure
101.325 kPa
Volume
22.4 L
Temperature
273.15 K
StepCalculationResult
Gas constant for kilopascals and litresR = 8.314462618 kPa L /(mol K)8.314462618
Pressure multiplied by volume101.325 x 22.42269.68
Temperature multiplied by the gas constant273.15 x 8.3144626182271.0954641
Molar volume at these conditions8.314462618 x 273.15 / 101.32522.4139695
Amount of gas2269.68 / 2271.09546410.9993767483

Result: The 22.4 litres holds 0.9993767483 mol, essentially one mole, because the exact molar volume at these conditions is 22.4139695 litres and 22.4 is only the rounded textbook figure.

Example 2: The same gas described with the atmosphere-based constant

Pressure
1 atm
Volume
22.4 L
Temperature
273.15 K
StepCalculationResult
Gas constant for atmospheres and litresR = 0.08206 atm L /(mol K)0.08206
Temperature multiplied by the gas constant273.15 x 0.0820622.414689
Amount of gas22.4 / 22.4146890.9993447

Result: Switching the gas constant to 0.08206 with the pressure in atmospheres returns 0.9993447 mol, the same physical answer to within rounding, which shows that R is chosen to match the units rather than being a different constant.

Example 3: Finding a volume from an amount at room temperature

Amount
2 mol
Pressure
100 kPa
Temperature
298.15 K
StepCalculationResult
Gas constant for kilopascals and litresR = 8.314462618 kPa L /(mol K)8.314462618
Temperature multiplied by the gas constant298.15 x 8.3144626182478.95703
Amount multiplied by RT2 x 2478.957034957.91406
Volume after dividing by pressure4957.91406 / 10049.57914

Result: Two moles at 100 kPa and 298.15 K occupy 49.57914 litres, found by rearranging the law to V = nRT / P and keeping every quantity in kilopascals and litres.

Calculator

Amount of gas in moles

0.9994

The gas constant in the units used here
8.3145
Pressure restated in atmospheres
1
Molar volume at standard temperature and pressure
22.414

Values update as you type. This calculator covers the single scenario its formula assumes — see Common Mistakes for what it leaves out.

Prefer a full-width tool? Open the The Ideal Gas Law calculator page.

Common Mistakes

  • Substituting a Celsius temperature directly

    The formula needs absolute temperature, so a reading in Celsius must be increased by 273.15 first. Using 25 instead of 298.15 K makes the temperature roughly twelve times too small and the calculated amount of gas roughly twelve times too large. It is the most damaging single mistake on the topic because the wrong answer still looks like an ordinary number.

  • Choosing a value of R that does not match the units

    R is 8.314462618 for kilopascals and litres but 0.08206 for atmospheres and litres. Selecting the wrong one changes the answer by a factor of about 101, with nothing in the arithmetic to warn you that it happened. Write the units of R beside the numbers so the mismatch becomes visible before you multiply.

  • Using the atmosphere value of R with a pressure in kilopascals

    This is the specific version of the unit error that catches most students: the pressure is left in kilopascals while R is taken as 0.08206, which expects atmospheres. One standard atmosphere is 101.325 kPa, so the two are not interchangeable. Either convert the pressure to atmospheres or switch R to 8.314462618.

  • Feeding a volume in millilitres into the equation

    The familiar values of R are built for litres, so a volume given in millilitres must be divided by 1000 before use. Substituting 500 for 500 mL understates the volume by a factor of a thousand and skews the result correspondingly. Convert to litres, or switch to a cubic-metre-based R with the volume in cubic metres, but never mix the two.

  • Treating 22.4 litres as an exact definition

    The exact molar volume at 0 C and 101.325 kPa is 22.4139695 litres, so 22.4 is an approximation about 0.06 per cent low. Using it as though it were exact caps the accuracy of every answer built on it, and it is why 22.4 litres of gas at standard conditions works out to 0.9993767483 moles rather than exactly one.

FAQ

Which value of R should I use?

The one whose units match your pressure and volume. Use 8.314462618 for kilopascals and litres, 0.08206 for atmospheres and litres, 8.314 for pascals and cubic metres, and 62.36 for millimetres of mercury and litres. If the pressure and volume units are consistent with each other, exactly one of these is correct.

Why must the temperature be in kelvin?

Because the law is proportional to absolute temperature, measured from absolute zero. The Celsius scale starts at the freezing point of water, so it has no physical zero to be proportional to. Add 273.15 to convert: 0 C is 273.15 K. Substituting a Celsius value directly is the single largest source of error on this topic.

What is the difference between STP and SATP?

STP is standard temperature and pressure at 0 C, and SATP is standard ambient temperature and pressure at 25 C. Both now use 100 kPa as the reference pressure under IUPAC, though older texts still use 101.325 kPa for STP. Because SATP is warmer, its molar volume is larger, so the two standards give different answers.

When does the ideal gas law stop working?

At high pressure and low temperature, where the gas is compressed or close to condensing. Under those conditions the volume of the molecules themselves and the attraction between them both become significant, and the simple equation drifts from the measured behaviour. The van der Waals equation adds corrections for both effects and does better in that region.

Is 22.4 litres per mole exact?

No. It is the textbook rounding of 22.4139695 litres, the molar volume at 0 C and 101.325 kPa. The rounded figure is convenient for quick estimates but introduces a small error that grows with the amount of gas. Use 22.4139695, or compute RT / P directly, whenever the answer has to be precise.

References

  1. [1]Wikipedia, Ideal gas law — https://en.wikipedia.org/wiki/Ideal_gas_law
  2. [2]Wikipedia, Gas constant — https://en.wikipedia.org/wiki/Gas_constant
  3. [3]Wikipedia, Standard temperature and pressure — https://en.wikipedia.org/wiki/Standard_temperature_and_pressure