Ideal Gas Law Calculator: Pressure, Volume, Moles or Temperature
How the ideal gas law calculator works: PV = nRT with the gas constant R = 8.314 J/(mol·K). One mole of an ideal gas at 0 °C and 1 atm occupies exactly 22.41 L. Choose the unknown, enter the other three – unit conversion is done for you.
Source: CODATA, NIST CODATA – molar gas constant R = 8.314 462 618… J/(mol·K) (exact). Updated: .
How it is calculated
The ideal gas law formula
The ideal gas law links pressure P, volume V, amount of substance n and absolute temperature T:
P · V = n · R · T · R = 8.314 462 618 J/(mol·K)
Since the 2019 SI redefinition the gas constant is exact (Avogadro constant times Boltzmann constant, CODATA). Rearranged:
- Pressure: P = nRT / V
- Volume: V = nRT / P
- Moles: n = PV / (RT)
- Temperature: T = PV / (nR)
Using the right units
With R in J/(mol·K), use pascals, cubic metres and kelvin: 1 atm = 101,325 Pa, 1 psi = 6,894.76 Pa, 1 L = 0.001 m³, T(K) = T(°C) + 273.15. The most common mistake is plugging in °C or °F instead of kelvin. Alternatively use R = 0.082057 L·atm/(mol·K) to work directly in litres and atmospheres.
Example
- 2 mol of gas in 10 L at 25 °C: V = 0.01 m³, T = 298.15 K
- P = 2 · 8.314 · 298.15 / 0.01 = 495,791 Pa ≈ 4.89 atm (71.9 psi)
Mass and density
With molar mass M, n = m / M, which gives density ρ = PM / (RT). Dry air (M = 28.964 g/mol) at 20 °C and 1 atm has a density of 1.204 kg/m³. Molar masses are based on IUPAC standard atomic weights.
Limitations
The ideal gas law works well for gases at low pressure and temperatures far above their boiling point, such as air at ordinary conditions. At high pressures (above roughly 100 bar) or close to condensation you need a real-gas equation of state.
Frequently asked questions
What is the ideal gas law formula?
PV = nRT: P is pressure in Pa, V volume in m³, n amount in moles, R = 8.314 J/(mol·K) and T temperature in kelvin.
How do you solve the ideal gas law for n?
n = PV / (RT). Example: 1 atm, 1 L, 20 °C → n = 101,325 · 0.001 / (8.314 · 293.15) = 0.0416 mol.
How do you find density with the ideal gas law?
ρ = PM / (RT) with M in kg/mol. For air at 20 °C and 101,325 Pa: 101,325 · 0.028964 / (8.314 · 293.15) ≈ 1.204 kg/m³.
What value of R should I use?
8.314 J/(mol·K) for SI units, 0.082057 L·atm/(mol·K) for litres and atmospheres, or 0.08314 L·bar/(mol·K) for litres and bar.
What is the molar volume of a gas?
V/n = RT/P. At 0 °C and 1 atm it is 22.414 L/mol; at 25 °C and 1 bar it is 24.79 L/mol.
Sources and legal basis
- CODATA: NIST CODATA – molar gas constant R = 8.314 462 618… J/(mol·K) (exact)
- NIST SP 811 App. B.9: NIST SP 811 – Guide for the Use of the SI, Appendix B.9: pressure units (bar, atm, torr, psi)
- CIAAW: IUPAC CIAAW – Standard atomic weights (molar masses of the gases)
- US Std. Atm. 1976: U.S. Standard Atmosphere 1976 (NOAA/NASA/USAF) – mean molar mass of dry air 28.9644 kg/kmol
As of:
Related tools
- Molar Mass CalculatorCalculate molar mass in g/mol from any chemical formula – with brackets, hydrates like CuSO4·5H2O, mass percent by element, working steps and n = m/M.
- Density calculator: density, mass and volumeCalculate density, mass or volume with ρ = m/V – step-by-step, with unit conversion from g/cm³ to kg/m³ and lb/ft³ and densities of water, metals and plastics.
- Interactive Periodic Table of the ElementsAll 118 elements with IUPAC atomic weights, electron configuration, melting and boiling points, density and discovery – search, filter, tap for details.
- Dew Point Calculator: Humidity, Condensation and Mold RiskDew point calculator from temperature and humidity (Magnus formula) in °F or °C, plus absolute humidity, wall condensation and the mold-risk threshold.
- Scientific Notation Converter with StepsConvert numbers to and from scientific notation: a × 10ⁿ, E notation, engineering notation with SI prefixes and standard form – exact, step by step.
- Age CalculatorCalculate your exact age from your date of birth in years, months and days, in total days, weeks and months – plus the countdown to your next birthday.