Ideal Gas Law Calculator
Find moles of gas from pressure, volume, temperature.
Absolute temperature in kelvin. Add 273.15 to a Celsius value.
Results update as you type.
How it works
The ideal gas law is the master equation of gas behaviour, and this ideal gas law calculator uses it to find how many moles of gas fill a container from the pressure, volume, and temperature you measure. It applies the constant R equal to 0.082057 litre-atmospheres per mole-kelvin, so with pressure in atmospheres, volume in litres, and temperature in kelvin, the answer comes out in moles. The ideal gas law matters because it links four quantities that are otherwise hard to relate. Given any three, you can find the fourth, which is why chemists use it to work out reaction yields, engineers use it to size pressure vessels, and meteorologists use it to model the atmosphere. Rearranged as n = PV divided by RT, it turns easily measured bulk properties into the amount of substance present, a figure you cannot read off a gauge directly. The law works because an ideal gas is treated as countless tiny particles that neither attract nor repel and occupy negligible volume. Under everyday conditions of moderate pressure and temperature well above the boiling point, real gases follow it closely. A good ideal gas law calculator therefore gives accurate results for classroom problems and many practical situations, only losing accuracy at very high pressures or very low temperatures where gases start to condense.
n = (P × V) ÷ (R × T), R = 0.082057 L·atm/(mol·K)
The ideal gas law, PV = nRT, ties together the pressure, volume, temperature, and amount of a gas through the universal gas constant R. Rearranging to n = PV ÷ RT isolates the number of moles, because the product of pressure and volume measures the total energy the gas exerts on its surroundings, while RT measures the energy carried per mole at that temperature. Dividing one by the other counts how many moles are present. The law works because an ideal gas is modelled as many tiny non-interacting particles in constant random motion.
Source:Standard chemistry (ideal gas law, PV = nRT)
We review all our tools from time to time to ensure accuracy.
Worked example
How to use this calculator
- 1
Enter your values
Enter pressure, volume and temperature.
- 2
Adjust the options
Fine-tune any options to match your situation.
- 3
Read your result
Amount of gas updates instantly as you type — no button to press.
Frequently asked questions
Why must temperature be in kelvin?
The ideal gas law requires absolute temperature, measured from absolute zero, because pressure and volume are proportional to the true thermal energy of the particles. The Celsius and Fahrenheit scales have arbitrary zero points that would break that proportionality and even allow negative values. Convert Celsius to kelvin by adding 273.15. Using kelvin ensures a doubling of temperature genuinely doubles the associated pressure or volume.
What value of the gas constant does this use?
This calculator uses R equal to 0.082057 litre-atmospheres per mole-kelvin, which matches inputs given in atmospheres, litres, and kelvin. The gas constant takes different numerical values in other unit systems, such as 8.314 joules per mole-kelvin when using pascals and cubic metres. Sticking to the atmospheres, litres, and kelvin combination this tool expects guarantees the moles result is correct.
How do I convert other pressure units to atmospheres?
One atmosphere equals 101.325 kilopascals, 760 millimetres of mercury, or 14.696 pounds per square inch. To convert, divide your pressure by the appropriate factor: kilopascals divided by 101.325, or millimetres of mercury divided by 760, gives atmospheres. Entering pressure in atmospheres keeps it consistent with the gas constant this calculator uses, so the moles figure comes out accurately.
When does the ideal gas law break down?
The ideal gas law assumes particles have no volume and do not interact, which holds well at low pressure and high temperature. It becomes inaccurate at very high pressures, where particle volume matters, and at low temperatures near condensation, where attractive forces dominate. For those conditions scientists use real-gas equations such as the van der Waals equation. For most everyday chemistry, the ideal approximation is excellent.
Can I rearrange this to find pressure or volume instead?
Yes, the same law rearranges to solve for any variable. This calculator solves for moles, but PV = nRT can be rewritten as P = nRT ÷ V or V = nRT ÷ P when you know the other quantities. The relationships behind the gas laws, such as Boyle's and Charles's laws, are all special cases of this single equation with one variable held constant.