By Tim King · Updated
Ideal Gas Law Calculator
Solve for Pressure, Volume, Moles or Temperature in kPa, atm or psi
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the Ideal Gas Law Calculator works
This ideal gas law calculator solves PV = nRT for whichever value you pick: pressure, volume, moles of gas or temperature. Enter the other three in the units you have, from kPa or psi to litres, millilitres, °C or °F, and it converts to SI, shows the working and gives the answer in several units with the molar volume.
The ideal gas law describes how pressure, volume, temperature and amount of a gas trade off against each other. Real gases follow it closely at everyday temperatures and pressures, which is why it is used for everything from balloon sums to sizing gas cylinders. It drifts at very high pressure or near the point where a gas liquefies.
How the ideal gas law calculator works
The formula is PV = nRT, with P in pascals, V in cubic metres, n in moles, T in kelvin and the gas constant R = 8.314462618 J/(mol·K). Rearranged, P = nRT ÷ V, V = nRT ÷ P, n = PV ÷ RT and T = PV ÷ nR. Temperatures in °C or °F are turned into kelvin first, because the law needs absolute temperature.
First example. 2 mol of gas in a 10 L container at 25 °C (298.15 K) has P = 2 × 8.314 × 298.15 ÷ 0.01 = 495,791 Pa, about 496 kPa or 4.89 atm.
Second example. A 5 L balloon at 1 atm and 20 °C holds n = 101,325 × 0.005 ÷ (8.314 × 293.15) = 0.208 mol of gas, about 1.25 × 10²³ molecules.
How many litres does one mole of gas take up? 22.414 L at 0 °C and 1 atm, and 24.06 L at 20 °C.
Molar volume of an ideal gas by temperature
| Temperature (°C) | Temperature (K) | Molar volume at 1 atm (L/mol) | Molar volume at 1 bar (L/mol) | Moles per litre at 1 atm |
|---|---|---|---|---|
| -40 | 233.15 | 19.132 | 19.385 | 0.05227 |
| -30 | 243.15 | 19.952 | 20.217 | 0.05012 |
| -20 | 253.15 | 20.773 | 21.048 | 0.04814 |
| -10 | 263.15 | 21.593 | 21.880 | 0.04631 |
| 0 | 273.15 | 22.414 | 22.711 | 0.04462 |
| 10 | 283.15 | 23.235 | 23.542 | 0.04304 |
| 20 | 293.15 | 24.055 | 24.374 | 0.04157 |
| 30 | 303.15 | 24.876 | 25.205 | 0.04020 |
| 40 | 313.15 | 25.696 | 26.037 | 0.03892 |
| 50 | 323.15 | 26.517 | 26.868 | 0.03771 |
| 60 | 333.15 | 27.337 | 27.700 | 0.03658 |
| 70 | 343.15 | 28.158 | 28.531 | 0.03551 |
| 80 | 353.15 | 28.979 | 29.363 | 0.03451 |
| 90 | 363.15 | 29.799 | 30.194 | 0.03356 |
| 100 | 373.15 | 30.620 | 31.025 | 0.03266 |
| 110 | 383.15 | 31.440 | 31.857 | 0.03181 |
| 120 | 393.15 | 32.261 | 32.688 | 0.03100 |
| 130 | 403.15 | 33.081 | 33.520 | 0.03023 |
| 140 | 413.15 | 33.902 | 34.351 | 0.02950 |
| 150 | 423.15 | 34.723 | 35.183 | 0.02880 |
| 160 | 433.15 | 35.543 | 36.014 | 0.02813 |
| 170 | 443.15 | 36.364 | 36.846 | 0.02750 |
| 180 | 453.15 | 37.184 | 37.677 | 0.02689 |
| 190 | 463.15 | 38.005 | 38.508 | 0.02631 |
| 200 | 473.15 | 38.825 | 39.340 | 0.02576 |
Tips and pitfalls
- Always use kelvin. Doubling from 10 °C to 20 °C is not doubling the temperature; 283 K to 293 K is only a 3.5% rise.
- Absolute pressure. Tyre gauges read pressure above the atmosphere. Add about 101 kPa (14.7 psi) to get the absolute pressure the law needs.
- STP has two definitions. Older books use 0 °C and 1 atm (22.414 L/mol); IUPAC now uses 0 °C and 1 bar (22.711 L/mol).
- Moles, not grams. Convert a mass of gas to moles with its molar mass first.
FAQ
What is the ideal gas law?
The ideal gas law is PV = nRT. It says that pressure times volume equals the amount of gas in moles times the gas constant times the absolute temperature. Knowing any three of P, V, n and T lets you calculate the fourth for a gas that behaves ideally.
What value of R should I use?
Use R = 8.314 J/(mol·K) with pascals and cubic metres, 0.08206 L·atm/(mol·K) with litres and atmospheres, or 8.314 L·kPa/(mol·K) with litres and kilopascals. The calculator always converts to SI and uses 8.314462618, so you can enter any units.
What is the molar volume of a gas at STP?
At 0 °C and 1 atm one mole of an ideal gas occupies 22.414 litres. Using the newer IUPAC standard of 0 °C and 1 bar it is 22.711 litres. At a room temperature of 20 °C and 1 atm it rises to about 24.06 litres.
When does the ideal gas law not work?
It becomes inaccurate at high pressures, where molecules are crowded and their own volume matters, and at low temperatures, where attractions between molecules pull them together. Near condensation, such as steam close to 100 °C, real gases can differ from the ideal by several percent.
Why do I need kelvin for the gas law?
Gas pressure and volume are proportional to absolute temperature, measured from absolute zero. In Celsius, zero is just the freezing point of water, so ratios and products come out wrong. Adding 273.15 to a Celsius temperature gives kelvin.
See also: all Chemistry tools, Physics, Electronics.
Related tools
Combined Gas Law Calculator
Solve P1V1/T1 = P2V2/T2 for any missing value.
Grams To Moles Converter
Grams to moles and back for any formula.
Molar Mass Calculator
Molar mass of any formula, brackets and hydrates included.
Molarity Calculator
Molarity, mass to weigh and volume for any solution.
Chemical Equation Balancer
Balance any chemical equation with whole-number coefficients.