The Ideal Gas Law

Gases obey one master equation. It unifies three separate rules — Boyle's, Charles's, and Avogadro's Laws. Together they form a single relation among pressure, volume, temperature, and amount of substance. That relation, PV=nRTPV = nRT, lets a chemist predict how a gas will behave. This works under almost any conditions of pressure and temperature. No three different formulas for three different experiments are needed. It is the single most-used equation in introductory gas chemistry. It is also the bridge between the macroscopic world of pressure gauges. That bridge connects to the microscopic world of the Mole Concept. This article builds the ideal gas law from its historical pieces. It calibrates the gas constant RR. It defines standard conditions and molar volume. It also works through the combined-law reasoning. That reasoning lets you connect two different states of the same gas sample.

Key takeaways
  • The ideal gas law, PV=nRTPV = nRT, merges Boyle's Law (P∝1/VP \propto 1/V), Charles's Law (V∝TV \propto T), and Avogadro's Law (V∝nV \propto n) into one equation.
  • The gas constant R=0.08206 L ⋅ atm/(mol ⋅ K)R = 0.08206 \ \text{L}\,\cdot\,\text{atm/(mol}\,\cdot\,\text{K)} (or 8.314 J/(mol ⋅ K)8.314 \ \text{J/(mol}\,\cdot\,\text{K)}) is the universal proportionality constant that makes the equation dimensionally consistent.
  • Standard Temperature and Pressure (STP) is defined as 0 ∘C0\ ^\circ\text{C} (273.15 K) and 1 atm (or 1 bar under the modern IUPAC definition); at STP one mole of ideal gas occupies 22.4 L.
  • Temperature in every gas-law calculation must be in kelvin — never Celsius — because the relation depends on absolute temperature.
  • The combined gas law, P1V1T1=P2V2T2\dfrac{P_1V_1}{T_1} = \dfrac{P_2V_2}{T_2}, is just PV/TPV/T held constant when nn doesn't change, and it lets you jump between two states without ever computing RR.
  • Key idea: four gas properties—pressure, volume, temperature, amount—are locked together by one constant, R, so fixing any three determines the fourth.
The core insight

PV=nRTPV = nRT says that the product of pressure and volume, divided by amount and absolute temperature, is always the same number for an ideal gas: it is RR.

The physical picture

Imagine a rigid sealed cylinder of gas fitted with a movable piston. Squeeze the piston (raise PP) and the volume shrinks — that's Boyle's Law. Heat the gas at constant pressure and it expands — that's Charles's Law. Pump in more gas molecules at fixed pressure and temperature and the volume grows in direct proportion to the moles added — that's Avogadro's Law. Each of these was discovered separately, using different apparatus and different gases, over more than a century. The remarkable empirical fact is that all three relationships hold simultaneously, for essentially any gas, as long as the pressure isn't too high and the temperature isn't too low. A gas that obeys all three laws exactly, at all conditions, is called an ideal gas — a useful idealization, much like a frictionless surface in mechanics. Real gases (O₂, N₂, CO₂, He) follow the ideal gas law quite closely near room temperature and atmospheric pressure, which is exactly why the law is so useful in everyday chemistry. The picture to hold in your head: pressure comes from molecules battering the container walls; volume is the space they're free to roam in; temperature is a measure of their average kinetic energy; and moles just count how many molecules are doing the battering. Combine those four measurable quantities and one constant ties them together for every gas, every container, every condition.

Figure
Four gas variables locked by one constant: PV = nRT
piston (P) n molecules, volume V, temperature T PV = nRT one constant links all four variables P = 2.0 atm, V = 5.0 L, n = 0.40 mol, T = 305 K

The core relations

PV=nRTPV = nRT

where:

  • PP = pressure, in atmospheres (atm) or pascals (Pa) — must match the units built into RR
  • VV = volume, in liters (L) or cubic meters (m³)
  • nn = amount of gas, in moles (mol)
  • RR = the gas constant, 0.08206 L ⋅ atm mol−1K−10.08206\ \text{L}\,\cdot\,\text{atm mol}^{-1}\text{K}^{-1} or 8.314 J mol−1K−18.314\ \text{J mol}^{-1}\text{K}^{-1}
  • TT = absolute temperature, in kelvin (K) — never Celsius
