How to use it
- Choose the quantity you want in Quantity to find.
- Fill in the other three boxes. A number alone is read in the unit of the working, and a unit such as atm or mL is converted for you.
- Leave the box of the quantity you are finding as it is: its text is not read.
- Read the Result, the table of the same state in other units, and the steps below it.
The ideal gas law
The ideal gas law links four quantities of a gas: its pressure P, its volume V, its amount n in moles and its absolute temperature T in kelvin. It combines the gas laws of Boyle (pressure and volume), Charles (volume and temperature) and Avogadro (volume and amount) into one relation, as the chemistry textbook OpenStax Chemistry 2e shows in section 9.2.
The calculator works in kilopascals, litres, moles and kelvin. In those units the gas constant is the same number as in joules, because 1 kPa·L is 1 J.
P V = n R T
P = pressure, kPa
V = volume, L
n = amount of gas, mol
T = absolute temperature, K
R = 8.314 462 618 kPa·L/(mol·K)
- The temperature in kelvin is the Celsius value plus 273.15, exactly: 0 °C is 273.15 K.
- R is exact by the SI definition (NIST, CODATA 2022). With atmospheres and litres it is 0.082057 L·atm/(mol·K), which textbooks round to 0.08206 or 0.0821.
When the ideal gas law is accurate
The law assumes that the gas molecules take up no room and attract nobody. That is close to true for air, nitrogen, oxygen, helium and most gases at ordinary pressure and room temperature. It is less accurate at high pressure, where the molecules take up a real share of the volume, and near the temperature at which the gas turns to a liquid.
What this calculator does not include
- Real-gas equations such as van der Waals, which correct for the size and attraction of the molecules.
- Mixtures of gases. Use the amount of each gas on its own, with the same pressure, volume and temperature, and add the amounts.
- A change of the gas during the reaction, which changes the amount in moles.
Worked example: 2.00 mol of gas at 26.85 °C in 10.0 L
The temperature is 26.85 + 273.15 = 300.00 K. The pressure is P = nRT ÷ V = 2.00 × 8.314 462 618 × 300.00 ÷ 10.0 = 498.9 kPa, which is 4.92 atm.
| Quantity | Value |
|---|---|
| Temperature | 300.00 K (26.85 °C) |
| Volume | 10.0 L |
| Amount of gas | 2.00 mol |
| Pressure | 498.9 kPa (4.92 atm) |
Frequently asked questions
Which units must I type?
Any of the units the boxes accept: kPa, Pa, bar or atm for pressure; L, mL or m³ for volume; mol or mmol for the amount; °C or K for temperature. The calculator converts them all to the working units.
Why must the temperature be in kelvin?
The law is proportional to the absolute temperature, which starts at zero. A Celsius value would make the product wrong, so 26.85 °C is first written as 300.00 K.
What is the value of the gas constant R?
R is 8.314 462 618 J/(mol·K), exact by the SI definition. In kPa·L/(mol·K) it has the same number, and in L·atm/(mol·K) it is 0.082057.
Why does my answer differ a little from my textbook?
Textbooks round R to 0.0821 or 0.08206 L·atm/(mol·K), which changes the fourth significant figure. The calculator uses the exact value, so its answer can differ in that digit.
Is my data sent to a server?
No. The calculation runs in your browser, and nothing you type is sent to us or stored.
Sources
- OpenStax Chemistry 2e, section 9.2: Relating Pressure, Volume, Amount, and Temperature: The Ideal Gas Law
- NIST: molar gas constant R, CODATA 2022 (exact value 8.314 462 618 J/(mol·K))
Figures and text last checked on Tuesday, November 10, 2026.