Ultimate Calculator
Science guide

The ideal gas law explained: PV = nRT

Understand the ideal gas law PV = nRT, choose the right value of R for your units, and follow worked examples including molar volume at STP.

The ideal gas law, PV = nRT, relates the pressure, volume, amount and temperature of a gas. If you know any three of these, you can calculate the fourth.

What each symbol means

SymbolQuantitySI unitCommon chemistry unit
PPressurepascal (Pa)atmosphere (atm)
VVolumecubic metre (m³)litre (L)
nAmount of gasmole (mol)mole (mol)
RGas constantsee belowsee below
TAbsolute temperaturekelvin (K)kelvin (K)
P × V = n × R × T

The law combines three older results: at fixed temperature, pressure and volume are inversely proportional (Boyle's law). At fixed pressure, volume is proportional to temperature (Charles's law). At fixed pressure and temperature, volume is proportional to the number of moles (Avogadro's law).

Choosing the value of R

R is a single physical constant, but its numerical value depends on the units you use for pressure and volume. Pick the row that matches your data.

Value of RUnitsUse when
8.314J/(mol·K), equal to Pa·m³/(mol·K)P in Pa, V in m³
8.314L·kPa/(mol·K)P in kPa, V in L
0.08206L·atm/(mol·K)P in atm, V in L
62.36L·mmHg/(mol·K)P in mmHg or torr, V in L

Temperature must always be in kelvin: K = °C + 273.15. The temperature converter handles Fahrenheit as well. Useful pressure conversions are 1 atm = 101,325 Pa = 101.325 kPa = 760 mmHg.

Worked example 1: molar volume at STP

What volume does 1 mole of an ideal gas occupy at 0 °C and 1 atm?

  1. T = 0 + 273.15 = 273.15 K
  2. Rearrange: V = nRT ÷ P
  3. V = 1 × 0.08206 × 273.15 ÷ 1
  4. V ≈ 22.41 L

This is the familiar molar volume of 22.4 L/mol. Be aware that "STP" has more than one definition. Since 1982 IUPAC has defined standard pressure as 1 bar (100 kPa) rather than 1 atm, which gives 22.71 L/mol at 0 °C. Check which convention your textbook or exam board uses. At room temperature, 25 °C and 1 atm, the molar volume is about 24.47 L.

Worked example 2: finding pressure

A 2.5 L container holds 0.10 mol of nitrogen at 25 °C. What is the pressure?

  1. T = 25 + 273.15 = 298.15 K
  2. P = nRT ÷ V = 0.10 × 0.08206 × 298.15 ÷ 2.5
  3. 0.10 × 0.08206 × 298.15 ≈ 2.4466
  4. P = 2.4466 ÷ 2.5 ≈ 0.979 atm

Worked example 3: finding moles in SI units

How many moles of gas are in a 10 L balloon at 101,325 Pa and 300 K?

  1. Convert volume: 10 L = 0.010 m³
  2. n = PV ÷ RT = (101,325 × 0.010) ÷ (8.314 × 300)
  3. n = 1,013.25 ÷ 2,494.2 ≈ 0.406 mol

The ideal gas law calculator solves for any of the four variables and handles the unit conversions.

Comparing two states

When a fixed amount of gas changes from one set of conditions to another, n and R cancel, leaving the combined gas law:

P1 × V1 ÷ T1 = P2 × V2 ÷ T2

Worked example 4: a warming tyre

A tyre holds air at an absolute pressure of 2.20 atm at 295 K. After driving, the air warms to 310 K. Assuming the volume does not change, V cancels:

  1. P2 = P1 × T2 ÷ T1 = 2.20 × 310 ÷ 295
  2. P2 ≈ 2.31 atm

When is a gas "ideal"?

The law assumes gas particles take up no space and do not attract each other. No real gas behaves exactly this way, but most come close at ordinary temperatures and pressures. The approximation breaks down at high pressure, where particles are crowded together, and at low temperature, near the point where the gas would condense. For those conditions, chemists use corrected equations such as the van der Waals equation.

Common mistakes

  • Using Celsius. A temperature of 25 must be entered as 298.15 K. Using °C gives answers that are badly wrong, and at 0 °C the formula would predict zero volume.
  • Mismatching R and units. R = 0.08206 only works with litres and atmospheres. R = 8.314 needs pascals with cubic metres, or kilopascals with litres.
  • Forgetting 1 L = 0.001 m³. A factor of 1,000 error is common in SI calculations.
  • Using gauge pressure. Tyre and tank gauges read pressure above atmospheric. The gas law needs absolute pressure, so add atmospheric pressure first.
  • Using mass instead of moles. Convert grams to moles by dividing by the molar mass.

Common questions

What does PV = nRT stand for?

Pressure times volume equals the number of moles times the gas constant times absolute temperature. It links the four measurable properties of a gas sample.

Which value of R should I use?

Use 0.08206 L·atm/(mol·K) when pressure is in atmospheres and volume in litres, and 8.314 J/(mol·K) when pressure is in pascals and volume in cubic metres.

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

At 0 °C and 1 atm it is about 22.41 L. Under the IUPAC definition of 0 °C and 1 bar it is about 22.71 L.