P1V1T1=P2V2T2(n constant)\frac{P_1 V_1}{T_1} = \frac{P_2 V_2}{T_2} \quad (n \text{ constant})

where:

  • subscripts 1 and 2 denote an initial and a final state of the same fixed amount of gas
  • this combined form eliminates RR and nn entirely, so it's often faster than reusing PV=nRTPV=nRT twice
Vm=RTP∣STP=22.4 L/molV_m = \frac{RT}{P}\bigg|_{\text{STP}} = 22.4\ \text{L/mol}

where:

  • VmV_m is the molar volume of an ideal gas at Standard Temperature and Pressure
  • STP (older convention) = 273.15 K and exactly 1 atm; IUPAC's current STP uses 1 bar (100 kPa), giving 22.7 L/mol instead — always check which convention a problem specifies
Derivation ABuilding PV = nRT from the three empirical laws

Goal. Combine Boyle's, Charles's, and Avogadro's Laws into a single equation and show that the proportionality constant is the same for every ideal gas, justifying the universal constant RR.

Step 1. State the three laws separately. Boyle's Law (constant nn, TT):

P∝1V⟹V=k1⋅1PP \propto \frac{1}{V} \quad \Longrightarrow \quad V = k_1 \cdot \frac{1}{P}

Charles's Law (constant nn, PP):

V∝T⟹V=k2⋅TV \propto T \quad \Longrightarrow \quad V = k_2 \cdot T

Avogadro's Law (constant PP, TT):

V∝n⟹V=k3⋅nV \propto n \quad \Longrightarrow \quad V = k_3 \cdot n

Step 2. Merge the three proportionalities. Since VV is proportional to 1/P1/P, to TT, and to nn independently, it must be proportional to their combined product:

V∝nTPV \propto \frac{nT}{P}

Step 3. Insert a single proportionality constant. Call that constant RR:

V=R⋅nTPV = R\cdot\frac{nT}{P}

Rearranging gives the familiar form:

PV=nRTPV = nRT

Step 4. Show RR is universal by evaluating it from one measured data point. Experimentally, one mole of an ideal gas at T=273.15 KT = 273.15\ \text{K} and P=1 atmP = 1\ \text{atm} occupies V=22.414 LV = 22.414\ \text{L}. Substitute:

R=PVnT=(1 atm)(22.414 L)(1 mol)(273.15 K)R = \frac{PV}{nT} = \frac{(1\ \text{atm})(22.414\ \text{L})}{(1\ \text{mol})(273.15\ \text{K})}
R=0.08206 L ⋅ atm mol−1K−1R = 0.08206\ \text{L}\,\cdot\,\text{atm mol}^{-1}\text{K}^{-1}

Step 5. Confirm universality. Repeating this measurement with a completely different gas — helium instead of nitrogen, say — reproduces the same RR to within experimental precision, provided pressures are modest and temperatures aren't extremely low. This independence from the identity of the gas is precisely what makes RR a universal constant, and it is the deep reason the ideal gas law works for essentially any gas, not just the one used to calibrate it.

Limiting-case check. If n→0n \to 0 (vanishing amount of gas), the equation gives PV→0PV \to 0 for fixed TT — consistent with there being no gas left to exert pressure or occupy volume, which is physically sensible.

Worked examples

Example 1 — Finding pressure from moles, volume, and temperature (asymmetric numbers). A rigid steel tank holds 3.70 mol of nitrogen gas in a volume of 18.5 L at a temperature of 41 °C. Find the pressure inside the tank, in atm.

Step 1. Convert temperature to kelvin.

T=41+273.15=314.15 KT = 41 + 273.15 = 314.15\ \text{K}

Step 2. Solve the ideal gas law for pressure.

