Ideal Gas Law Calculator
Solve the ideal gas law, PV = nRT, for pressure, volume, moles or temperature with unit conversion, the working shown and molar volume alongside.
Calculator
Converted to kelvin internally. Gas laws are invalid on °C.
- Molar volume 22.414 L/mol at 0 °C and 1 atm; 24.465 L/mol at 25 °C and 1 atm; 24.790 L/mol at 25 °C and 1 bar.
- 22.4 L/mol
- Concentration
- 44.64 mmol/L
- Molecules
- 6.022 × 10²³
Working, with your numbers
- P = nRT / V
- = (1 × 8.31446 × 273.15) / 0.0224
- = 101,390 Pa
Values are converted into the units the equation is worked in before the arithmetic.
Use this answer in
Cite this tool
Citing this tool
Last updated . Add the date you accessed it as well, which a citation of a page that can change asks for. If a specific result matters, cite the permalink from the tool’s share row instead of this page: it reproduces the exact parameters.
The equation
Clapeyron (1834), combining the Boyle, Charles and Avogadro laws
The equation as an image to reuse
What is the ideal gas law formula?
The ideal gas law equation is PV = nRT, which models the state of a hypothetical ideal gas by relating absolute pressure (P) and volume (V) to the molar amount (n), the ideal gas constant (R ≈ 8.314 J/(mol·K) or 0.08206 L·atm/(mol·K)), and absolute temperature in kelvin (T). Any one of the four gas state variables can be solved directly when the remaining three values are known.
What PV = nRT is saying
The product of pressure P and volume V equals the
amount of gas n in moles times the gas constant R
times the temperature T in kelvin. It bundles three older
observations into one statement. Boyle found that pressure and volume are
inversely proportional at fixed temperature, Charles found that volume
rises in proportion to absolute temperature, and Avogadro found that equal
volumes of gas at the same conditions hold equal numbers of particles. Put
together,
PV = nRT says the product of pressure and volume is fixed by
how much gas you have and how hot it is.
The gas constant R = 8.31446261815324 J/(mol·K) is exact under the 2019 SI, being the product of the Avogadro and Boltzmann constants, and 8.314463 to seven figures. You may also meet it as 0.082057 L·atm/(mol·K), which is the same constant in units that suit litres and atmospheres. This calculator converts everything to pascals, cubic metres and kelvin internally, so you can mix atmospheres with millilitres safely.
Worked example
How many moles of gas fill a 2.5 L vessel at 3.0 atm and 25 °C?
- Convert: 3.0 atm is 303,975 Pa, 2.5 L is 0.0025 m³, 25 °C is 298.15 K.
n = PV / RT = (303975 × 0.0025) / (8.314463 × 298.15)n = 759.94 / 2478.96 = 0.3066 mol
Switch the solve-for selector to "Amount of gas", enter those three values in whatever units you like, and you get the same figure without doing any conversions by hand.
Molar volume, and why the conditions matter
One mole of an ideal gas occupies 22.414 L at 0 °C and 1 atm. That is the number most people memorise, but it is only true for those exact conditions. At 25 °C and 1 atm it is 24.465 L/mol, and against the IUPAC standard pressure of 1 bar the figures become 22.711 and 24.790 L/mol respectively.
"Standard conditions" has meant different things at different times, which is why a molar volume quoted without its temperature and pressure is not usable. The calculator reports molar volume alongside your answer so you can see which case you are actually in.
Common mistakes
- Using Celsius. The law is proportional in absolute temperature. At 0 °C a Celsius substitution predicts zero pressure, which is plainly wrong. Always kelvin.
- Mismatched volume and pressure units. Pascals demand cubic metres. Pairing pascals with litres is out by a factor of a thousand.
- Treating ΔT like T. A gas heated by 10 K has not had its pressure raised by a factor of ten. Only ratios of absolute temperatures matter.
- Applying it near condensation. Close to the boiling point, or at very high pressure, molecular volume and attraction stop being negligible and the law drifts. How far depends on the gas. At 25 °C nitrogen and oxygen stay within 0.4 percent of ideal up to 5 atm, while carbon dioxide is about 1 percent off at 2 atm and ammonia at 1 atm.
Sources
The 2022 CODATA values from NIST for the molar gas constant, exact and equal to the Avogadro constant times the Boltzmann constant, the molar volume of an ideal gas at 273.15 K and 101.325 kPa and at 273.15 K and 100 kPa, the standard atmosphere of 101 325 Pa and the standard-state pressure of 100 000 Pa. The 25 °C molar volumes and 0.082057 L·atm/(mol·K) follow from these. NIST, SI redefinition, for the 2019 change, and SP 811, Appendix B.8, for the liter of 10⁻³ m³. OpenStax, Chemistry 2e, section 9.2, for the Boyle, Charles and Avogadro laws and for IUPAC changing standard pressure from 1 atm to 1 bar in 1982. The NIST Chemistry WebBook’s data at 25 °C for nitrogen, oxygen, carbon dioxide and ammonia, for how far each gas departs from ideal.
Converting units first? Use the volume, amount of substance, pressure and temperature conversion tables.
Constants used: Avogadro constant (NA) and Molar gas constant (R).
How to calculate pressure with the ideal gas law
- Write down the formula:
P = nRT / V -
Gather the values it needs. The calculator above starts with these:
- Volume: V = 22.4 L
- Amount of gas: n = 1 mol
- Temperature: T = 0 °C
-
Substitute them and work through the arithmetic:
- P = nRT / V
- = (1 × 8.31446 × 273.15) / 0.0224
- = 101,390 Pa
-
To find one of the other values instead, rearrange the formula for it:
- Volume:
V = nRT / P - Amount of gas:
n = PV / RT - Temperature:
T = PV / nR
- Volume:
More worked examples
Each one runs through the calculator above, so the arithmetic here is the arithmetic it does.
What volume does 1 mole of any gas occupy at STP (0 °C and 1 atm)?
- V = nRT / P
- = (1 × 8.31446 × 273.15) / 101,325
- = 0.022414 m3 = 22.414 L
The 22.4 litres worth committing to memory, and note what it does not depend on: not the gas, not the molar mass, nothing but pressure and temperature. At 25 °C rather than 0 °C it is 24.5 L, which is why a question specifying room temperature wants a different number. Since 1982 IUPAC has defined STP as 0 °C and 1 bar, which gives 22.711 L, so check which definition your course uses.
What pressure does 2 moles of gas exert in a 10 litre container at 25 degrees?
- P = nRT / V
- = (2 × 8.31446 × 298.15) / 0.01
- = 495,790 Pa
The temperature has to become 298.15 K before it enters the equation. Using 25 directly gives a pressure about twelve times too low, and it is the error the calculator’s unit selector exists to prevent.
How many moles of gas are in a 2 litre bottle at 3 atmospheres and 20 degrees?
- n = PV / RT
- = (303,975 × 0.002) / (8.31446 × 293.15)
- = 0.24943 mol
Solving for the amount of gas rather than a state variable, which is what the ideal gas law can do and the combined gas law cannot: the combined law cancels n and R, so it never asks how much gas is present.
Common questions
Why must temperature be in kelvin?
Because the law is proportional in absolute temperature. Doubling from 10 °C to 20 °C does not double the pressure, but doubling from 283 K to 566 K does. Using Celsius makes the arithmetic meaningless and breaks entirely at 0 °C, where it would predict zero pressure. This tool converts for you.
What is the molar volume of a gas?
It is 22.414 L/mol at 0 °C and 1 atm, and 24.465 L/mol at 25 °C and 1 atm. Against the IUPAC standard pressure of 1 bar the figures are 22.711 and 24.790 L/mol. Quoting a molar volume without stating the conditions is the most common source of confusion here.
When does the ideal gas law stop working?
At high pressure and low temperature, where molecular volume and intermolecular attraction stop being negligible. How far off it is depends on the gas: at 25 °C nitrogen and oxygen stay within 0.4 percent of ideal up to 5 atm, while carbon dioxide is about 1 percent off at 2 atm and ammonia at 1 atm. Near condensation, use a real-gas equation such as van der Waals instead.