Ideal Gas Law Calculator (PV = nRT)
Ideal Gas Law Calculator
How to use the ideal gas law calculator
Pick what to solve for
Choose pressure, volume, amount of gas or temperature. That field is hidden, and the other three stay.
Enter the other three, each in its own unit
Pressure in kPa, Pa, bar, atm, mmHg or psi; volume in L, mL, dm³ or m³; temperature in K, °C or °F. Everything is converted to SI before the calculation, so there is no separate value of R to pick. When you solve for volume or amount, the reference buttons fill in 0 °C and 100 kPa, 0 °C and 1 atm, or 25 °C and 100 kPa.
Choose the answer's unit
Pick the unit you want the answer in. The result also lists it in every other unit, so a textbook answer in atm can be checked against one in kPa.
Check the working
The result shows the substitution in SI units, the molar volume V ÷ n and the temperature in kelvin that was used. A temperature at or below absolute zero, or a zero pressure, volume or amount, is refused rather than turned into a number.
The ideal gas law — one equation for four variables
Pressure, volume, moles, temperature
The ideal gas law, PV = nRT, ties together the four quantities that describe a gas: its pressure P, volume V, amount in moles n, and absolute temperature T, linked by the universal gas constant R. It is one of the most useful relationships in chemistry and physics because it lets you find any one of those four from the other three. The law is really a synthesis of three earlier observations: Boyle's law (at fixed temperature, pressure and volume are inversely related), Charles's law (at fixed pressure, volume rises with temperature), and Avogadro's law (equal volumes of gas at the same conditions contain equal numbers of molecules). Combined, they say that the product of pressure and volume is proportional to the amount of gas and its absolute temperature. The proportionality constant, R, has the same value for every ideal gas: 8.314462618 joules per mole per kelvin, exact since the 2019 redefinition of the SI made it the product of two fixed constants, the Boltzmann and Avogadro constants. In litre-atmospheres it is 0.082057 L·atm/(mol·K). Matching R to your units is the usual stumbling block; this calculator sidesteps it by converting every input to SI first.
A famous consequence is the molar volume: one mole of an ideal gas at 0 °C (273.15 K) and 1 atm occupies 22.414 litres, a number worth remembering. At 0 °C and 100 kPa (1 bar), the standard pressure IUPAC has recommended since 1982, it is 22.711 litres, and at 25 °C and 100 kPa it is 24.790 litres, which is why "standard conditions" must always be specified. The law underpins everyday calculations from the amount of gas in a cylinder to the volume change of air as it heats, and it is the foundation on which more accurate real-gas equations are built.
"PV = nRT folds Boyle, Charles, and Avogadro into one line. Know any three of pressure, volume, moles, and temperature, and the fourth follows — provided you keep temperature in kelvin."
When gases stop being ideal
The "ideal" in ideal gas law is a reminder that it's a model with assumptions: that gas molecules have negligible volume of their own and exert no forces on one another except during instantaneous, perfectly elastic collisions. Real molecules do take up space and do attract one another, so the law is an approximation that works best where those effects are smallest — at low pressure and high temperature, where molecules are far apart and moving fast. It becomes unreliable at high pressure (where the molecules' own volume matters) and at low temperature near condensation (where intermolecular attractions matter), which is exactly when gases are about to become liquids. For those conditions, equations such as van der Waals' add correction terms for molecular volume and attraction. Two practical rules prevent most errors: always convert temperature to kelvin, since the law uses absolute temperature and a Celsius value would give nonsense; and match the gas constant to your pressure and volume units. Within its valid range the ideal gas law is remarkably accurate for common gases under everyday conditions. Use this calculator to solve PV = nRT quickly and to build intuition for how the variables trade off, and reach for a real-gas equation when you're far from ideal.
Frequently asked questions
It is the equation PV = nRT, relating a gas's pressure (P), volume (V), amount in moles (n), and absolute temperature (T) through the gas constant R. Knowing any three lets you calculate the fourth. It combines Boyle's, Charles's, and Avogadro's laws into a single relationship and is the workhorse equation for gas calculations in chemistry and physics, accurate for common gases under ordinary conditions.
It depends on your units. Use R = 0.082057 L·atm/(mol·K) when pressure is in atmospheres and volume in litres, R = 8.314 L·kPa/(mol·K) for kilopascals and litres, or R = 8.314462618 J/(mol·K), which is the same as Pa·m³/(mol·K), in SI. R must match the units of pressure and volume you use. This calculator converts every input to pascals, cubic metres, moles and kelvin first, so it only ever uses the SI value.
Because the law uses absolute temperature, which starts at absolute zero. The Celsius and Fahrenheit scales have arbitrary zero points, so using them would give wrong — even negative or infinite — results. Convert by adding 273.15 to a Celsius temperature to get kelvin. For instance, 25 °C is 298.15 K. Forgetting this conversion is the single most common error in gas-law problems, so the calculator expects temperature in kelvin.
It's the volume one mole of gas occupies at specified conditions. At 0 °C (273.15 K) and 1 atm, one mole of an ideal gas fills 22.414 litres — a classic reference value. At 0 °C and 100 kPa (1 bar) it is 22.711 litres, and at 25 °C and 100 kPa it is 24.790 litres. Because the value depends on the chosen "standard," always state the temperature and pressure. The calculator reports the molar volume for your inputs.
At high pressure and low temperature — conditions where a gas is dense and close to condensing. There, the assumptions that molecules have no volume of their own and don't attract each other break down: their finite size and mutual attractions become significant. The law works best at low pressure and high temperature, where molecules are far apart and fast-moving. For non-ideal conditions, equations such as van der Waals' add corrections for molecular volume and attractive forces.
"Standard temperature and pressure" is a reference condition whose pressure changed. Before 1982 the standard pressure was usually 1 atm (101.325 kPa); IUPAC has recommended 100 kPa (1 bar) since then. At 0 °C the two give molar volumes of 22.414 L and 22.711 L, the values CODATA tabulates. Some textbooks and exam boards still use 1 atm, and "room conditions" are often 25 °C and 100 kPa (24.790 L), so always state which one you mean. The reference buttons above fill in all three when you solve for volume or amount.
No — that's the remarkable thing. The ideal gas law uses the same constant R for every gas, so an ideal mole of hydrogen, oxygen, or carbon dioxide all occupy the same volume at the same temperature and pressure (Avogadro's insight). The identity of the gas matters only through its molar mass if you're converting between moles and mass. Real gases deviate slightly from this universality, more so for larger, more strongly interacting molecules.
Yes. For a mixture, n is the total moles of all gases combined, and the law gives the total pressure or volume. Dalton's law of partial pressures then says each gas contributes a partial pressure proportional to its mole fraction, and the partial pressures sum to the total. So you can apply PV = nRT to the whole mixture using total moles, and split into partial pressures afterward. This calculator handles a single n; for partial pressures, scale by mole fraction.
No. The values you enter are processed entirely in your browser. Nothing is sent to a server, stored, or shared, and no account is required. The calculation runs on your device only.
Method & sources
How it computes
PV = nRT with R = 8.314462618 J/(mol·K), exact since the 2019 SI. Every input is converted to Pa, m³, mol and K first (atm 101325 Pa, bar 10^5 Pa, mmHg 133.3224 Pa, psi 6894.757 Pa; °C + 273.15, °F by (F − 32) × 5/9 + 273.15), the unknown is solved, and the answer is converted to the unit chosen and to every other unit offered.
What this tool implements
- R = 8.314462618 J/(mol·K) exactly: since the 2019 SI it is the product of the Avogadro and Boltzmann constants (R = Lk, Green Book p. 45), both now fixed. The uncertainty in a result comes from the ideal-gas assumption and the inputs, not from R.
- Every input is converted to SI before solving, so there is no second value of R to choose. Unit factors follow NIST SP 811 Appendix B.8: atm 1.013 25 E+05 Pa, mmHg and torr both 1.333 224 E+02 Pa (offered once, as "mmHg (torr)"), psi 6.894 757 E+03 Pa; 1 L = 1 dm³ = 10⁻³ m³ (Green Book p. 136).
- Temperature must be absolute; °C and °F are converted to kelvin. A temperature at or below 0 K, and a zero or negative pressure, volume or amount, are refused rather than turned into a number.
- Reference conditions are stated, not assumed. IUPAC has recommended a standard pressure of 100 kPa since 1982; before that it was usually 101 325 Pa (Green Book p. 62). CODATA tabulates the resulting molar volumes at 273.15 K as 22.710 954 64 L/mol (100 kPa) and 22.413 969 54 L/mol (101.325 kPa); at 298.15 K and 100 kPa RT/P gives 24.790 L/mol. All three are buttons on the page.
- Ideal behaviour is an approximation that fails at high pressure and near condensation; the page says so and does not claim accuracy for real gases.
- Corrected 2026-11-05: R in SI was truncated to 8.314462; 0 K, 0 mol and zero pressure or volume were accepted; the Gold Book citation (which refuses automated requests) was re-sourced to the Green Book.
Sources
- NIST. CODATA value: molar gas constant R: https://physics.nist.gov/cgi-bin/cuu/Value?r
- NIST. CODATA value: molar volume of ideal gas (273.15 K, 100 kPa): https://physics.nist.gov/cgi-bin/cuu/Value?mvol
- NIST. CODATA value: molar volume of ideal gas (273.15 K, 101.325 kPa): https://physics.nist.gov/cgi-bin/cuu/Value?mvolstd
- Thompson A, Taylor BN. NIST Special Publication 811, Guide for the Use of the International System of Units, Appendix B.8 (factors for units listed alphabetically): https://www.nist.gov/pml/special-publication-811/nist-guide-si-ap…
- IUPAC. Quantities, Units and Symbols in Physical Chemistry (Green Book), 3rd ed., 2007, pp. 45, 62, 136: https://iupac.org/wp-content/uploads/2019/05/IUPAC-GB3-2012-2ndPr…
- BIPM. The International System of Units (SI Brochure), 9th edition, 2019: https://www.bipm.org/en/publications/si-brochure