Enter all but one of pressure, volume, temperature and amount of gas, in the units you have, gauge or absolute, and get the one you are missing. Or follow a fixed amount of gas from one state to another.
An ideal gas is one whose molecules take up no room and do not pull on each other. Real gases come close at everyday pressures and temperatures, and then pressure, volume, temperature and amount are tied by one equation:
P V = n R T or, by mass, P V = m Rs T, Rs = R / M
R is the molar gas constant, 8.314 462 618 J/(mol·K). It is exact: since 2019 the SI fixes the Avogadro and Boltzmann constants, and Ris their product. Divided by a gas's molar mass Mit becomes that gas's specific constant, 287.1 J/(kg·K) or 53.36 ft·lbf/(lb·°R) for air.
Absolute, always. P is measured from a perfect vacuum and T from absolute zero. A gauge reads above the air around it, so the calculator adds the atmosphere (101.325 kPa, 14.696 psi, unless you set your own, at altitude for example). Celsius and Fahrenheit are moved to kelvin. Putting a gauge reading or a °C value straight into the law is the most common way to get it wrong.
Change of state. For a fixed amount of gas, P1V1/T1 = P2V2/T2, because both sides equal nR. Hold one of the three still and it reduces to Boyle's law (constant temperature), Charles's law (constant pressure) or Gay-Lussac's law (constant volume). No gas type is needed. Gauge readings in both states are taken against the one atmosphere you enter, so enter readings made at different altitudes as absolute.
Worked example, SI. 5.0 g of nitrogen sealed in 2.0 L at 25 °C. That is 5.0 / 28.0134 = 0.1785 mol at 298.15 K, so P = 0.1785 × 8.3145 × 298.15 / 0.002 m³ = 221.2 kPa absolute, or 119.9 kPa on a gauge.
Worked example, US. Machinery's Handbook's own: one pound of air at 24.7 psia and 210 °F. V = mRsT/P = 1 × 53.36 × 669.67 / (24.7 × 144) = 10.05 ft³, where the handbook, rounding R to 53.3, prints 10.04. And a tire at 32 psig and 68 °F that warms to 140 °F reaches 38.4 psig, not the 65.9 you get by scaling the gauge reading by the Fahrenheit numbers. Load these with the button under the inputs.
Where it stops holding: at high pressure, where the molecules are crowded, and at low temperature, near the point where the gas would condense. The measure of both is the gas's critical point. Pick a listed gas and the results flag three regions to check with a compressibility factor or a property table: below the critical temperature, above the critical pressure, and near the critical point, taken here as a reduced temperature T/Tc under 2 with a reduced pressure P/Pc of 0.1 or more (0.3 or more from T/Tc = 1.5). That band is a rule of thumb read off the generalized compressibility chart, where Zstarts to fall a few percent below 1; at twice the critical temperature, or at a low reduced pressure, a gas is close to ideal. Near the critical point the error grows fast: carbon dioxide at 35 °C and 7 MPa comes out at 120 kg/m³ ideal, where NIST's property data give 220. At room temperature CO₂ is below its critical temperature, and a CO₂ cylinder holds liquid. No compressibility factor is applied here.
| Gas | M, g/mol | Rs, J/(kg·K) | Tc, K | Pc, MPa |
|---|---|---|---|---|
| Air (dry) | 28.9586 | 287.12 | 132.6312 | 3.786 |
| Nitrogen N₂ | 28.0134 | 296.8 | 126.19 | 3.3978 |
| Oxygen O₂ | 31.9988 | 259.84 | 154.58 | 5.043 |
| Carbon dioxide CO₂ | 44.0095 | 188.92 | 304.18 | 7.38 |
| Helium He | 4.002602 | 2,077.3 | 5.2 | 0.2274 |
| Argon Ar | 39.948 | 208.13 | 150.86 | 4.898 |
| Hydrogen H₂ | 2.01588 | 4,124.5 | 33.18 | 1.3 |
Molar masses and critical points: NIST Chemistry WebBook (SRD 69), each critical value from the reference it names. Air is dry air (Lemmon, Jacobsen, Penoncello and Friend, J. Phys. Chem. Ref. Data 29, 2000, p. 334), and its Tc here is the highest temperature at which any of it can condense (132.63 K), since a mixture has no single critical point.
References: Machinery's Handbook, 27th ed., p. 430, Relation Between Pressure, Temperature, and Volume of Air (the law in SI and US units and the example above; its air densities on pp. 428 to 429 and the U.S. gallon on p. 2548 are checked against this calculator). The gas constant: CODATA 2022, NIST (exact). Unit factors: NIST SP 811 (2008), Appendix B.8, pp. 45 to 53; all are exact except the inch of mercury, which uses the conventional 3386.389 Pa. Where the law holds: Çengel and Boles, Thermodynamics: An Engineering Approach, Section 3-7, the compressibility factor and its generalized compressibility chart (after Nelson and Obert, Trans. ASME 76, 1954); the near-critical band is a rule of thumb drawn from that chart, not a computed Z. Carbon dioxide and nitrogen densities near the critical point: NIST Chemistry WebBook, Thermophysical Properties of Fluid Systems.
Reviewer: pending.
Gauge: what a gauge reads, above the air around it. Abs: above a perfect vacuum.
The space the gas fills
Any scale; it is converted to kelvin, an absolute scale, for the law.
In moles, or as a mass (needs the gas)
Enter the volume.
Preliminary sizing under the ideal gas assumption. Confirm against property data for your gas and conditions before release.
ideal gas law · PV = nRT · combined gas law · gas constant · specific gas constant · PVT · pressure · volume · temperature · moles · gas mass · gauge pressure · absolute pressure · psia · psig · Rankine · Kelvin · Boyle · Charles · Gay-Lussac · air · nitrogen · compressed air · Machinery's Handbook · PV=nRT · gas pressure · tank pressure · gas