P=nRTVP = \frac{nRT}{V}

Step 3. Substitute numbers.

P=(3.70 mol)(0.08206 L ⋅ atm mol−1K−1)(314.15 K)18.5 LP = \frac{(3.70\ \text{mol})(0.08206\ \text{L}\,\cdot\,\text{atm mol}^{-1}\text{K}^{-1})(314.15\ \text{K})}{18.5\ \text{L}}

Step 4. Compute the numerator.

(3.70)(0.08206)(314.15)=95.32 L ⋅ atm(3.70)(0.08206)(314.15) = 95.32\ \text{L}\,\cdot\,\text{atm}

Step 5. Divide by volume.

P=95.3218.5=5.15 atmP = \frac{95.32}{18.5} = 5.15\ \text{atm}

The tank holds nitrogen at roughly 5.15 atm — about five times atmospheric pressure, reasonable for a compressed gas cylinder.

Limiting-case check. If the same amount of gas were instead allowed to expand into a much larger volume (say V→∞V \to \infty) at fixed TT, the formula predicts P→0P \to 0, matching the intuition that a fixed number of molecules spread over an enormous volume exert almost no pressure.

Example 2 — Combined gas law across two states (off-round values). A weather balloon contains 12.8 L of helium at 0.950 atm and 22 °C at ground level. It rises to an altitude where the temperature drops to −34 °C and the ambient pressure falls to 0.220 atm. Find the new volume of the balloon, assuming no gas escapes.

Step 1. Convert both temperatures to kelvin.

T1=22+273.15=295.15 K,T2=−34+273.15=239.15 KT_1 = 22 + 273.15 = 295.15\ \text{K}, \qquad T_2 = -34 + 273.15 = 239.15\ \text{K}

Step 2. Write the combined gas law and isolate V2V_2.

P1V1T1=P2V2T2⟹V2=V1⋅P1P2⋅T2T1\frac{P_1V_1}{T_1} = \frac{P_2V_2}{T_2} \quad \Longrightarrow \quad V_2 = V_1 \cdot \frac{P_1}{P_2}\cdot\frac{T_2}{T_1}

Step 3. Substitute the pressure ratio.

P1P2=0.9500.220=4.318\frac{P_1}{P_2} = \frac{0.950}{0.220} = 4.318

Step 4. Substitute the temperature ratio.

T2T1=239.15295.15=0.8103\frac{T_2}{T_1} = \frac{239.15}{295.15} = 0.8103

Step 5. Multiply everything together.

V2=12.8 L×4.318×0.8103V_2 = 12.8\ \text{L} \times 4.318 \times 0.8103
V2=12.8×3.499=44.8 LV_2 = 12.8 \times 3.499 = 44.8\ \text{L}

The balloon expands from 12.8 L to about 44.8 L — nearly a 3.5-fold increase, driven mainly by the large drop in external pressure, only partly offset by the drop in temperature (which alone would have shrunk the balloon).

Limiting-case check. If temperature and pressure changed by identical ratios in the same direction (say both fell by the same factor), the two effects would cancel and V2V_2 would equal V1V_1 — confirming that it is genuinely the relative change in P/TP/T that drives the volume change, not either variable alone.

Limiting cases & common traps

