Ideal Gas Law
Applies the ideal gas law with the specific gas constant of a chosen gas. It finds either the pressure of a known mass of gas in a closed volume, such as a tank or receiver, or the density of a gas at a given pressure and temperature. Engineers and students use it to check tank pressures, to find how much gas a vessel holds, and to get gas densities for flow and fan calculations.
The ideal gas law
P·V = m·R·T
ρ = m/V = P / (R·T)
P is the absolute pressure, V the volume, m the mass of gas, ρ its density and T its absolute temperature, in kelvin. Enter T in °C or °F and the page converts it. R is the specific gas constant, the universal gas constant 8.314 J/(mol·K) divided by the gas’s molar mass. Pick a Gas to fill it in from the tables [1], [2], or choose Custom and type it. For air, R = 287 J/(kg·K).
Choose Solve For Pressure, given mass & volume, or Density, given pressure. The second mode needs no volume, since density doesn’t depend on the size of the container.
Limits and common mistakes
- Use absolute pressure. A gauge reading of 700 kPa is about 801 kPa absolute at sea level. The pressure the page gives is absolute too.
- Real gases depart from the law at high pressure and at temperatures near their boiling point. Air and nitrogen stay within about 1 % up to some tens of bar at room temperature. Carbon dioxide, refrigerants and hydrocarbons near saturation need a compressibility factor; see the compressibility factor calculator.
- R per kilogram differs from gas to gas. Don’t use the air value for another gas, and don’t mix it up with the molar constant.
- The law ignores moisture. Humid air is slightly lighter than dry air at the same pressure and temperature.
Worked example
A 500 L compressed-air receiver holds 5 kg of air at 25 °C. What pressure is it at?
- Choose Solve For Pressure, given mass & volume.
- Choose Gas Air. R fills in as 287 J/(kg·K).
- Enter Temperature 25 °C and Mass 5 kg.
- Set the Volume unit to L, enter 500, and press Solve. The Solution shows: Pressure (P): 855.69 kPa
Check: 5 × 287 × 298.15 / 0.5 m³ = 855,690 Pa. That is absolute, so a gauge on the receiver reads about 855.7 − 101.3 = 754 kPa, or 7.5 bar. As a second check, air at 1 atm and 25 °C weighs about 1.18 kg/m³, so 5 kg in 0.5 m³ is 8.4 times that density, and 8.4 atm is 855 kPa.