In short

The ideal gas law combines three experimental observations about gases into one equation:

PV = nRT = N k_B T,

where P is pressure (Pa), V is volume (m³), T is absolute temperature (K), n is the number of moles, R = 8.314\,\text{J mol}^{-1}\,\text{K}^{-1} is the universal gas constant, N is the number of molecules, and k_B = R/N_A = 1.381\times 10^{-23}\,\text{J K}^{-1} is the Boltzmann constant.

Three special cases are named after their discoverers:

  • Boyle's law (1662) — at constant temperature and amount, PV = \text{constant}. Squeeze a sealed syringe and the pressure climbs.
  • Charles's law (1787) — at constant pressure and amount, V/T = \text{constant}. A balloon in a freezer shrinks.
  • Gay-Lussac's (pressure) law (1809) — at constant volume and amount, P/T = \text{constant}. A sealed LPG cylinder on a sunny Delhi rooftop reads a higher pressure than the same cylinder in an air-conditioned godown.

The ideal gas law holds to within a per cent for real gases at room-temperature conditions and modest pressures (up to a few tens of atmospheres). It breaks down near condensation, where molecular attractions and finite molecular size matter — and that is where van der Waals' correction enters.

Everything downstream of this article — the kinetic theory of pressure, equipartition and specific heats, thermodynamic processes — rests on this equation. Get comfortable with it.

Pick up a bicycle pump, cork the outlet with your thumb, and push the handle halfway down. The handle gets harder to move. Let go; the handle bounces back partway. While you were pushing, the barrel grew noticeably warm. You have just run Boyle's experiment (halving the volume roughly doubled the pressure), felt Charles's law backwards (the gas you compressed heated up), and demonstrated that an ideal gas stores energy when you do work on it. The same physics is operating in every LPG cylinder on an Indian kitchen shelf, every SCUBA tank at a dive shop in the Andamans, every helium balloon rising over a Hampi balloon festival, every tube of a Nubra-bound motorbike at 3000 m of altitude.

This article builds the ideal gas law from the three experimental gas laws that preceded it, then writes it in the two forms you will see throughout physics:

These are the same law — the second is the first divided by Avogadro's number, which exchanges moles for molecules.

