Calcamaze

Ideal Gas Law Calculator

Solve PV = nRT for the pressure, volume, moles or temperature of a gas, with results in kPa, atm, K and °C.

Solve for any value — pick what to calculate in the first field

kPa
mol
K

Result

Volume
22.414 L
Pressure in atm
1 atm
Temperature in °C
0 °C

The ideal gas law ties together the pressure, volume, temperature and amount of a gas: PV = nRT. Enter any three and the calculator finds the fourth, with the pressure also shown in atmospheres and the temperature in degrees Celsius.

For air, nitrogen, oxygen, helium and carbon dioxide near room temperature and ordinary pressures, the answer is typically within a few percent of the real value. It gets worse for gases close to condensing, such as steam, refrigerants or propane in a tank.

What is the ideal gas law?

The ideal gas law, PV = nRT, describes a gas whose molecules take up no space and do not attract each other. Under that assumption, pressure, volume, amount and absolute temperature are linked by a single constant, R. It combines Boyle’s, Charles’s, Gay-Lussac’s and Avogadro’s laws, which were each found by holding two of the quantities fixed.

No real gas is ideal, but at everyday conditions the molecules are far apart and the law works well. It is used to size gas cylinders and weather balloons, to estimate how tire pressure changes with temperature, and in chemistry to convert between the volume of a gas and the moles that react.

How to use the ideal gas law calculator

  1. Choose the quantity you want to find in the first field.
  2. Enter the pressure as absolute pressure in kPa (1 atm is 101.325 kPa).
  3. Enter the volume in liters, the amount in moles and the temperature in kelvins.
  4. Read the result, along with the pressure in atm and temperature in °C.

Formula

P × V = n × R × T

P is the absolute pressure in kPa, V the volume in liters, n the amount in moles and T the temperature in kelvins. R = 8.314 L·kPa/(mol·K) in these units. Convert °C to K by adding 273.15.

In other units R changes value: 0.08206 L·atm/(mol·K), 62.36 L·Torr/(mol·K) or 1.987 cal/(mol·K). Pick the one that matches your pressure and volume units, or convert to kPa and liters first.

Worked examples

Volume of one mole at 0 °C and 1 atm

Calculate
Volume
Pressure
101.325 kPa
Amount of gas
1 mol
Temperature
273.15 K
Volume
22.414 L
Pressure in atm
1 atm
Temperature in °C
0 °C

V = nRT ÷ P = 1 × 8.314 × 273.15 ÷ 101.325 = 22.41 L, the molar volume of a gas at the traditional STP.

Pressure in a gas cylinder

Calculate
Pressure
Volume
10 L
Amount of gas
4 mol
Temperature
293.15 K
Pressure
974.9539 kPa
Pressure in atm
9.622 atm
Temperature in °C
20 °C

P = nRT ÷ V = 4 × 8.314 × 293.15 ÷ 10 = 975 kPa, about 9.6 atm absolute.

How much helium is in a party balloon?

Calculate
Amount of gas
Pressure
101.325 kPa
Volume
15 L
Temperature
298.15 K
Amount of gas
0.613111 mol
Pressure in atm
1 atm
Temperature in °C
25 °C

A 15 L balloon at 25 °C and about 1 atm holds n = PV ÷ RT = 101.325 × 15 ÷ (8.314 × 298.15) = 0.613 mol. At 4.003 g/mol that is only 2.45 g of helium.

Volume of one mole of ideal gas

ConditionsTemperaturePressureMolar volume
Traditional STP0 °C101.325 kPa22.414 L
IUPAC STP0 °C100 kPa22.711 L
Room temperature20 °C101.325 kPa24.055 L
SATP25 °C100 kPa24.79 L
25 °C, 1 atm25 °C101.325 kPa24.465 L
Body temperature37 °C101.325 kPa25.45 L

STP, SATP and the molar volume

One mole of an ideal gas takes up 22.414 L at 0 °C and 1 atm, the classic “standard temperature and pressure”. IUPAC has defined STP as 0 °C and 100 kPa since 1982, which gives 22.711 L, and SATP (25 °C, 100 kPa) gives 24.79 L. Older textbooks and many exam boards still use 22.4 L, so check which definition a question expects.

Gauge pressure is not absolute pressure

Tire gauges and most cylinder regulators read the pressure above the surrounding air. The gas law needs absolute pressure, so add atmospheric pressure, about 101.3 kPa or 14.7 psi. A tire at 220 kPa on the gauge is really at about 321 kPa absolute.

The other gas laws are special cases

Hold n and T constant and PV = nRT becomes Boyle’s law (P₁V₁ = P₂V₂). Hold n and P constant and it becomes Charles’s law (V ∝ T); hold n and V constant and you get Gay-Lussac’s law (P ∝ T). For a fixed amount of gas going from one state to another, the combined form P₁V₁ ÷ T₁ = P₂V₂ ÷ T₂ is often quicker.

Common mistakes

  • Using degrees Celsius instead of kelvins. At 0 °C the formula would give zero volume.
  • Entering gauge pressure. Add atmospheric pressure (about 101.3 kPa) to a tire or regulator reading first.
  • Using R = 0.08206 with pressure in kPa, or R = 8.314 with pressure in atm. The value of R has to match the units.
  • Entering milliliters as liters, which makes the answer 1,000 times out.
  • Applying the law to a liquefied gas. Propane or CO₂ in a pressurized cylinder is mostly liquid, and its pressure depends on temperature, not on how much is left.

Frequently asked questions

What is the value of R?

R = 8.314 J/(mol·K), which equals 8.314 L·kPa/(mol·K), 0.08206 L·atm/(mol·K) or 62.36 L·Torr/(mol·K). Use the version that matches your units.

Why must temperature be in kelvins?

The law needs a temperature that starts at absolute zero. In Celsius, 0 °C would mean zero volume or pressure, and below-zero temperatures would give negative volumes.

What is the volume of one mole of gas at STP?

22.414 L at 0 °C and 1 atm, or 22.711 L at 0 °C and 100 kPa (the current IUPAC STP). At 25 °C and 1 atm it is 24.47 L.

How much does tire pressure rise when the tire heats up?

Use absolute pressure. A tire at 220 kPa gauge (321 kPa absolute) at 20 °C, warmed to 50 °C at the same volume, reaches 321 × 323.15 ÷ 293.15 = 354 kPa absolute, about 253 kPa on the gauge.

When does the ideal gas law not work well?

At high pressures and low temperatures, where molecules are close together and attract each other, and for gases near their boiling point. Real-gas equations such as van der Waals correct for this.

Sources

  1. CODATA Value: molar gas constant, National Institute of Standards and Technology (NIST)
  2. Chemistry 2e, 9.2: Relating Pressure, Volume, Amount, and Temperature: The Ideal Gas Law, OpenStax, Rice University
  3. Chemistry 2e, 9.6: Non-Ideal Gas Behavior, OpenStax, Rice University

Last updated · Calculations checked by automated tests· Editorial policy