Ideal Gas Law Calculator
The ideal gas law, PV = nRT, ties a gas sample’s pressure, volume, amount and temperature together in a single equation — so any three of them fix the fourth. Pick the one you want, enter the other three, and this returns all four values along with the rearrangement it used to get there. It opens at STP: one mole at 1 atm and 273.15 K, filling 22.414 litres.
- Accurate
- Real-time
- Easy to use
- 100% free
Amount of gas
1.0000 mol
Volume
22.4140 L
Details
Updates as you typeThe other three are the knowns. The box for the unknown is ignored.
Absolute pressure, not gauge pressure. A tyre gauge reading 32 psi is about 46.7 psi absolute.
The volume the gas actually occupies, which for a gas is the whole container.
Moles of gas. Divide a mass in grams by the molar mass to get here.
Absolute temperature drives the gas law, so anything at or below absolute zero is refused.
Summary
Amount of gas
1.0000 mol
- Pressure
- 1.0000 atm
- Volume
- 22.4140 L
- Amount of gas
- 1.0000 mol
- Temperature
- 273.15 K
- Molar volume
- 22.4140 L/mol
- Solved with R = 8.314462618 J·mol⁻¹·K⁻¹, which is exact: since the 2019 SI redefinition R is the product of the fixed Avogadro constant and the fixed Boltzmann constant. Working in litres and atmospheres uses R ÷ 101.325 = 0.082057366 L·atm·mol⁻¹·K⁻¹, because one litre-atmosphere is 101.325 joules exactly.
- PV = nRT treats molecules as points that do not attract one another. Real gases follow it closely near room temperature and ordinary pressure, and depart from it as they are compressed or cooled towards condensing — van der Waals or a compressibility factor Z is the usual next step.
- Pressure here is absolute, measured from vacuum. Tyre and cylinder gauges read the difference from the surrounding air, so add about 14.7 psi, 101.3 kPa or 1 atm to a gauge reading before using it.
How this is calculated
- Pressure (known)
- 1.0000 atm
- Volume (known)
- 22.4140 L
- Temperature (known)
- 273.15 K
- n = P × V ÷ (R × T)
- 1.0000 mol
Volume (L)
Compare scenarios
See how one change moves the result
- CurrentYour inputs as they stand1.0000 molCurrent
- Pressure (P)atm 1.251.2500 mol
- Volume (V)L 28.0181.2500 mol
Frequently asked questions
What value of R does this use?
R = 8.314462618 J·mol⁻¹·K⁻¹. Since the 2019 SI redefinition that figure is exact rather than measured, because R is the product of two constants that are now fixed by definition: the Avogadro constant, 6.02214076×10²³ mol⁻¹, and the Boltzmann constant, 1.380649×10⁻²³ J·K⁻¹. The litre-atmosphere form you see in chemistry classes, 0.082057366 L·atm·mol⁻¹·K⁻¹, is that same number divided by 101.325 — one litre-atmosphere is exactly 101.325 joules, because an atmosphere is defined as 101325 pascals and a litre as a thousandth of a cubic metre.
Why is the default volume 22.414 litres?
That is the molar volume of an ideal gas at STP as most textbooks quote it. Putting P = 1 atm and T = 273.15 K into V = RT/P gives 22.413969545 L per mole, which rounds to 22.414. The defaults here are that whole state — 1 atm, 22.414 L, 1 mol, 273.15 K — so whichever quantity you solve for, the answer comes back as the value you started from, to within the 1.4 parts per million the rounding costs.
Does the temperature have to be in kelvin?
The arithmetic does; your typing does not. PV = nRT needs an absolute temperature, so 20 °C has to become 293.15 K before it is used — halving the kelvin temperature halves the pressure, while halving the Celsius reading means nothing at all. Pick °C or °F in the selector and the conversion happens for you, including on the value already in the box. Anything at or below absolute zero is refused rather than answered.
Should I enter gauge pressure or absolute pressure?
Absolute, measured from a vacuum. A tyre gauge, a manometer and most cylinder regulators read the difference between the gas and the surrounding air, so a gauge showing 32 psi is really about 46.7 psi absolute. Add roughly 14.7 psi, 101.3 kPa, 1.013 bar or 1 atm to a gauge reading before entering it, or the answer will be badly wrong at low pressures and slightly wrong at high ones.
When does the ideal gas law stop being accurate?
It assumes molecules take up no space and do not attract each other, which is close enough for most gases near room temperature and around one atmosphere — typically within a percent or so. It degrades as you compress a gas, cool it towards its boiling point, or work with strongly polar molecules such as water vapour and ammonia. The usual next steps are the van der Waals equation, which adds terms for molecular volume and attraction, or a tabulated compressibility factor Z in PV = ZnRT.
How do I turn a mass in grams into moles?
Divide the mass by the molar mass of the substance: 8.00 g of oxygen gas, whose molar mass is 32.00 g/mol, is 0.250 mol. Molar masses come from the periodic table, summed over the formula — O₂ is two oxygens at 16.00, CO₂ is 12.01 + 2 × 16.00 = 44.01 g/mol. Going the other way, an amount solved here becomes a mass by multiplying by the molar mass, which is how a gas law problem turns into a weighable quantity.