You should be comfortable with temperature and thermometers (especially why the absolute temperature in kelvin is the only one that goes into gas laws), pressure in fluids (so that a pressure in pascals means a definite force per unit area), and thermal expansion of gases (the direct precursor to Charles's law).

The three gas laws — one experiment each

The ideal gas law did not drop from the sky fully formed. It was assembled from three experiments, each done in a different century, each holding one variable fixed and watching the other two trade off.

Boyle's law — pressure versus volume at constant temperature

Take a sealed container of gas at room temperature. Slowly push a piston inward, making the volume smaller. If you do it slowly enough that heat flows out to keep the temperature constant (an isothermal compression), the pressure rises. Boyle's 1662 experiment measured this relationship with a mercury manometer and a J-shaped tube.

The result was that for a fixed amount of gas at fixed temperature,

PV = \text{constant} \quad \text{(Boyle's law).} \tag{1}

Equivalently, P_1 V_1 = P_2 V_2 for any two states on the same isotherm. On a P-V plot, isotherms are rectangular hyperbolas.

Three Boyle isotherms on the $P$ (vertical) versus $V$ (horizontal) plot. Each curve has $PV = \text{const}$. The red curve corresponds to the highest temperature, the grey curve to the lowest — hotter gases exert more pressure at the same volume. All three points $(V_1,P_1), (V_2,P_2), (V_3,P_3)$ on the red curve satisfy $P\,V = 4$.

The physical content is obvious once you know what's going on microscopically: halving the volume means molecules have half the distance to travel between wall collisions, so they hit the walls twice as often, and each wall sees twice the force per area. A full derivation of this from the kinetic theory is in the next chapter, but you do not need it to trust Boyle — Boyle measured it.

Charles's law — volume versus temperature at constant pressure

Now hold pressure constant instead (e.g. a gas in a cylinder with a freely sliding piston loaded by a constant weight). Warm the gas; the piston rises, and the volume grows. Charles in 1787 measured the proportionality.

The cleanest form of the result is in terms of absolute temperature (kelvin):

\frac{V}{T} = \text{constant} \quad \text{(Charles's law, constant } P). \tag{2}

Or equivalently V_1/T_1 = V_2/T_2. The straight-line V-versus-T plot, when extrapolated downward, hits zero volume at T = 0 K — the extrapolation that originally fixed the zero of the absolute scale.

Charles's law on a $V$ (vertical) versus $T$ (horizontal, in kelvin) plot. Each straight line corresponds to a different fixed pressure. The red line is for atmospheric pressure with $V_0 = 1$ L at 273 K; the black line is for twice atmospheric pressure (half the volume at every $T$). Both lines pass through the origin — extrapolating them tells you absolute zero is at $T = 0$ K.

In Celsius form, Charles's law reads V = V_0(1 + t/273.15) where t is the Celsius temperature and V_0 is the volume at 0 °C. The coefficient 1/273.15\,\text{K}^{-1} is approximately the volume expansion coefficient of any ideal gas at 0 °C — one of the foundational results of thermal expansion of gases.

Gay-Lussac's law — pressure versus temperature at constant volume

Trap a gas in a rigid sealed vessel (say, a steel LPG cylinder). Heat it. You cannot change the volume, so the pressure alone responds. Gay-Lussac in 1809 found the proportionality:

\frac{P}{T} = \text{constant} \quad \text{(Gay-Lussac's law, constant } V). \tag{3}

Or P_1/T_1 = P_2/T_2. This is exactly what a pressure-cooker whistle is responding to, what a bicycle tyre's pressure is doing while a bike sits in the Jaipur sun, and what a car's tyre-pressure monitoring system adjusts for in "cold" versus "warm" readings.

Combining the three — the combined gas law

The three laws have overlapping content. You can combine them.

Step 1. Go from state 1 (P_1, V_1, T_1) to state 2 (P_2, V_2, T_2) in two stages. First, at constant T_1, change pressure to P_2 (Boyle). This changes the volume from V_1 to some intermediate V':

P_1 V_1 = P_2 V'. \tag{4}

Why: any path from state 1 to state 2 that passes through a state of the same temperature as state 1 uses Boyle's law for the first leg. The choice of path does not matter because all three gas laws are state functions.

Step 2. At constant P_2, change the temperature from T_1 to T_2 (Charles):

\frac{V'}{T_1} = \frac{V_2}{T_2}. \tag{5}

Why: having fixed the pressure at P_2, any change in temperature now follows Charles's law.

Step 3. Solve (4) for V' and substitute into (5):

V' = \frac{P_1 V_1}{P_2} \quad \Rightarrow \quad \frac{P_1 V_1}{P_2 T_1} = \frac{V_2}{T_2}.

Rearrange:

\boxed{\;\frac{P_1 V_1}{T_1} = \frac{P_2 V_2}{T_2}\;} \quad \text{(combined gas law).} \tag{6}

Why: the combination PV/T is the same in both states. It is a conserved quantity for a fixed amount of gas, regardless of how you got from state 1 to state 2.

So the three gas laws collapse to

\frac{PV}{T} = \text{constant for a fixed amount of gas}. \tag{7}

If you set T constant you recover Boyle; set P constant you recover Charles; set V constant you recover Gay-Lussac. The combined law contains all three.

The ideal gas equation — from "constant" to nR

The "constant" in equation (7) depends only on how much gas you have. Double the amount of gas at the same T and V and the pressure doubles (more molecules hitting the walls). So the constant is proportional to the amount of gas — and the cleanest measure of that amount is the mole.

Definition. One mole is N_A = 6.022\times 10^{23} particles, where N_A is Avogadro's number. A mole of any ideal gas at standard temperature and pressure (STP: 273.15 K, 101.325 kPa) occupies a volume of 22.4 litres — a result you can check experimentally and is historically how Avogadro's number was first pinned down.

Define the constant in (7) to be nR where n is the number of moles and R is a universal constant:

\boxed{\;PV = nRT\;} \tag{8}

To find R, substitute the STP volume: n = 1, V = 22.4\times 10^{-3} m³, T = 273.15 K, P = 1.013\times 10^{5} Pa.

R = \frac{PV}{nT} = \frac{(1.013\times 10^{5})(22.4\times 10^{-3})}{1 \times 273.15} = 8.314\,\text{J mol}^{-1}\,\text{K}^{-1}.

Why: R is a universal constant — the same for helium, for nitrogen, for CO₂, for any ideal gas. Its universality is another statement of the content of Avogadro's hypothesis: equal volumes of different gases at the same T and P contain equal numbers of molecules.

The molecular form — replacing moles with molecules

If N is the number of molecules and n is the number of moles, then N = n N_A. Equation (8) becomes

PV = nRT = \frac{N}{N_A}\,RT = N\left(\frac{R}{N_A}\right) T = N k_B T,

with Boltzmann's constant

k_B = \frac{R}{N_A} = \frac{8.314}{6.022\times 10^{23}} = 1.381\times 10^{-23}\,\text{J K}^{-1}. \tag{9}

The two forms are the same law:

\boxed{\;PV = nRT = N k_B T\;} \tag{10}

R is the "per mole" constant; k_B is the "per molecule" constant. When the physics involves bulk amounts of gas (a cylinder, a room, an atmosphere) you will usually see PV = nRT. When the physics zooms in on individual molecules (kinetic theory, statistical mechanics, astrophysics) you will see PV = N k_B T. Use whichever is convenient.

What makes a gas "ideal"

Two assumptions define an ideal gas:

  1. The molecules occupy negligible volume. Each molecule is treated as a point particle. In a real gas, molecules have a finite size — roughly 0.3 nm diameter for air molecules — which eats into the volume available.
  2. The molecules do not interact except during brief collisions. No long-range attraction or repulsion. In a real gas, van der Waals attractions pull molecules together at moderate distances and hard-core repulsion pushes them apart at short distances.

These assumptions are excellent at low pressure (molecules far apart, so finite size matters little) and high temperature (kinetic energy \gg attractive potential, so attractions matter little). At STP, air obeys PV = nRT to within about 0.1%. At 100 atm, nitrogen deviates by about 10%. Near the boiling point of a gas, deviations are large — because that is precisely where intermolecular attractions are the dominant physics, which is what makes the gas condense.

The going-deeper section at the end of this article sketches the van der Waals correction that fixes these deviations.

Three everyday applications — before the worked examples

Before you see the worked examples, it helps to have three pictures in mind, each an everyday application of one of the three gas laws.

Worked examples

Example 1: An LPG cylinder on a Delhi rooftop

A sealed 14.2 kg Indane LPG cylinder has an internal volume of 29 L (0.029 m³). The gas space above the liquid is 4.0 L (= 4.0×10⁻³ m³) and contains LPG vapour (take it to be pure propane, molar mass 44 g/mol) at a gauge pressure of 5.6 bar and temperature 20 °C. The cylinder is moved from an air-conditioned godown to a 45 °C rooftop. Assuming the gas space volume is approximately unchanged (liquid LPG is nearly incompressible and expands only slightly), find the new pressure of the vapour and the number of moles of vapour it contains.

Schematic of an LPG cylinder with vapour space above liquid A red LPG cylinder, 29 L internal volume, mostly filled with liquid LPG at 85% and a 4 L vapour space above. Arrows mark T and P. liquid LPG vapour (4 L) P, T valve Before: 20 °C, 5.6 bar After: 45 °C, P₂ = ? volume ≈ constant
Cross-section of a 14.2 kg LPG cylinder. Below is liquid propane; above is propane vapour at the saturation pressure. Heating the cylinder without a volume change is Gay-Lussac's law.

Step 1. Identify which gas law fits. Volume approximately constant, amount of gas constant (sealed cylinder). Gay-Lussac's P/T = \text{constant} is the right form.

Why: the liquid in the cylinder means the amount of vapour is actually roughly constant only if we ignore evaporation/condensation at the liquid surface. In practice, warming the cylinder evaporates more LPG and increases n — a real propane tank's pressure rise with temperature is therefore steeper than pure Gay-Lussac would predict. For this worked example, we treat the vapour as an isolated ideal gas to get a clean first estimate.

Step 2. Convert to absolute temperature. T_1 = 20 + 273 = 293 K, T_2 = 45 + 273 = 318 K.

Step 3. Absolute pressure, not gauge. Gauge pressure is 5.6 bar above atmospheric, so P_1 = 5.6 + 1.01 = 6.61 bar = 6.61\times 10^5 Pa.

Why: all gas law equations need absolute pressure, because the derivation starts from P_1 V_1 = n R T_1 and n R T is the total PV, not an excess over atmospheric. A common mistake is to use gauge pressure, giving wrong answers by about 15%.

Step 4. Apply Gay-Lussac's law.

\frac{P_2}{P_1} = \frac{T_2}{T_1} \quad \Rightarrow \quad P_2 = P_1 \frac{T_2}{T_1} = 6.61\times 10^5 \times \frac{318}{293} = 7.17\times 10^5\,\text{Pa}.

Convert back to gauge: P_{2,\text{gauge}} = 7.17 - 1.01 = 6.16 bar.

Why: a 25 K temperature rise pushed the absolute pressure up by 8.5% — modest. But the cylinder is rated for 30 bar, so there is a 4× safety factor even at 45 °C.

Step 5. Number of moles of vapour. Use PV = nRT with V = 4.0\times 10^{-3} m³ and the initial state:

n = \frac{P_1 V_1}{R T_1} = \frac{(6.61\times 10^5)(4.0\times 10^{-3})}{8.314 \times 293} = \frac{2644}{2436} = 1.09\,\text{mol}.

In grams of propane: 1.09 \times 44 = 48\,\text{g}, or about 48/14{,}200 = 0.34% of the cylinder's total mass — the rest is liquid.

Result: heating the cylinder from 20 °C to 45 °C raises the vapour gauge pressure from 5.6 to 6.2 bar. The vapour space contains about 1.1 mol (48 g) of propane. The cylinder stays far below its 30 bar rated pressure.

What this shows: Gay-Lussac's law is the relevant rule for any rigid, sealed container heated up. The linear P \propto T dependence is mild compared with the exponential vapour-pressure curve of the liquid itself, but it is the correct limit for a pure gas phase.

Example 2: A SCUBA diver's lung at the Andaman corals

A recreational SCUBA diver at Havelock Island has 5.0 L of air in their lungs at a depth of 30 m, at their body temperature of 37 °C. They accidentally hold their breath and ascend toward the surface. Assuming the air temperature remains at body temperature throughout, find the volume the trapped air would try to occupy at the surface.

Ambient pressure at 30 m of sea water is P_{\text{surface}} + \rho g h. Take \rho = 1025\,\text{kg/m}^3 for sea water, g = 9.81\,\text{m/s}^2, P_\text{surface} = 1.013\times 10^{5} Pa.

SCUBA diver at 30 m versus surface — lung expansion A diver at 30 m with lungs at 4 bar and 5 L. At the surface, the same amount of air expands to roughly 20 L at 1 bar. surface (1 atm) diver at surface V ≈ 20 L diver at 30 m 5 L 30 m depth
P ≈ 4 atm
At 30 m depth the diver's lungs hold 5 L at about 4 atm. On an ascent while holding the breath, that same amount of air would expand to about 20 L at 1 atm — far beyond lung capacity.

Step 1. Write the pressure at depth.

P_1 = P_\text{surface} + \rho g h = 1.013\times 10^5 + 1025 \times 9.81 \times 30 = 1.013\times 10^5 + 3.017\times 10^5
P_1 = 4.03\times 10^5\,\text{Pa} \approx 4.0\,\text{atm}.

Why: every 10 m of sea water adds approximately 1 atm to the ambient pressure. This is a standard diver's rule of thumb that follows directly from hydrostatics.

Step 2. Identify the law. Temperature is held constant at 37 °C (body temperature), and the amount of air is constant (breath held). Boyle's law P_1 V_1 = P_2 V_2 applies.

Step 3. Solve for V_2.

V_2 = V_1 \frac{P_1}{P_2} = 5.0 \times \frac{4.03\times 10^5}{1.013\times 10^5} = 5.0 \times 3.98 = 19.9\,\text{L}.

Why: the pressure drops by a factor of 4 during the ascent from 30 m to the surface, so the volume tries to expand by a factor of 4. The human lung total capacity is about 6 L, so 20 L is catastrophically beyond what the lung can contain.

Step 4. What actually happens. The lungs cannot hold 20 L. The excess air bursts through the alveolar walls into the bloodstream as gas emboli (arterial gas embolism) or into the chest cavity (pneumothorax). This is the medical reason every dive manual insists: never hold your breath on ascent. Exhaling continuously during ascent lets the expanding air escape freely, keeping the lung volume near normal.

Result: a 5 L breath held at 30 m would want to expand to about 20 L at the surface — 4× the capacity of the lung. The rule "always exhale on ascent" is a direct application of Boyle's law.

What this shows: Boyle's law is not an abstract 17th-century curiosity. It is the fundamental physics of SCUBA, free diving, high-altitude flight, and every other setting where humans move between environments of different ambient pressure. Every SCUBA certification course begins with this calculation.

Example 3: The tyre of a motorbike after a long NH-8 ride

A motorbike tyre has an internal volume of 2.5 L (treat it as approximately constant — the tyre walls are stiff). At the start of a ride from Jaipur, the cold tyre holds air at 2.5 bar (gauge) and 25 °C. After an hour on the highway, friction and deformation warm the tyre to 45 °C. Find the new gauge pressure.

Motorbike tyre before and after a ride A tyre at 25 °C reading 2.5 bar gauge, and the same tyre at 45 °C reading 2.73 bar gauge — a Gay-Lussac-law heating. Before (cold) 25 °C 2.50 bar gauge After (warm) 45 °C 2.73 bar gauge
The tyre air is at a fixed volume. A 20 K heating raises the gauge pressure by about 0.23 bar — a 9% jump that is exactly what tyre-pressure monitoring systems report.

Step 1. Volume constant, n constant. Gay-Lussac's P/T = \text{constant}.

Step 2. Convert to absolute. Gauge 2.5 bar → absolute 3.51 bar = 3.51\times 10^5 Pa. T_1 = 298 K, T_2 = 318 K.

Step 3. Compute P_2.

P_2 = P_1 \frac{T_2}{T_1} = 3.51\times 10^5 \times \frac{318}{298} = 3.51\times 10^5 \times 1.0671 = 3.75\times 10^5\,\text{Pa}.

Gauge: P_{2,\text{gauge}} = 3.75 - 1.01 = 2.74 bar.

Why: the gauge pressure rose by 0.24 bar, but the absolute pressure only rose by 7% — the correct proportionality factor. Using gauge pressure directly in Gay-Lussac's law (a common mistake) would predict P_2 = 2.5 \times 318/298 = 2.67 bar — that's 0.07 bar off, a 25% error on the pressure rise.

Step 4. What this means for tyre maintenance. Tyre makers print recommended pressures for cold tyres. A rider checking tyre pressure after a highway ride gets a reading that is naturally higher by about 0.25 bar; bleeding air out to "correct" it leaves the tyre under-inflated when it cools down — exactly the wrong thing to do. The standard advice "check tyre pressure when tyres are cold" is a direct rule-of-thumb of Gay-Lussac's law.

Result: after warming from 25 °C to 45 °C, the gauge pressure rises from 2.5 to 2.73 bar. Check pressure when cold.

What this shows: Gay-Lussac's law converts a small temperature change into a measurable pressure change. The effect is small enough not to be dangerous but large enough to fool an inattentive rider.

Common confusions

If you came here to apply PV = nRT to textbook problems, you have what you need. What follows is the van der Waals correction to the ideal gas law, an explanation of why the ideal gas is a fixed-point of both statistical mechanics and thermodynamics, and the c_p - c_v = R relation that the ideal gas law gives you for free.

The van der Waals equation — correcting for molecular size and attraction

Real gases have two things ideal gases lack: molecules take up some volume (so the volume "available" to the gas is less than V), and molecules attract each other (so the pressure they exert on the walls is less than the ideal value). Van der Waals in 1873 proposed a modified equation:

\left(P + \frac{a n^2}{V^2}\right)(V - nb) = nRT. \tag{11}

The constant b is the "excluded volume" per mole — roughly four times the physical volume of all the molecules. The constant a measures the strength of intermolecular attraction. Both are determined empirically for each gas; typical values for N₂: a = 0.137\,\text{Pa m}^6\,\text{mol}^{-2}, b = 3.87\times 10^{-5}\,\text{m}^3\,\text{mol}^{-1}.

Two consequences worth noting:

  1. At low density (V/n \to \infty), both correction terms vanish and (11) collapses to PV = nRT. The ideal gas law is the infinite-dilution limit of every gas.

  2. At high density, (11) develops a loop in its P-vs-V isotherms for T below a critical value T_c. The loop corresponds to the liquid-gas transition: there is a pressure range over which the equation has three real volume roots, corresponding to a liquid root, an unstable root, and a gas root. The Maxwell construction (equal-area rule) extracts from this the saturation pressure of the gas-liquid coexistence curve. The van der Waals equation is historically the first analytical theory of the liquid-gas transition.

Why PV = nRT comes for free from kinetic theory

In the next chapter we will derive P = \tfrac{1}{3}\rho \langle v^2\rangle from scratch — the pressure of a gas in terms of the mean-square molecular speed. Combined with the equipartition theorem \tfrac{1}{2}m\langle v^2\rangle = \tfrac{3}{2}k_B T (each of the three translational degrees of freedom gets \tfrac{1}{2}k_B T), this gives directly

P = \frac{1}{3}\rho \langle v^2\rangle = \frac{N}{3V}\,m\langle v^2\rangle = \frac{N}{V}\,k_B T,

so PV = N k_B T. The ideal gas law is a consequence of (a) treating a gas as a collection of freely moving point particles and (b) assigning each particle \tfrac{1}{2}k_B T per quadratic term in its energy. The empirical experiments of Boyle, Charles, and Gay-Lussac were, in retrospect, direct measurements of \langle v^2\rangle \propto T and Avogadro's hypothesis.

c_p - c_v = R — Mayer's relation

For an ideal gas, the molar specific heats at constant pressure (c_p) and constant volume (c_v) satisfy

c_p - c_v = R. \tag{12}

The derivation: heat a mole of gas by dT at constant volume. The work done is zero (no volume change), so all heat goes into internal energy: du = c_v\,dT. Now heat it by the same dT at constant pressure. The volume change is dV = R\,dT/P (from PV = RT), so the work done is P\,dV = R\,dT. The internal energy change is still c_v\,dT (internal energy of an ideal gas depends only on T, not on V — this is Joule's law). Heat absorbed = internal energy change + work = c_v\,dT + R\,dT = c_p\,dT. Therefore c_p = c_v + R, and rearranging gives (12).

Numerically: a monatomic ideal gas has c_v = \tfrac{3}{2}R (three translational DOF, by equipartition), so c_p = \tfrac{5}{2}R and \gamma = c_p/c_v = 5/3 \approx 1.667. A diatomic ideal gas at moderate temperature has c_v = \tfrac{5}{2}R (three translational + two rotational DOF), so c_p = \tfrac{7}{2}R and \gamma = 7/5 = 1.4 — the value that appears in every adiabatic-process calculation for air.

Dalton's law of partial pressures

If several ideal gases are mixed in the same volume at the same temperature, each gas exerts a pressure equal to what it would exert if it alone occupied the volume. The total pressure is the sum of the partial pressures:

P_\text{total} = P_1 + P_2 + \cdots = \frac{n_1 RT}{V} + \frac{n_2 RT}{V} + \cdots = \frac{(n_1 + n_2 + \cdots)RT}{V}.

This is a direct consequence of the non-interacting-molecule assumption: molecule A does not know about molecule B, so each species's pressure adds linearly. Atmospheric pressure at sea level is about 78% partial pressure of N₂, 21% O₂, 0.93% Ar, 0.04% CO₂, and variable water vapour. A SCUBA diver at 30 m therefore breathes O₂ at partial pressure 0.21 \times 4 = 0.84 bar — close to the 1 bar threshold where oxygen toxicity becomes a risk on prolonged dives.

When PV = nRT fails — the critical point

The van der Waals correction tells you where the ideal gas law fails quantitatively. The most dramatic failure is near the critical point — the single (T_c, P_c, V_c) point in the phase diagram at which the gas-liquid distinction vanishes. For CO₂ the critical point is T_c = 304 K, P_c = 73.8 bar — just above room temperature. Above T_c no amount of compression can liquefy the gas; below T_c compression eventually does. The critical point is where the ideal gas law's assumption of "non-interacting" molecules collapses entirely — the molecules are touching each other.

This is exactly the regime that makes espresso machines work (hot water under pressure extracts coffee), that enables supercritical CO₂ extraction in the chemical industry (coffee decaffeination, for instance), and that makes the critical point a rich subject in its own right. But none of that invalidates the ideal gas law at ordinary conditions — it just marks the boundary of the law's validity.

Where this leads next