Ideal Gas Law Calculator (PV = nRT in atm, kPa, L, °C)
Solve PV = nRT for pressure, volume, moles or temperature in everyday units, converted to SI with the working shown.
Inputs
- Working (SI)
- V = nRT ÷ P = 40.8 × 8.314 × 298 K ÷ 99,298.5 Pa = 1.0180e+0 m³
- In m³
- 1.018047 m³
- Molar volume at these conditions
- 24.952 L/mol (22.4 at STP)
Use this calculator on your own site
Free embed
- Two lines of HTML, unlimited views
- Shows a small CalculateEveryday bar, with a credit link under the calculator
What each Ideal Gas Law input means
- Solve for
- The unknown: volume, pressure, amount (moles) or temperature.
- Pressure
- The gas pressure. Choose its unit below; 1 atm = 101.325 kPa = 1.01325 bar = 760 mmHg.
- Pressure unit
- atm, kPa, Pa, bar or mmHg. Everything is converted to pascals for the SI working.
- Volume
- The volume the gas fills, in the unit chosen below.
- Volume unit
- Litres, millilitres or cubic metres.
- Moles
- The amount of gas in moles: grams ÷ molar mass.
- Temperature
- The gas temperature. It must be absolute for the law, so Celsius is converted to kelvin by adding 273.15.
- Temperature unit
- Kelvin or °C.
Ideal Gas Law formula
PV = nRT · R = 8.314 J/(mol·K) with P in Pa, V in m³, T in K · or R = 0.08206 L·atm/(mol·K) with P in atm and V in L · T(K) = T(°C) + 273.15
The ideal gas law ties together the pressure, volume, amount and absolute temperature of a gas: PV = nRT, where R is the gas constant. Any three fix the fourth. The trap is units: R is 8.314 J/(mol·K) only when pressure is in pascals, volume in cubic metres and temperature in kelvin, and 0.08206 L·atm/(mol·K) when pressure is in atmospheres and volume in litres. The page accepts atm, kPa, Pa, bar or mmHg, litres, millilitres or cubic metres, and kelvin or celsius, converts everything to SI, and shows the substitution, so the arithmetic is checkable against either form of R. One mole of any ideal gas at 0 °C and 1 atm takes up 22.4 L — the molar volume at STP — which the volume mode reports for comparison. Real gases follow the law well at everyday pressures and temperatures and drift from it when cold and compressed.
Ideal Gas Law worked example
OpenStax's Example 9.9: 40.8 mol of methane at 25 °C (298 K) and 745 torr (0.980 atm). Convert to SI — 0.980 atm is 99,299 Pa — and V = nRT ÷ P = 40.8 × 8.314 × 298 ÷ 99,299 = 1.018 m³, which is 1.02 × 10³ L. The same arithmetic in the litre-atmosphere form: 40.8 × 0.08206 × 298 ÷ 0.980 = 1,018 L. At 1 atm and 0 °C a single mole comes out at 22.41 L.
More Ideal Gas Law examples
Half a mole of gas in a 10 L container at 25 °C: P = 0.5 × 8.314 × 298.15 ÷ 0.01 m³ = 123,947.85 Pa — 123.9 kPa, or 1.22 atm.
One mole at 1 atm and 25 °C fills 24.4654 L — more than the 22.4 L at 0 °C, because volume grows in proportion to absolute temperature.
Where the Ideal Gas Law calculator can give the wrong answer
- Temperature has to be absolute. 25 °C is 298.15 K; entering 25 as kelvin makes the gas twelve times smaller than it is. Choose °C and the page adds 273.15.
- STP is 0 °C and 1 atm in most chemistry courses (22.4 L/mol) but IUPAC now uses 1 bar (22.7 L/mol). The page's molar-volume line is at whatever conditions you entered.
- Real gases deviate near their condensation point and at high pressure — water vapour at 100 °C, CO₂ above about 10 atm. The van der Waals equation corrects for that; this page does not.
- Moles of gas, not grams. Convert with the molar mass first (the molar-mass calculator does it): 655 g of CH₄ is 40.8 mol.
- Pressure is absolute, not gauge. A tyre gauge reading 2 bar means about 3 bar absolute.
Spotted a mistake? Tell us
Ideal Gas Law reference table
| Conditions | Molar volume |
|---|---|
| 0 °C, 1 atm (STP, older definition) | 22.414 L |
| 0 °C, 1 bar (IUPAC STP) | 22.711 L |
| 20 °C, 1 atm | 24.055 L |
| 25 °C, 1 atm | 24.465 L |
| 37 °C, 1 atm (body temperature) | 25.45 L |
Ideal Gas Law FAQ
- Rearrange for the unknown, convert to matching units, substitute. For the volume of 2 mol at 1.5 atm and 300 K: V = nRT ÷ P = 2 × 0.08206 × 300 ÷ 1.5 = 32.8 L. Choose what to solve for above; the page converts your units and prints the substitution.
- It depends only on the units. 8.314 J/(mol·K) goes with Pa and m³ (or kPa and L); 0.08206 L·atm/(mol·K) goes with atm and L; 62.36 L·mmHg/(mol·K) with mmHg and L. The page always works in SI internally, so R = 8.314, and converts your units in and out.
- 22.4 L at 0 °C and 1 atm (the traditional STP), or 22.7 L at 0 °C and 1 bar (IUPAC's current definition). Enter 1 mol, 1 atm and 0 °C to see 22.41 L come out of the formula.
- n = PV ÷ RT. A 10 L cylinder at 150 atm and 20 °C holds 150 × 10 ÷ (0.08206 × 293.15) = 62.4 mol. Choose 'Moles n' and enter the pressure, volume and temperature in whichever units the gauge shows.