What is the Moles of Gas Calculator?
This calculator uses the ideal gas law, \(PV = nRT\), to find the number of moles (n) of a gas when you know its pressure (P), volume (V) and absolute temperature (T). Rearranging the law for n gives \(n = PV / (RT)\). It is a universal physics and chemistry tool used in labs, classrooms and engineering wherever a gas behaves close to ideal.
How to use it
Enter the pressure in atmospheres (atm), the volume in liters (L) and the temperature in kelvin (K). The calculator divides PV by R \(\times\) T and reports the amount of gas in moles. It also shows the equivalent mass if the gas were oxygen (O₂, 32 g/mol) as a quick sanity check. Remember to convert Celsius to kelvin by adding 273.15, and any gauge pressure to absolute first.
The formula explained
The ideal gas law links four state variables: \(P \cdot V = n \cdot R \cdot T\). Here R is the universal gas constant, \(0.082057 \ \text{L}\cdot\text{atm}\cdot\text{mol}^{-1}\cdot\text{K}^{-1}\) when these units are used. Solving for the unknown number of moles gives the following.
$$n = \frac{\text{Pressure (atm)} \cdot \text{Volume (L)}}{0.08206 \cdot \text{Temperature (K)}}$$Larger pressure or volume means more gas particles; higher temperature for fixed P and V means fewer particles.
Worked example
Suppose a 10 L vessel holds gas at 2 atm and 300 K. Then
$$n = \frac{2 \times 10}{0.082057 \times 300} = \frac{20}{24.617} \approx 0.8124 \ \text{mol}$$That is about 26 g if the gas were O₂.
FAQ
What units should I use? Pressure in atm, volume in liters, temperature in kelvin, so \(R = 0.082057\). Mixing units gives wrong answers.
Why is temperature in kelvin? The gas law requires an absolute temperature scale; using Celsius would allow zero or negative values that break the physics.
Is it accurate for real gases? It is exact only for an ideal gas, but it is a very good approximation at low pressure and moderate-to-high temperature.