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.
Example: Solve for: Volume V · Pressure P 101.325 · Unit (Pressure): kPa · Amount n 1 mol · Temperature T 0 · Unit (Temperature): °C · Gas (optional, for mass and density): not specified → Result: V = 22.41 L = 0.02241 m³. 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: · Editorial policy
Related tools
- Gibbs Free Energy CalculatorGibbs free energy calculator: ΔG = ΔH − TΔS from enthalpy, entropy and temperature, with spontaneity, the crossover temperature and the equilibrium constant K.
- Tire Pressure Temperature CalculatorTire pressure temperature calculator: see how much psi your tires lose in the cold, a chart from 10 to 90 °F, and what to inflate to in a warm garage.
- 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 ElementsPeriodic table with all 118 elements: atomic mass, electron configuration, melting and boiling point. Search, temperature slider, colour modes, print to PDF.
- Arrhenius equation calculatorArrhenius equation calculator: find activation energy from two rate constants at two temperatures, or the new k – with the formula and a worked example.
- Online CalculatorCalculator online, free and instant: type or tap and see the answer as you go – order of operations, brackets, percent, square root, steps and a history list.
- Fahrenheit to kelvin and kelvin to Fahrenheit converterFahrenheit to kelvin: add 459.67, multiply by 5/9, so 68 °F = 293.15 K. Type °F for kelvin, °C and Rankine, or go back from K to °F, with a chart and working.
- GPA calculator for Australian universities (7-point scale)GPA calculator Australia: enter each course with its grade (HD, D, C, P or 1–7) and credit points to get your GPA on the 7-point or 4-point scale, with working.