Ideal Gas Law Calculator
Pick the unknown – pressure, volume, moles or temperature – enter the other three in any units, and get the answer with the working and common unit conversions.
R = 8.314462618 J/(mol·K) = 0.082057366 L·atm/(mol·K). Real gases deviate from ideal behavior at high pressure and low temperature.
How to use the Ideal Gas Law Calculator
- Choose what to solve for: P, V, n or T. That field turns green and shows the result.
- Enter the other three values and pick their units.
- Optionally pick a gas to see the mass and density of the sample.
- Press Calculate to see the result, conversions to other units and the working.
- Use STP preset to load 1 mol at 0 °C and 1 atm, then change values from there.
The ideal gas law PV = nRT
The ideal gas law links the pressure P, volume V, amount n (in moles) and absolute temperature T of a gas through the gas constant R = 8.314462618 J/(mol·K). Rearranged for each unknown:
- P = nRT ÷ V
- V = nRT ÷ P
- n = PV ÷ RT
- T = PV ÷ nR
Always use an absolute temperature (kelvin or rankine). The calculator converts °C and °F automatically: K = °C + 273.15.
Worked example
What pressure do 2 mol of gas exert in a 10 L container at 25 °C? Convert to SI: V = 0.010 m³, T = 298.15 K. Then P = 2 × 8.314462618 × 298.15 ÷ 0.010 = 495,794 Pa ≈ 495.8 kPa ≈ 4.89 atm.
At 0 °C and 1 atm, one mole of an ideal gas occupies 8.314462618 × 273.15 ÷ 101,325 = 0.022414 m³ = 22.414 L, the classic molar volume.
Values of R in common units
| Value of R | Units |
|---|---|
| 8.314462618 | J/(mol·K) = Pa·m³/(mol·K) |
| 0.082057366 | L·atm/(mol·K) |
| 8.314462618 | L·kPa/(mol·K) |
| 62.363598 | L·mmHg/(mol·K) |
| 0.08314462618 | L·bar/(mol·K) |
| 10.731577 | ft³·psi/(lb-mol·°R) |
| 1.98720 | cal/(mol·K) |
Standard conditions
| Convention | Temperature | Pressure | Molar volume |
|---|---|---|---|
| STP (older, 1 atm) | 0 °C (273.15 K) | 101.325 kPa | 22.414 L/mol |
| STP (IUPAC since 1982) | 0 °C (273.15 K) | 100 kPa (1 bar) | 22.711 L/mol |
| SATP | 25 °C (298.15 K) | 100 kPa | 24.790 L/mol |
| NTP | 20 °C (293.15 K) | 101.325 kPa | 24.055 L/mol |
Real gases follow the ideal gas law closely at low pressure and high temperature. Near condensation or at very high pressure, equations such as van der Waals are more accurate.
Frequently asked questions
What is the ideal gas law?
PV = nRT: pressure times volume equals the number of moles times the gas constant times the absolute temperature. It describes how an ideal gas behaves and is a good approximation for most gases at everyday conditions.
What value of R should I use?
Use the value that matches your units: 8.314 J/(mol·K) with pascals and cubic meters, or 0.08206 L·atm/(mol·K) with liters and atmospheres. This calculator converts everything to SI units, so you can mix any units.
Why must temperature be in kelvin?
The gas law is proportional to absolute temperature, which starts at absolute zero. Using °C or °F directly would give wrong or even negative results. The calculator converts automatically: K = °C + 273.15.
What is the volume of one mole of gas at STP?
22.414 L at 0 °C and 1 atm, or 22.711 L at the IUPAC standard of 0 °C and 1 bar. At 25 °C and 1 atm it is about 24.47 L.
How do I find the density of a gas?
Density = PM ÷ RT, where M is the molar mass. Choose a gas in the list and the calculator shows the density in g/L. Dry air at 0 °C and 1 atm is about 1.29 g/L.
When does the ideal gas law fail?
At high pressures and low temperatures, when molecules are close together and attract each other, for example near the boiling point. Then real-gas equations such as van der Waals give better results.