Quick Answer: One mole of an ideal gas at 0 °C and 1 atm occupies 22.414 L, from V = nRT/P with the gas constant R = 8.31446261815324 J/(mol·K).
What does this calculator do?
This ideal gas law calculator solves PV = nRT for whichever of the four quantities you leave out: pressure, volume, amount of gas in moles, or temperature.
It is the gas law calculator for most chemistry and physics homework, and for quick estimates of how much gas fits in a container or how pressure changes when a sealed vessel warms up.
The equation ties together four measurable things through one constant. R, the molar gas constant, is the Avogadro constant times the Boltzmann constant. Since the 2019 revision of the SI both of those are exact, so R is exact too: 8.31446261815324 J/(mol·K), the value NIST lists in the CODATA tables. The calculator uses it to all of those digits.
Units are the usual stumbling block, because R in J/(mol·K) only works with pascals, cubic metres and kelvins. The calculator accepts pressure in atmospheres, kilopascals, pascals, bar, psi, mmHg or torr; volume in litres, millilitres, cubic metres or cubic feet; and temperature in Celsius, kelvins or Fahrenheit. It converts all of them to SI before solving and converts the answer back to the unit you picked. Temperatures below absolute zero are refused.
Using the Ideal Gas Law Calculator
- Choose what to solve for. The box for that quantity is hidden, and its unit menu sets the unit of the answer.
- Enter the other three values and choose their units.
- The unit menu of the quantity you solve for sets the unit of the answer.
- Read the result at the top. The cards repeat every quantity in common units, give the volume per mole and show the value of R used.
How is this calculated?
- Convert to SI. Pressure to pascals (1 atm is 101,325 Pa and 1 bar is 100,000 Pa exactly), volume to cubic metres, and temperature to kelvins (K = °C + 273.15).
- Solve PV = nRT for the missing quantity:
P = nRT/V; V = nRT/P; n = PV/RT; T = PV/nR
R = N_Ak = 8.31446261815324 J mol⁻¹ K⁻¹
- Check the inputs. A temperature at or below absolute zero, a zero volume when solving for pressure, a zero pressure when solving for volume and a zero amount when solving for temperature are refused, because each would divide by zero or describe something impossible.
- Convert back and round. The answer is converted to your unit, every quantity is also shown in kPa, atm, litres, moles, kelvins and °C, and the volume per mole is V/n. Results are rounded half up to six significant figures.
Worked Example
The default inputs are 1 mol of gas at 0 °C and 1 atm, solving for volume:
- Temperature: 0 °C = 273.15 K. Pressure: 1 atm = 101,325 Pa.
- V = 1 × 8.31446261815324 × 273.15 ÷ 101,325 = 0.0224140 m³.
- In litres: 22.414 L.
Squeezing 0.5 mol into 2 L at 25 °C gives a pressure of 619.739 kPa, or 6.11635 atm.
A 50 m³ room of air at 20 °C and 101.325 kPa holds about 2,078.56 mol of gas, 24.0551 L per mole.
Solving for temperature, 2 mol in 50 L at 1 bar must be at 300.681 K, which is 27.5309 °C.
The Molar Volume of a Gas
At a fixed temperature and pressure, every ideal gas takes up the same volume per mole, whatever it is made of. At 0 °C and 1 atm that is 22.414 L. The figure rises with temperature: the reference table on this page gives 24.0551 L at 20 °C and 24.4654 L at 25 °C, all at 1 atm. Some textbooks define standard conditions as 0 °C and 1 bar instead, which gives a slightly larger volume; check which your course uses.
How to Calculate Partial Pressure
In a mixture of ideal gases, each gas exerts the pressure it would exert if it were alone in the container (Dalton's law). To find the partial pressure of one gas, solve for pressure using only that gas's moles, with the full volume and temperature. The total pressure is the sum of the partial pressures. Equivalently, a gas's partial pressure is its mole fraction times the total pressure.
What does this calculator not account for?
- Real gas behaviour. Real gases deviate from PV = nRT at high pressures and low temperatures, where molecules are close together and attract one another. The van der Waals and other real-gas equations correct for this; this calculator does not.
- Condensation. A vapour such as steam near its boiling point is not an ideal gas, and below its dew point it starts turning to liquid.
- Gauge pressure. Tyre gauges read pressure above atmospheric. PV = nRT needs absolute pressure, so add atmospheric pressure to a gauge reading first.
- Changing amounts. The calculator works one state at a time. For a gas that is heated or compressed in a sealed container, solve each state separately, or use the ratio forms such as P₁/T₁ = P₂/T₂.
- Gas mixtures by mass. The amount is entered in moles. To use grams, divide by the molar mass first; the grams to moles calculator does that.
What mistakes do people make with this?
- Using Celsius in the formula. Temperature must be absolute. 25 °C is 298.15 K; putting 25 into PV = nRT is wrong by a factor of about twelve.
- Mixing R values and units. R = 0.082057 L·atm/(mol·K) and R = 8.314 J/(mol·K) are the same constant in different units. The calculator avoids the issue by converting to SI.
- Litres versus cubic metres. 1 m³ is 1,000 L.
- Gauge versus absolute pressure. See above; a flat tyre is at zero gauge pressure but still at one atmosphere absolute.
- Using STP without checking the definition. 0 °C with 1 atm and 0 °C with 1 bar are both called standard conditions in different places.
Frequently Asked Questions
What is the ideal gas law?
What is the value of R?
Is a perfect gas the same as an ideal gas?
How do I find the number of moles of a gas?
Why does the volume of a mole depend on temperature?
Can I use Fahrenheit?
Sources
- NIST, CODATA Value: molar gas constant, R = 8.314462618... J mol⁻¹ K⁻¹ (exact). physics.nist.gov/cgi-bin/cuu/Value
- NIST, CODATA Value: Avogadro constant, N_A = 6.02214076 × 10²³ mol⁻¹ (exact). physics.nist.gov/cgi-bin/cuu/Value
- NIST Special Publication 811, Guide for the Use of the International System of Units, Appendix B: the standard atmosphere, bar, psi, torr and mmHg. nist.gov/pml/special-publication-811
- BIPM, The International System of Units (SI Brochure, 9th edition): the kelvin, the mole and the fixed values of N_A and k. bipm.org/en/publications/si-brochure