SituationWhat happensWhy
T→0 KT \to 0\ \text{K}V→0V \to 0 or P→0P \to 0 (formula breaks down)Real gases liquefy/solidify long before absolute zero; the ideal gas law is not valid there
nn fixed, VV fixed, TT doublesPP doublesDirect proportionality between PP and TT at constant V,nV,n (Gay-Lussac's Law, a special case)
Very high pressureReal gas volume smaller than ideal predictionMolecules have finite size; intermolecular repulsion becomes significant
Very low temperatureReal gas volume smaller than ideal predictionAttractive forces between molecules become significant, pulling them closer than ideal behavior predicts
Using STP = 22.4 L/mol at non-1-atm, non-273 K conditionsWrong answer22.4 L/mol applies only at the specific STP conditions (0 °C, 1 atm) — recompute VmV_m for any other T,PT,P

The chemist behind it

The ideal gas law as a combined equation was first written explicitly by the French engineer Émile Clapeyron in 1834, who fused Boyle's Law, Charles's Law (also associated with Gay-Lussac), and the not-yet-formalized Avogadro's Law into one relation while working on the theory of heat engines. Clapeyron's version used a constant he wrote differently, but the structure — pressure times volume proportional to temperature — was already the modern law in disguise. It took decades more for chemists to connect the volume term properly to the mole, following Avogadro's 1811 hypothesis that equal volumes of gas at the same temperature and pressure contain equal numbers of particles — a claim that went largely unappreciated in his own lifetime, in part because Avogadro didn't clearly distinguish atoms from molecules. The now-standard numerical value of RR emerged from careful nineteenth- and twentieth-century measurements of gas volumes at controlled pressure and temperature, ultimately tied to the same physical constant that appears in the ideal-gas form of the Kinetic Molecular Theory and in Planck's blackbody law (via Boltzmann's constant, R=NAkBR = N_A k_B). That RR shows up in such disparate corners of physics and chemistry is a hint of how deep the underlying idea — energy shared among a huge number of particles — really runs.

Origins · 1 minAmedeo Avogadro and how this was discovered
AA
Amedeo Avogadro
1776–1856 · Early 19th-century Italian physical chemistry, kinetic theory of gases

Avogadro proposed in 1811 that equal volumes of gas at equal temperature and pressure contain equal numbers of molecules, a hypothesis crucial to relating gas volume to the mole. It was largely ignored for nearly fifty years until Stanislao Cannizzaro revived and publicized it at the 1860 Karlsruhe Congress, finally resolving decades of confusion over atomic and molecular weights.

Ask the tutor: If I mix two different ideal gases in the same rigid container, does each gas still obey PV = nRT on its own, and how do their individual pressures add up to the total pressure I measure?

Why does temperature have to be in kelvin, not Celsius?

The ideal gas law is built on absolute temperature, where zero corresponds to the theoretical state of minimum molecular kinetic energy. Celsius has an arbitrary zero point (the freezing point of water), so V∝TV \propto T only holds true when TT is measured on the absolute (kelvin) scale — plugging in Celsius values introduces a constant offset that breaks every proportionality in the law.

Is 22.4 L/mol always the molar volume of a gas?

No — 22.4 L/mol applies specifically at the older STP definition of 0 °C and exactly 1 atm. At any other combination of temperature and pressure, you must recompute the molar volume using Vm=RT/PV_m = RT/P. Also note that IUPAC's current STP definition uses 1 bar rather than 1 atm, giving a molar volume of 22.7 L/mol instead — always check which convention a given source or problem is using.

When should I use PV = nRT versus the combined gas law?

Use PV=nRTPV = nRT whenever you know (or need to find) the actual amount of gas in moles, since only this form contains nn explicitly. Use the combined law P1V1/T1=P2V2/T2P_1V_1/T_1 = P_2V_2/T_2 whenever a fixed amount of gas moves between two different states of pressure, volume, and temperature — it saves you from needing RR or nn at all, since they cancel out.

Does the ideal gas law work for real gases like oxygen or carbon dioxide?

Reasonably well, under everyday conditions — moderate pressure (around 1 atm) and moderate-to-high temperature (room temperature or above). It breaks down noticeably at high pressure (molecules take up a non-negligible fraction of the container's volume) and at low temperature (intermolecular attractions become significant, especially near a gas's condensation point). More accurate real-gas behavior requires corrections such as the van der Waals equation.

How is the ideal gas law connected to gas density and molar mass?

Because n=mass/Mn = mass/M (mass divided by molar mass), substituting into PV=nRTPV=nRT and rearranging gives a direct relationship between a gas's density, its molar mass, and the conditions of pressure and temperature. That relationship — useful for identifying an unknown gas from a simple pressure/temperature/density measurement — is developed fully in Gas Density and Molar Mass.