How the ideal gas law calculator works
The ideal gas law links the pressure, volume, amount and temperature of a gas. Pick the unknown, enter the other three in the units you have, and the calculator converts everything to SI units and solves PV = nRT.
Formula
P × V = n × R × T, with R = 8.314 J/(mol·K), P in Pa, V in m³, n in mol and T in K.
- 1
Convert to SI units
1 mol of gas at 273.15 K in 22.4 L: the volume is 0.0224 m³.
- 2
Multiply n, R and T
1 mol × 8.314 J/(mol·K) × 273.15 K = 2,271 J.
- 3
Divide by the volume
2,271 J ÷ 0.0224 m³ = 101,388 Pa, which is 1.001 atm: standard atmospheric pressure.
Worked example
The calculator opens with these values
- Solve for
- Pressure (P)
- Pressure unit
- atm
- Volume unit
- L
- Volume (V)
- 22.4
- Amount of gas (n)
- 1 mol
- Temperature unit
- K
- Temperature (T)
- 273.15
Pressure (P)
1.001 atm
Molar volume at STP, SATP and room conditions
Check which STP your course uses. Many textbooks still use 0 °C and 1 atm (22.41 L/mol); IUPAC has defined STP as 0 °C and 100 kPa since 1982, which gives 22.71 L/mol.
| Condition | Temperature | Pressure | Molar volume |
|---|---|---|---|
| STP, older definition | 0 °C | 1 atm | 22.41 L/mol |
| STP, IUPAC | 0 °C | 100 kPa | 22.71 L/mol |
| Room, 20 °C | 20 °C | 1 atm | 24.06 L/mol |
| Room, 25 °C | 25 °C | 1 atm | 24.47 L/mol |
| SATP | 25 °C | 100 kPa | 24.79 L/mol |
| Body temperature | 37 °C | 1 atm | 25.45 L/mol |
The gas laws hidden in PV = nRT
Hold two of the four quantities fixed and the ideal gas law becomes one of the older named laws. For one sample that changes state, n and R cancel: P₁V₁ ÷ T₁ = P₂V₂ ÷ T₂, the combined gas law.
- Boyle's law (n and T fixed): P × V stays the same. Halve the volume and the pressure doubles.
- Charles's law (n and P fixed): V ÷ T stays the same. Warming from 273 K to 546 K doubles the volume.
- Gay-Lussac's law (n and V fixed): P ÷ T stays the same, as in a sealed can that is heated.
- Avogadro's law (P and T fixed): V ÷ n stays the same, so equal volumes hold equal numbers of molecules.
Classic ideal gas law mistakes
Most wrong answers come from units, not from the algebra.
- Always use kelvins: add 273.15 to °C. Doubling from 10 °C to 20 °C does not double the pressure.
- Match R to the units: with R = 8.314 J/(mol·K), pressure must be in Pa and volume in m³, not liters.
- 1 L is 0.001 m³, not 0.01 m³ or 1,000 m³.
- Tire and tank gauges show pressure above the atmosphere. Add about 101 kPa to get the absolute pressure.
- The law fails near condensation and at high pressure; use it for gases well above their boiling point.
Common questions
Why must the temperature be in kelvins?
The law needs a scale that starts at absolute zero, where a gas would have no pressure. In °C, 0 is just the freezing point of water, so doubling °C does not double the pressure. The calculator converts °C for you.
What is the volume of one mole of gas?
About 22.4 L at 0 °C and 1 atm, and about 24.5 L at 25 °C and 1 atm. It is the same for every ideal gas, whatever its molecules.
Which value of R should I use?
It depends on the units: 8.314 J/(mol·K) with Pa and m³, 8.314 L·kPa/(mol·K) with kPa and liters, or 0.08206 L·atm/(mol·K) with atm and liters. This calculator converts units itself, so you never pick R.
Why do car tires show a higher pressure after driving?
The air inside warms up. With the volume and the amount of air fixed, pressure rises in step with the temperature in kelvins, so check tire pressure when the tires are cold.
Related calculators
Molarity Calculator
Calculate solution molarity and concentration
Molar Mass Calculator
Calculate molar mass of chemical compounds
Temperature Converter
Convert between Celsius, Fahrenheit, and Kelvin
Dilution Calculator
Calculate dilution ratios and concentrations