Ideal Gas Law Calculator
Result
Pressure
- Gas volume
- 22.4140 L
- Temperature
- 0.00 °C
- Moles of gas
- 1.000000 mol
Ideal gas law calculator: fill in any three of pressure, volume, temperature and moles, and the fourth is worked out from pV = nRT. Leave empty the one you want — that box is the answer, not a gap you have to fill. Twenty-two point four one four litres of gas at 0 °C holding one mole comes back as 101.325 kPa, which is one atmosphere to the last digit, and that is not a coincidence: the gas constant is a measured number of nature and one atmosphere is the pressure the old definition of the mole was built around. Pressure is the row most people are after, which is why it is the one left empty on load. Fill in all four and the page stops solving and starts checking, reporting a disagreement instead of quietly believing three of them.
The gas constant in six unit systems
| Unit notation | Value of R |
|---|---|
| J/(mol·K) | 8.31446 |
| L·kPa/(mol·K) | 8.31446 |
| L·bar/(mol·K) | 0.08314 |
| L·atm/(mol·K) | 0.08206 |
| L·mmHg/(mol·K) | 62.36359 |
| cal/(mol·K) | 1.9872 |
The only number in pV = nRT that people get wrong is R, and the reason is in the first two rows: they are identical, and that is not a copy error. One litre-kilopascal is exactly one joule, so the two rows are the same number measured in units that happen to be equal — which is the whole argument for putting the pressure box in kilopascals and the volume box in litres, since that pairing keeps the arithmetic to a single 8.314. Read the rest of the table as a lookup: match the units of your pressure and volume, and the value beside it is the one to use. The 0.08206 row is the one most older textbooks print, because they set the pressure in atmospheres and the volume in litres, and typing 8.314 next to an atmosphere is the classic way to be wrong by a factor of a hundred while every step looks fine.
The molar volume of an ideal gas at four reference conditions
| Temperature (°C) | Pressure (kPa) | Molar volume (L/mol) |
|---|---|---|
| 0 | 101.325 | 22.41397 |
| 25 | 101.325 | 24.4654 |
| 0 | 100 | 22.71095 |
| 25 | 100 | 24.78957 |
Read the table down the pressure column: the first and third rows hold 0 °C and the second and fourth hold 25 °C, so the volume rises with temperature at a fixed pressure — by 9.2% for a 25 °C rise, since the kelvin scale goes from 273.15 to 298.15. Read it across the pressure rows instead and the volume falls as the pressure rises, from 22.414 L at one atmosphere to 22.711 L at 100 kPa. The 1.3% gap between those two numbers at 0 °C is the reason 22.4 and 22.7 both turn up in textbooks: the standard state has been redefined, one atmosphere in the older definition and 100 kPa in the newer one, and the molar volume follows from whichever you use. Every number in the right-hand column is computed from the equation with one mole of gas rather than looked up, so this table and the calculator cannot disagree.
Formula
pV = nRT, rearranged for whichever of the four quantities you leave empty
- p
- The absolute pressure, in kilopascals by default, with pascals, bar, millibars, hectopascals, atmospheres, psi, millimetres of mercury, torr and inches of mercury in the same box. It is absolute pressure and not gauge pressure: a tyre gauge reads the difference from the surrounding air, so the 200 kPa it shows on a car tyre is roughly 300 kPa of the quantity this equation wants. Kilopascals are the base unit for a reason worth knowing — one litre-kilopascal is exactly one joule, so the gas constant is 8.314 in both J/(mol·K) and L·kPa/(mol·K), and the litre and the kilopascal are the pair that makes the constant come out as the familiar 8.314 in one multiplication
- V
- The volume the gas occupies, in litres, with millilitres, cubic metres, cubic centimetres, cubic feet, cubic inches and US gallons in the same box. The litre is the base unit because it pairs with the kilopascal as described above. Zero is accepted and is a real answer rather than an error: with no volume the equation has no gas to describe, and the page reports the pressure as undefined rather than inventing a number for it. Negative volumes are rejected, since a gas cannot occupy less than nothing
- n
- The amount of gas in moles, with millimoles and kilomoles selectable in the same box. A mole is a count and not a mass: 6.02214076 × 10²³ particles, so one mole of nitrogen weighs about 28 grams while one mole of helium weighs about 4, and both take up the same 22.414 litres under the same conditions. That is the whole point of counting particles instead of weighing them, and it is why this box is the one that connects the equation to chemistry. If you have a mass in grams rather than a number of moles, divide by the molar mass first
- T
- The absolute temperature, in degrees Celsius, degrees Fahrenheit or kelvin. Only kelvin works inside the arithmetic, and the reason is physical rather than conventional: the equation is about how hard the particles are hitting the walls, and zero on the kelvin scale is where that motion stops. So doubling 20 °C to 40 °C does not double the pressure — it goes from 293 K to 313 K and the pressure rises by about 7%. The box converts whatever you type, and it rejects absolute zero itself, because at −273.15 °C the equation predicts a volume of zero and it is telling you it has stopped describing anything real
- R
- The gas constant, 8.314462618 J/(mol·K), which is also 8.314 L·kPa/(mol·K) — the same number, because a litre-kilopascal is a joule. Under different pressure units it stops being 8.314 and the first table below lists six of those values, including the 0.08206 that older textbooks print for litres and atmospheres. R is measured rather than defined: it is the Boltzmann constant multiplied by the Avogadro constant, which is another way of saying that the pressure of a gas is a per-particle effect counted in bulk
- pV / nT
- The four quantities do not move independently, and the useful way to read the equation is as a statement about the pair of ratios: pV divided by nT is the same number for any gas under any conditions, as long as the gas is ideal. Fix that ratio and everything else follows. Double the moles at a fixed temperature and pressure and the volume doubles; double the kelvin at a fixed volume and the pressure doubles; and heating a sealed container from 20 °C to 40 °C raises the pressure by 7%, not by 100%, because the scale starts at absolute zero rather than at the freezing point of water
Use this page for any gas problem where three of the four quantities are known or wanted and the gas is far enough from condensing for the ideal gas equation to hold, which covers air, nitrogen, oxygen, carbon dioxide and combustion products at ordinary room and process temperatures and at pressures from a rough vacuum up to a few atmospheres. It is the same equation as the combined gas law with one difference: the combined gas law holds the amount of gas fixed and compares two states, while this page treats the amount as a quantity you can solve for, so it also answers questions like how many moles are left in a cylinder. The first table is there for one reason: the gas constant is the only number in the equation people get wrong, and the reason they get it wrong is that it is 8.314 in some units and 0.08206 in others. At 0 °C and one atmosphere the molar volume of a gas is 22.414 litres, and that number falls straight out of the equation with n set to one, which is why it shows up in the second table and in the worked examples below.
Worked examples
The defaults: one mole at 0 °C in 22.414 litres
- Volume 22.414 L, temperature 0 °C, amount 1 mol — pressure left empty
- Convert the temperature to kelvin: 0 °C + 273.15 = 273.15 K
- Rearrange for the quantity that was left empty: p = nRT / V
- p = (1 × 8.314 × 273.15) / 22.414 = 101.325 kPa
- The panel prints 101.325 kPa, which is one standard atmosphere
This is the state the whole equation is calibrated around, and it is worth seeing why it lands exactly on one atmosphere. The gas constant was not chosen to make this work — it was measured — but the mole was defined for most of the twentieth century as the amount of substance in 12 grams of carbon-12, and the atmosphere was defined as a fixed pressure of 101325 pascals. The ideal gas law sits between those two definitions and the number 22.414 litres per mole at 0 °C is the observable consequence: the molar volume of a gas, which is the same for every gas that is close enough to ideal. That is also why the second table below lists it, and why 22.4 is the number most people half-remember from school.
Two moles at 25 °C and one atmosphere: what volume do they take
- Pressure 101.325 kPa, temperature 25 °C, amount 2 mol — volume left empty
- Convert the temperature to kelvin: 25 + 273.15 = 298.15 K
- Rearrange for the volume: V = nRT / p
- V = (2 × 8.314 × 298.15) / 101.325 = 48.9308 L
- The panel prints 48.9308 L, and the volume row carries four decimal places because the litre is a big unit next to the mole
Two things happen at once here and it is worth separating them. Going from one mole to two doubles the volume, because the amount and the volume are directly proportional at a fixed temperature and pressure — that is Avogadro's law, which is the same equation with the other two variables held still. Going from 0 °C to 25 °C does something smaller: 273.15 K to 298.15 K is a factor of 1.092, so the volume grows by 9.2% rather than by 25. That is the kelvin scale doing its work, and it is exactly the arithmetic that goes wrong when someone types 25 into the temperature and treats it as 25 degrees of thermal energy. The result is 48.93 litres, which is also 2 × 24.4654 — the molar volume at 25 °C from the second table.
One mole at 101.325 kPa in 22.414 litres: what temperature is it
- Pressure 101.325 kPa, volume 22.414 L, amount 1 mol — temperature left empty
- Rearrange for the temperature: T = pV / nR
- T = (101.325 × 22.414) / (1 × 8.314) = 273.15 K
- Convert back to the box's unit: 273.15 K − 273.15 = 0.00 °C
- The panel prints 0.00 °C, and this is the first example run in the other direction
The same three numbers as the first example with a different one missing, and the answer comes back as 0 °C to two decimal places. Doing the round trip is the cheapest check that you have understood the page: any two of the four rearrangements agree, and the conversions in and out of kelvin have to cancel exactly for that to happen. The residual is not zero in the arithmetic — it is 0.0004 °C — and it shows up as 0.00 because the temperature row is rounded to two decimal places. That is a rounding artefact of the display and not an error in the calculation, and it is the reason the page does not print a temperature of −0.00.
All four filled in and agreeing
- All four boxes filled with a consistent state
- The page has nothing to solve for, so it inverts the equation four times instead — once for each quantity — and compares each result with the number you typed
- All four agree to within the rounding of the display, so the panel reports the state rather than an error
- Change any one of the four and the same check fails: 102 kPa in place of 101.325 is off by 0.67% and the page says so
Filling all four is allowed and it is the fastest way to check a set of readings, because the page will not average them or pick a winner: it reports the disagreement. That matters more than it sounds. If you measure pressure, volume and temperature in a vessel and work out the moles from an assumed gas constant, the interesting outcome is not the number — it is whether the four are consistent at all, and a page that silently preferred three of them would hide exactly the broken assumption you were trying to catch. Filling only two boxes is not allowed at all, and that is the one behaviour people find surprising: pV = nRT is a single equation, so two quantities leave two unknowns and there is no unique answer to give.
Limitations
The ideal gas law is an approximation and every real gas departs from it. The molecules of a real gas take up space, which matters when they are packed closely, and they attract each other, which matters when they are moving slowly — so the equation is at its worst at high pressure and low temperature, which is precisely where gases are stored and liquefied. The van der Waals equation adds a term for each of those effects and is the usual next step. Air is a mixture rather than a pure gas, though it behaves well enough as one below a few atmospheres. Water vapour is the awkward component: it condenses, so humid air stops following the equation as soon as the water starts to come out of it, and a pressure high enough to liquefy any part of a mixture changes the amount of gas that is left in the gas phase. Everything on this page is also a single equilibrium state, with no allowance for how fast the gas gets there.
Frequently asked questions
- What is the ideal gas law formula?
- pV = nRT: pressure times volume equals the amount of gas in moles times the gas constant times the absolute temperature. Every other form of the ideal gas law equation is that one statement rearranged, and the page rewrites it three more times because the rearrangement you need depends on which box you left empty — p = nRT / V for pressure, V = nRT / p for volume, T = pV / nR for temperature and n = pV / RT for the amount. Reading it as a sentence rather than a formula helps: the pressure a gas exerts rises with the amount of it and with the temperature, and falls as the volume it is squeezed into grows. The two ratios in the equation are what actually stay constant, which is why pV / nT has the same value for any gas under any conditions.
- What is the ideal gas constant and which value do I use?
- The ideal gas constant is 8.314462618 J/(mol·K), and the reason it is not a round number is that it is a measured constant of nature: the Boltzmann constant multiplied by the Avogadro constant. If your pressure is in kilopascals and your volume in litres, that same 8.314 works unchanged, because one litre-kilopascal is exactly one joule. Switch the pressure to atmospheres and it becomes 0.08206; switch the volume to cubic metres and the pressure to pascals and it is still 8.314, since that combination is joules again. The first table on the page lists six of these pairings, and it is worth a look before you copy a value out of a textbook, because copying 8.314 next to a pressure in atmospheres is the single most common way to get an answer that looks reasonable and is wrong by a factor of a hundred.
- What is the molar volume of a gas?
- It is the volume one mole of any ideal gas occupies under stated conditions, and the second table gives it at four of them. At 0 °C and one atmosphere it is 22.414 litres; at 0 °C and 100 kPa it is 22.711 litres; at 25 °C it is 24.465 or 24.790 litres depending on which pressure you pick. The 1.3% difference between the two 0 °C rows is not an error and not rounding: the standard state has two definitions in circulation, one based on one atmosphere and the older one on 100 kPa, and the two molar volumes follow from it. That is why 22.4 and 22.7 both appear in textbooks and why it is worth knowing which one a question is using. The value falls out of the equation with the amount set to one mole, so nothing here needs to be memorised: type the conditions and read the volume row.
- Why does temperature have to be in kelvin?
- Because the equation is about the kinetic energy of the particles, and the kelvin scale is the one whose zero is where that motion stops. Using degrees Celsius would make the arithmetic give a positive answer for a gas at −100 °C, which is nonsense, and would also make doubling the temperature not double the pressure. Work it through with real numbers: heating a sealed vessel from 20 °C to 40 °C takes it from 293 K to 313 K, which is a rise of 6.8%, not 100%. The page accepts Celsius, Fahrenheit or kelvin in the temperature box and converts before doing anything else, so the box is a convenience and not a trap — but the kelvin figure is the one to have in mind when you sanity-check a result.
- How do I use this ideal gas law calculator?
- Fill in exactly three of the four boxes and leave the fourth empty, and the empty one is the answer. Two is not enough and four is a different operation: with only two known quantities there is no unique solution, and with all four the page checks them against each other instead of solving. If the description you are working from gives you a mass of gas rather than an amount, divide by the molar mass before typing it in, and if it gives a gauge pressure rather than an absolute one, add the atmospheric pressure first — a tyre gauge reading 200 kPa is about 300 kPa of the quantity the gas pressure calculator wants. Leave the box empty rather than typing a zero, because a zero is a real value and the page will treat it as one.
- When does the ideal gas law stop working?
- At high pressure and low temperature, which is unfortunately where gases are usually stored and always where they are liquefied. Two assumptions break down: real molecules occupy volume, so the space available to move in is smaller than the container, and they attract one another, so the pressure they exert is lower than the equation predicts. The effect is small for air at room temperature up to a few atmospheres and becomes significant as you approach the conditions where the gas would condense. Water vapour is a special case, since it condenses at ordinary temperatures: once the air is saturated, any further cooling removes water rather than lowering the temperature of the gas, and the equation no longer describes what is in the vessel. For those cases the van der Waals equation or a compressibility factor is the usual next step.
References
- The Ideal Gas Law (College Physics 2e, §13.3) — the equation in both the pV = NkT and pV = nRT forms, the value of the gas constant in several unit systems, and the molar volume at standard temperature and pressure — OpenStax
- Ideal gas law — the derivation from the kinetic theory of gases, the statement of Avogadro's law as the constant-temperature and constant-pressure case, and the list of ways real gases deviate from it — Wikipedia
- NIST Guide for the Use of the International System of Units (SI), Appendix B.8 — Factors for Units Listed Alphabetically: the pascal, the litre and the conversions between the pressure units this page's dropdown offers — NIST