CCalclabhub

The Ideal Gas Law Calculator

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.

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.

The formula this calculator uses

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

How to check the result by hand

  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.

For worked examples, common mistakes and the limits of this formula, read the full How To Calculate The Ideal Gas Law page.