Ideal Gas Law Calculator
The ideal gas law solved for pressure, volume, moles or temperature — with the mass of gas and the density that follows.
PV = nRT ties the four state variables together, so knowing three gives the fourth.
How the ideal gas law calculator works
PV = nRT ties the four state variables together, so knowing three gives the fourth. The gas constant R is 8.314 J/(mol·K) when pressure is in pascals and volume in cubic metres.
The near-universal mistake is degrees Celsius. Temperature must be absolute: at 0 °C the equation would say a gas has no volume at all, which is why every gas calculation converts to kelvin first.
Formula: PV = nRT
Worked examples
| Inputs | Result | Note |
|---|---|---|
| One mole at STP | 101.32486 | 101.3 kPa in 22.414 L |
| Solving for volume | 22.41397 | the molar volume |
| Room temperature | 110.5986 | pressure rises with T |
FAQFrequently asked questions
What is the ideal gas law?
PV = nRT — pressure times volume equals moles times the gas constant times absolute temperature.
Why must temperature be in kelvin?
Because the law is proportional to absolute temperature. Using Celsius makes 0 °C mean zero volume, which is nonsense.
What is the molar volume?
22.414 L per mole at 0 °C and one atmosphere; 24.79 L at 25 °C. Both are quoted as "standard" by different bodies, which causes endless confusion.
When does the ideal gas law fail?
At high pressure and low temperature, where molecular volume and intermolecular forces matter. Real gases then need the van der Waals equation or a compressibility factor.
What is R?
8.314 J per mole per kelvin in SI units. It appears in other units too — 0.08206 L·atm/(mol·K) — which is a common source of arithmetic errors.
Where these figures come from
- NIST — CODATA 2018 fundamental physical constants — G, g₀, R, c
- NIST Special Publication 811 — Guide for the use of the International System of Units — unit conversions
- The Engineering ToolBox — material properties — specific heats, expansion coefficients, densities
- National Measurement Institute — Australia's measurement authority
Last checked: September 2026. Constants are the CODATA 2018 values; formulas are the standard textbook forms.