Ideal Gas Law Calculator
PV = nRT. Enter any three of pressure, volume, moles and temperature in the units you have, and the ideal gas law calculator solves for the fourth.
Volume
- Volume V = nRT / P = 1 mol × 8.314462618 J/(mol·K) × 273.15 K ÷ 101,325 Pa = 0.022414 m³
- 22.414 L
- Volume in other units
- 22.414 L, 0.022414 m³, 0.79154 ft³, 5.9211 US gal
- Molar volume at this P and T V / n = RT / P: the space one mole of any ideal gas takes up at this pressure and temperature, whatever the gas.
- 22.414 L/mol
- Molar mass of N2 Summed from the IUPAC (CIAAW 2024) abridged standard atomic weights.
- 28.014 g/mol
- Mass of N2 m = n × M = 1 mol × 28.014 g/mol.
- 28.014 g
- Density of N2 ρ = PM / RT = 101,325 Pa × 0.028014 kg/mol ÷ (8.314462618 J/(mol·K) × 273.15 K), in kg/m³, which is the same number as g/L.
- 1.2498 g/L
- Number of molecules n × 6.02214076 × 10^23, the exact Avogadro constant.
- 6.022 × 10^23
- Gas constant R Exact since the 2019 SI: R is the Avogadro constant times the Boltzmann constant, 6.02214076 × 10^23 × 1.380649 × 10^-23. Every unit is converted to pascals, cubic meters, moles and kelvin before it is used.
- 8.314462618 J/(mol·K)
| R | Units |
|---|---|
| 8.314462618 | J/(mol·K), the same as Pa·m³/(mol·K) |
| 8.314462618 | L·kPa/(mol·K) |
| 0.0831446262 | L·bar/(mol·K) |
| 0.0820573661 | L·atm/(mol·K) |
| 62.36359822 | L·Torr/(mol·K) |
| 1.987204259 | cal/(mol·K), thermochemical calorie |
- Temperatures are converted to kelvin first. The gas law needs absolute temperature: 0 °C is 273.15 K, and doubling a temperature in °C does not double the volume.
- Real gases follow PV = nRT closely at low pressure and well above their boiling point. At high pressure or near condensation the molecules' own volume and attractions matter and a real-gas equation such as van der Waals is needed.
How the Ideal Gas Law Calculator works
The ideal gas law relates four properties of a gas: PV = nRT. P is the pressure, V the volume, n the amount in moles, T the absolute temperature, and R the molar gas constant. Since the 2019 redefinition of the SI, R is exact: 8.314462618... J/(mol·K), the product of the Avogadro and Boltzmann constants. Rearranged, the ideal gas equation gives each variable from the other three: P = nRT / V, V = nRT / P, n = PV / RT and T = PV / nR.
The default example is the classic one. One mole of nitrogen at 0 °C (273.15 K) and 1 atm (101,325 Pa) takes up V = 1 × 8.314462618 × 273.15 / 101,325 = 0.022414 m³, or 22.414 L. NIST lists that molar volume, 22.413969... L/mol, as an exact derived constant. At 100 kPa instead of 1 atm, the standard pressure IUPAC uses, the same mole takes up 22.711 L. Both are called "STP" in different books, so check which one a problem means.
Units are where most mistakes happen, and the calculator converts every input to pascals, cubic meters, moles and kelvin before it multiplies. The temperature has to be absolute. A gas at 20 °C is at 293.15 K, and warming it to 40 °C raises the temperature by about 7%, not 100%. If you work by hand in liters and atmospheres, use R = 0.082057366 L·atm/(mol·K); in liters and kilopascals, R = 8.314462618 L·kPa/(mol·K). The table under the result lists R in each of these units, each one exact SI value divided by exact unit definitions.
Three more worked examples. Two moles of gas in 10 L at 25 °C are at P = 2 × 8.314462618 × 298.15 / 0.010 = 495.79 kPa, or 4.8931 atm. A 5 L balloon at 1 atm and 25 °C holds n = 101,325 × 0.005 / (8.314462618 × 298.15) = 0.20437 mol, which is 0.81801 g if the gas is helium. And one mole in 24 L at 1 atm is at T = 101,325 × 0.024 / 8.314462618 = 292.48 K, or 19.33 °C.
With a gas formula the calculator adds the mass and the density. Because n = m / M, the gas law can be written ρ = PM / RT, the ideal gas equation with density. Nitrogen at 0 °C and 1 atm comes out at 1.2498 g/L, and carbon dioxide at the same conditions at 1.9635 g/L, which is why CO2 pools in low places. Molar masses are summed from the IUPAC atomic weights.
The law describes an ideal gas: point molecules with no attraction between them. Real gases come close at ordinary temperatures and pressures, and depart from it at high pressure or near the point where they condense. For a gas changing from one state to another at a fixed amount, the combined gas law P1V1/T1 = P2V2/T2 follows directly from PV = nRT.
Ideal Gas Law Calculator FAQ
What is the ideal gas law?
PV = nRT: pressure times volume equals the amount of gas in moles times the gas constant times the absolute temperature. R is 8.314462618 J/(mol·K), exact since the 2019 SI.
What value of R should I use?
The one that matches your units. 8.314462618 J/(mol·K) with pascals and cubic meters, 8.314462618 L·kPa/(mol·K) with liters and kilopascals, and 0.082057366 L·atm/(mol·K) with liters and atmospheres. They are the same constant in different units.
What is the volume of one mole of gas at STP?
22.414 L at 0 °C and 1 atm, and 22.711 L at 0 °C and 100 kPa. Both conditions are called STP in different textbooks. NIST lists both molar volumes as exact derived constants.
Why must the temperature be in kelvin?
The gas law needs a temperature measured from absolute zero. In Celsius, 0 °C would give a volume of zero, and doubling 20 °C to 40 °C raises the absolute temperature by only about 7%.
How do you find the density of a gas?
ρ = PM / RT, where M is the molar mass in kg/mol. Nitrogen (0.028014 kg/mol) at 101,325 Pa and 273.15 K is 1.2498 kg/m³, the same as 1.2498 g/L.