Ideal Gas Law Calculator
Solve PV = nRT for pressure, volume, temperature or moles of an ideal gas. Volume is in liters, temperature in kelvin, and the gas constant you pick sets the pressure unit.
Last updated: October 2026
Result
1 mol
Formula below · 3 sources (physics.nist.gov, chem.libretexts.org, arxiv.org) · Updated Oct 2026
Compare with similar
About this calculator
The ideal gas law links the pressure P, volume V, amount n and absolute temperature T of a gas:
PV = nRT
Choose the unknown and the calculator rearranges it: n = PV ÷ RT, P = nRT ÷ V, V = nRT ÷ P or T = PV ÷ nR. The field you are solving for is ignored.
Units
Volume is in liters and temperature in kelvin (add 273.15 to a Celsius reading). The gas constant sets the pressure unit: 0.08206 L·atm/(mol·K) for atmospheres, 8.314 L·kPa/(mol·K) for kilopascals, or 62.36 L·Torr/(mol·K) for torr. All three are the same constant, R = 8.314462618 J/(mol·K), which is exact since the 2019 SI redefinition.
When it is accurate
The law treats molecules as points that do not attract each other. Most gases near room temperature and at a few atmospheres or less follow it within about 1%. At high pressure or close to condensation the error grows, and an equation of state such as van der Waals is needed.
The gas constant R in common unit sets
Scroll sideways to see all columns →
| Value of R | Units | Use with |
|---|---|---|
| 8.314462618 | J/(mol·K) = L·kPa/(mol·K) | SI work, pressure in kPa |
| 0.082057 | L·atm/(mol·K) | pressure in atm |
| 62.364 | L·Torr/(mol·K) | pressure in Torr or mmHg |
| 0.083145 | L·bar/(mol·K) | pressure in bar |
How to use
Pick what to solve for and the gas constant that matches your pressure unit, then enter the other three values. The default asks how many moles fill 22.41 L at 1 atm and 273.15 K (0 °C): n = 1 × 22.41 ÷ (0.08206 × 273.15) = 1 mol, the molar volume of an ideal gas. A 50 L cylinder at 200 atm and 25 °C (298.15 K) holds n = 200 × 50 ÷ (0.08206 × 298.15) = 408.7 mol. To find a volume, choose Volume (V): 1.5 mol of helium at 0.055 atm and 217.15 K occupies 1.5 × 0.08206 × 217.15 ÷ 0.055 = 486 L.
Frequently asked questions
Why must temperature be in kelvin?
The law says volume and pressure are proportional to absolute temperature, which starts at zero kinetic energy. Celsius starts at the freezing point of water, so 0 °C would wrongly predict zero pressure. Convert with T(K) = T(°C) + 273.15.
Which value of R should I use?
The one that matches your pressure unit, with volume in liters: 0.08206 for atm, 8.314 for kPa, 62.36 for torr. A result that is off by a factor of about 100 or 760 usually means R and the pressure unit do not match.
What is the molar volume at STP?
At 0 °C and 1 atm an ideal gas occupies 22.41 L/mol. IUPAC has defined STP as 0 °C and 1 bar since 1982, which gives 22.71 L/mol; at 25 °C and 1 atm it is 24.47 L/mol.
When does the ideal gas law fail?
At high pressures (tens of atmospheres and up) and near the temperature where the gas condenses, because molecular size and attraction start to matter. Polar gases such as water vapor and ammonia deviate sooner than helium, nitrogen or oxygen.
Related calculators
Sources & references
Think a result is wrong? Report a problem with this calculator.