01
The ideal gas law
P × V = n × R × T
| Symbol | Quantity | SI unit |
|---|---|---|
| P | Pressure | pascal (Pa) |
| V | Volume | cubic metre (m³) |
| n | Amount of gas | mole (mol) |
| T | Absolute temperature | kelvin (K) |
| R | Molar gas constant | 8.314462618 J·mol⁻¹·K⁻¹ |
In litres and atmospheres, R = 0.082057 L·atm·mol⁻¹·K⁻¹. The calculator works in SI units internally, so you never need to pick a value of R.
02
Worked examples
| Amount | Pressure | Temperature | Volume |
|---|---|---|---|
| 1 mol | 1 atm | 0 °C (273.15 K) | 22.414 L |
| 1 mol | 1 bar | 25 °C (298.15 K) | 24.790 L |
| 0.5 mol | 2 atm | 25 °C | 6.116 L |
03
Solving for each quantity
| To find | Formula |
|---|---|
| Pressure | P = nRT ÷ V |
| Volume | V = nRT ÷ P |
| Amount | n = PV ÷ RT |
| Temperature | T = PV ÷ nR |
04
Temperature must be in kelvin
T (K) = t (°C) + 273.15
The most common mistake is using degrees Celsius in the formula. The calculator converts for you, but if you work by hand, convert first: 25 °C is 298.15 K. A gas at 20 °C does not have twice the volume of the same gas at 10 °C; the ratio is 293.15 ÷ 283.15.
05
Pressure units
| Unit | In pascals |
|---|---|
| 1 atm | 101,325 Pa (exact) |
| 1 bar | 100,000 Pa (exact) |
| 1 kPa | 1,000 Pa |
| 1 mmHg (torr) | 133.322 Pa (101,325 ÷ 760) |
| 1 psi | 6,894.76 Pa |
| 1 hPa (mbar) | 100 Pa |
06
When gases are not ideal
The law treats gas molecules as points that do not attract each other. That is a good approximation near room temperature and atmospheric pressure. It fails at high pressure, at low temperature and near the point where a gas condenses; there, use the van der Waals equation or tabulated data. To turn a mass of gas into moles, divide by the molar mass from the molecular weight calculator.
07
Common mistakes with the ideal gas law
- Putting the temperature in degrees Celsius into PV = nRT. 1 mol at 1 atm and “25” gives 2.05 L instead of 24.47 L at 298.15 K.
- Doubling the temperature in degrees Celsius and expecting the volume to double. Going from 20 °C to 40 °C raises the volume by 6.8%, the ratio 313.15 ÷ 293.15.
- Using 22.4 L for every “standard” condition. At 0 °C, 1 mol is 22.414 L at 1 atm but 22.711 L at 1 bar, 1.3% more; at 25 °C and 1 bar it is 24.790 L.
- Entering millilitres as litres. The volume unit sets the scale, so a 1,000-fold mistake in V becomes a 1,000-fold mistake in n or P.
Trust
How this page is checked
- The calculation runs on code with automated tests against worked reference values. Every number in the examples on this page was produced by that same code, not typed by hand.
- The formulas and conventions used are stated on the page, so you can reproduce the result yourself or compare it with your own software.
- Last reviewed by the Sciloom team, Zebra Nine Studio Inc. It is a tool for research and teaching, not a substitute for a statistician, a validated lab method or medical advice.
Cite this page
Sciloom. (2026). Ideal gas law calculator. Zebra Nine Studio Inc. https://sciloom.si/ideal-gas-law-calculator
Frequently asked questions
What is the ideal gas law formula?
PV = nRT: pressure times volume equals the amount in moles times the gas constant times the absolute temperature.
What value of R should I use?
8.314 J·mol⁻¹·K⁻¹ with pascals and cubic metres, or 0.08206 L·atm·mol⁻¹·K⁻¹ with litres and atmospheres. The calculator handles this for you.
What is the volume of one mole of gas?
22.414 L at 0 °C and 1 atm, or 24.790 L at 25 °C and 1 bar, for an ideal gas.
Can I use Celsius in the ideal gas law?
Not in the formula itself: it needs kelvin. Add 273.15 to the Celsius value, or select °C in the calculator and it converts.