Skip to content

Ideal Gas Law Calculator (PV = nRT)

Solve PV = nRT for pressure, volume, moles or temperature, plus Boyle’s, Charles’s, Gay-Lussac’s and the combined gas law.

Your details

Unit system
Solve for

Absolute pressure: add the atmosphere (about 101.3 kPa or 14.7 psi) to a gauge reading.

mol

Gives the mass and density of the gas. Dry air ≈ 28.97 g/mol, N₂ 28.01, O₂ 32.00, CO₂ 44.01, He 4.003.

g/mol

Results update as you type

Volume V

0.7915 cu ft

Molar volume V/n
22.4139 L/mol

Pressures are absolute and temperatures are converted to kelvin before calculating.

Step-by-step solution
  1. T = 0 °C + 273.15 = 273.15 K
  2. V = nRT / P = 1 × 8.314462618 × 273.15 ÷ 101,325 Pa = 0.022414 m³ = 22.4139 L

The ideal gas law ties together the four quantities that describe a gas: pressure PP, volume VV, amount nn (in moles) and absolute temperature TT. Know three and the fourth follows. This calculator solves PV = nRT for any of them, accepts kPa, bar, atm, psi or mmHg, litres, m³ or cubic feet, and °C, °F or K, and converts everything to SI internally.

It also covers the classic two-state laws that describe a fixed amount of gas changing from one condition to another:

  • Boyle’s law — at constant temperature, pressure and volume are inversely proportional.
  • Charles’s law — at constant pressure, volume is proportional to absolute temperature.
  • Gay-Lussac’s (Amontons’s) law — at constant volume, pressure is proportional to absolute temperature.
  • Combined gas law — all three at once.

Add an optional molar mass to get the mass and density of the gas, handy for air in a room, CO₂ in a cylinder or helium in a balloon. Real gases follow these laws closely at ordinary temperatures and pressures; very high pressures or temperatures near condensation need corrections.

How to use this calculator

  1. Choose the gas law.
  2. For PV = nRT, pick the unknown (P, V, n or T) and fill in the other three.
  3. For the two-state laws, enter the initial state (P₁, V₁, T₁ as required) and the final pressure or temperature. Use Solve for to find P₂ or T₂ from a target volume instead.
  4. Enter absolute pressures. Temperatures can be in °C or °F: they are converted to kelvin automatically.
  5. Read the result, the change factor and the steps.

The formula

PV=nRTR=8.314462618 J mol−1 K−1PV = nRT \qquad R = 8.314462618\ \text{J mol}^{-1}\,\text{K}^{-1}

Since 2019, R=NAkR = N_A k is exact, because the Avogadro and Boltzmann constants are fixed in the SI. With PP in Pa, VV in m³ and TT in K, R=8.314R = 8.314; in L·atm it is about 0.08206.

For a fixed amount of gas, PV/TPV/T is constant, which gives the combined gas law and its special cases:

P1V1T1=P2V2T2P1V1=P2V2V1T1=V2T2P1T1=P2T2\frac{P_1V_1}{T_1} = \frac{P_2V_2}{T_2} \qquad P_1V_1 = P_2V_2 \qquad \frac{V_1}{T_1} = \frac{V_2}{T_2} \qquad \frac{P_1}{T_1} = \frac{P_2}{T_2}

Temperatures must be absolute: T(K)=T(°C)+273.15T(\text{K}) = T(°\text{C}) + 273.15. With a molar mass MM, the mass is m=nMm = nM and the density ρ=PM/(RT)\rho = PM / (RT).

Worked example

Molar volume: 1 mol at 0 °C and 101.325 kPa occupies V=nRT/PV = nRT/P = 22.414 L. At 25 °C and 100 kPa it is 24.79 L.

Air in a room: a 50 m³ room at 20 °C and 101.325 kPa holds n=PV/RTn = PV/RT ≈ 2,079 mol of air; with M=28.97M = 28.97 g/mol that is about 60.2 kg.

Boyle: a sealed 60 mL syringe at 101.325 kPa is pushed to 150 kPa: V2=101.325×60/150V_2 = 101.325 \times 60 / 150 = 40.53 mL.

Charles: a 2.000 L balloon at 20 °C placed in a freezer at −18 °C shrinks to 2×255.15/293.152 \times 255.15 / 293.15 = 1.741 L.

Gay-Lussac: a tyre at 320 kPa absolute and 15 °C warms to 45 °C: P2=320×318.15/288.15P_2 = 320 \times 318.15 / 288.15 = 353.3 kPa.

Combined: a 12 L dive cylinder at 200 bar and 20 °C releases about 2,409 L of gas at 1 atm and 25 °C.

Boyle’s law: squeeze a gas

Robert Boyle showed in 1662 that, at constant temperature, P1V1=P2V2P_1V_1 = P_2V_2: halve the volume and the pressure doubles. It explains why a diver’s lungs must not hold their breath while ascending, how a bicycle pump works and why a syringe gets harder to push. In the calculator, choose Boyle’s law, enter P₁, V₁ and P₂, and read V₂; or solve for P₂ from a target volume.

Charles’s law: heat a gas

At constant pressure, volume grows in proportion to the absolute temperature: V1/T1=V2/T2V_1/T_1 = V_2/T_2. A balloon that is 2 L at 20 °C does not double in size at 40 °C, because 40 °C is only about 7% hotter than 20 °C in kelvin (313.15 K vs 293.15 K). Hot-air balloons rely on this: warmer air expands, becomes less dense and rises.

Limits of the ideal gas model

The model assumes molecules take up no space and do not attract one another. That is close to reality for air, nitrogen, oxygen, helium or CO₂ near room conditions, typically within a few percent. It breaks down at very high pressure (hundreds of bar) and near the boiling point, where van der Waals or tabulated real-gas data are needed.

Frequently asked questions

What is the value of R?

R = 8.314462618… J/(mol·K), exact since the 2019 SI revision. Equivalent forms: 8.314 kPa·L/(mol·K), 0.082057 L·atm/(mol·K) and 62.364 L·Torr/(mol·K).

Why must temperature be in kelvin?

The gas laws are proportional to absolute temperature, which starts at absolute zero. In °C the ratio 40/20 = 2 would wrongly predict double the volume; in kelvin the true ratio is 313.15/293.15 ≈ 1.07.

Should I use gauge or absolute pressure?

Absolute pressure. A tyre gauge reading of 220 kPa is about 321 kPa absolute at sea level. Use the pressure converter to switch between the two.

What volume does one mole of gas occupy?

About 22.414 L at 0 °C and 1 atm, and 24.79 L at 25 °C and 1 bar (the IUPAC standard ambient conditions).

What is the difference between Gay-Lussac’s and Charles’s law?

Charles’s law relates volume and temperature at constant pressure. Gay-Lussac’s (or Amontons’s) law relates pressure and temperature at constant volume, as in a closed tyre or a gas cylinder.

Sources

Last updated:

More Physics calculators

People also use