Ideal Gas Law Calculator
Choose the quantity to solve for, then enter the other three values to solve the ideal gas law PV = nRT.
The ideal gas law is PV = nRT, linking pressure, volume, moles and absolute temperature through the gas constant R = 0.08206 L·atm·mol⁻¹·K⁻¹. Enter any three quantities and the fourth follows. At standard conditions (1 atm, 273.15 K), one mole of an ideal gas occupies 22.41 liters, which you can confirm with n = PV ÷ RT.
How to Use This Calculator
First choose which quantity you want to solve for — pressure, volume, moles, or temperature — from the dropdown. The field for that quantity is disabled automatically. Then enter the other three values. Use consistent units: pressure in atmospheres, volume in liters, amount in moles, and temperature in kelvin. To convert Celsius to kelvin, add 273.15.
Temperature must always be absolute (kelvin) — using Celsius will give a wrong and possibly negative answer. If your pressure is in a different unit, convert first: 1 atm = 760 mmHg = 101.325 kPa = 14.696 psi. The calculator uses R = 0.08206 L·atm·mol⁻¹·K⁻¹, which pairs with atm, L, mol and K.
How the Calculation Works
The ideal gas law PV = nRT combines Boyle's law, Charles's law and Avogadro's law into one equation. R is the universal gas constant that makes the units balance; in L·atm units it equals 0.08206. To solve for any one variable, rearrange: P = nRT ÷ V, V = nRT ÷ P, n = PV ÷ RT, or T = PV ÷ nR. The law treats gas molecules as having no volume and no intermolecular forces, which is an excellent approximation for real gases at ordinary temperatures and moderate pressures.
Worked Example
How many moles of an ideal gas occupy 22.414 L at standard temperature and pressure (1 atm, 273.15 K)? Using n = PV ÷ RT = (1 × 22.414) ÷ (0.08206 × 273.15) = 22.414 ÷ 22.414 = 1.00 mole. This confirms the well-known result that one mole of an ideal gas fills 22.4 liters at STP — the molar volume. Change the temperature to 298.15 K (25 °C) and the same 1 mole would need 24.47 L.
What the Result Means
The answer tells you the missing state variable for your gas sample under the conditions given. Because all four quantities are linked, changing one forces the others to adjust: heat a sealed rigid container (fixed V and n) and the pressure rises in proportion to absolute temperature; compress a gas at constant temperature and the pressure rises as volume falls. The molar volume result (22.4 L/mol at STP) is a reference chemists use constantly to convert between the volume of a gas and the number of moles it contains.
Assumptions and Limitations
The ideal gas law assumes molecules occupy no volume and do not attract one another. Real gases deviate from it at high pressure (molecular volume matters) and low temperature (attractions matter), where equations such as the van der Waals equation are more accurate. For most classroom and everyday conditions the error is small — a few percent at most. Temperature must be in kelvin and all units must match the gas constant used (atm, L, mol, K here).
When to Use an Ideal Gas Law Calculator
Chemistry and physics students use this to solve PV = nRT for pressure, volume, moles, or temperature. Run it for gas-law homework, to find a molar volume, or to check a lab result. Choose the unknown and enter the other three values to solve.
Related Calculators
Enthalpy (Heat) Calculator
Heat energy from mass, specific heat and temperature change.
Open calculator →Molarity Calculator
Find molar concentration from mass, molar mass and solution volume.
Open calculator →Percent Yield Calculator
Compare actual to theoretical yield to rate a reaction's efficiency.
Open calculator →Molar Mass Calculator
Type a chemical formula to get its molar mass in g/mol.
Open calculator →Related Guides
Frequently Asked Questions
What is the ideal gas law?
It is PV = nRT, relating a gas sample's pressure (P), volume (V), amount in moles (n) and absolute temperature (T) through the gas constant R. Knowing any three lets you solve for the fourth.
What value of R should I use?
It depends on your units. For pressure in atm and volume in liters, R = 0.08206 L·atm·mol⁻¹·K⁻¹, which this calculator uses. For SI units (Pa, m³) use R = 8.314 J·mol⁻¹·K⁻¹.
Why must temperature be in kelvin?
The gas law is proportional to absolute temperature. Celsius has an arbitrary zero, so using it breaks the proportionality and can give negative or nonsensical results. Add 273.15 to Celsius to get kelvin.
What is the molar volume of a gas at STP?
One mole of an ideal gas occupies 22.414 liters at standard temperature and pressure (0 °C and 1 atm). At 25 °C and 1 atm it is about 24.47 liters.
When does the ideal gas law break down?
At high pressures and low temperatures, where real gas molecules' own volume and their attractions become significant. Under those conditions, the van der Waals or other real-gas equations give better accuracy.
How do I convert pressure units for this calculator?
Convert to atmospheres first: 1 atm = 760 mmHg = 101.325 kPa = 14.696 psi. Enter the value in atm so it matches the gas constant the tool uses.
Looking for a different calculator?
CalculatorPlus has free tools across finance, construction, math, health and more — each one showing the formula and a worked example.