In short
The ideal gas law combines three experimental observations about gases into one equation:
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:
- PV = nRT, using the number of moles and the universal gas constant R = 8.314\,\text{J mol}^{-1}\,\text{K}^{-1};
- PV = N k_B T, using the number of molecules and the Boltzmann constant k_B = 1.381\times 10^{-23}\,\text{J K}^{-1}.
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,
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.
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):
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.
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:
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':
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):
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):
Rearrange:
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
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:
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.
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
with Boltzmann's constant
The two forms are the same law:
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:
- 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.
- 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.
-
SCUBA tank at Havelock Island, Andaman. A diver's aluminium tank at the surface holds about 10 litres at 200 bar pressure. At a depth of 30 m the ambient pressure is 4 bar, so the air expands by a factor of 50 as it flows out of the regulator into the diver's lungs over the dive — Boyle at work. The safety rule "never hold your breath on ascent" exists because holding a breath of 2-bar air from 10 m while surfacing would double the trapped volume and tear lung tissue.
-
Hydrogen balloon at the Pushkar Fair. Children's balloons sold on the fairground can be filled to 10 L at 15 °C (288 K). Left in a parked car in April where the interior hits 60 °C (333 K), Charles's law says the new volume would be 10\times 333/288 = 11.56 L — a 15% stretch. Cheap latex balloons burst in exactly this scenario.
-
LPG cylinder on a Delhi rooftop. A 14.2 kg Indane LPG cylinder has an internal volume of about 29 L. With the cylinder 85% full of liquid LPG, the gas space above is \approx 4 L at typically 5-8 bar vapour pressure depending on temperature. On a 45 °C afternoon, Gay-Lussac's law says the pressure in this gas space rises proportional to T (kelvin), from about 5.6 bar at 20 °C to 6.1 bar at 45 °C. Indian LPG cylinders are pressure-tested to 30 bar, giving a huge safety margin. But the vapour pressure of LPG itself (an exponential function of temperature) is why you never leave a cylinder in the direct sun.
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.
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.
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:
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.
P ≈ 4 atm
Step 1. Write the pressure at depth.
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.
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.
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.
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
-
"Celsius is fine for gas laws." Not fine. The ratio T_2/T_1 has to be a ratio of absolute temperatures (kelvin). Going from 20 °C to 40 °C is not a doubling — it is a 5% rise (from 293 K to 313 K). Always convert to kelvin before applying any gas law involving T.
-
"Use gauge pressure in PV = nRT." Never. All three gas laws — and their combined form — use absolute pressure, the true force-per-area that the molecules exert on the walls. Adding atmospheric pressure (≈ 1.01 bar) to a gauge reading is a required step.
-
"The ideal gas law breaks at any pressure." Actually, it is accurate to within a few percent at all ordinary conditions — room temperature and pressures up to a few atmospheres. The law fails when molecules are close enough to interact (high pressure) or slow enough for attractions to dominate (near condensation). At STP, PV = nRT is essentially exact for air.
-
"Different gases have different gas constants." The universal gas constant R = 8.314\,\text{J mol}^{-1}\,\text{K}^{-1} is the same for every ideal gas. What differs between gases is the molar mass: a mole of helium is 4 g; a mole of nitrogen is 28 g. That is why R/M (specific gas constant) differs gas-to-gas, but R itself does not.
-
"Molecules in a gas all move at the same speed." Molecules have a distribution of speeds (the Maxwell-Boltzmann distribution). Temperature determines the mean kinetic energy, not a single speed. Kinetic theory handles this in detail; for the ideal gas law itself, only the mean kinetic energy matters.
-
"Avogadro's number is an arbitrary choice." Since the 2019 SI redefinition, N_A is now defined to be exactly 6.022{,}140{,}76\times 10^{23}. Before that, the mole was defined via 12 g of carbon-12, and N_A had to be measured. Now the definition is the other way around, which cleans up the whole structure of units. For everyday physics, the number is 6.022\times 10^{23}, full stop.
-
"Pressure is just weight per unit area." For a fluid column under gravity, yes. But a gas's pressure is also a non-hydrostatic quantity — it is force per unit area exerted on any surface in contact with the gas, including the bottom of a sealed vessel (where the gas has no weight pressing down on it). The microscopic picture is that molecules hit all walls with equal intensity, pressing outward in all directions.
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:
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:
-
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.
-
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
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
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:
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
- Kinetic Theory — Pressure and Temperature — derives P = \tfrac{1}{3}\rho\langle v^2\rangle from molecular collisions, recovering PV = N k_B T from first principles.
- Degrees of Freedom and Equipartition — explains the c_v = \tfrac{f}{2}R result and why diatomic air has \gamma = 7/5, while a monatomic gas like helium has \gamma = 5/3.
- Thermodynamic Processes — uses the ideal gas law to characterise isothermal, adiabatic, isobaric, and isochoric processes on a P-V diagram.
- Mean Free Path — the length a gas molecule travels between collisions, derived from the ideal gas law plus the molecular cross-section.
- Heat Engines and the Carnot Cycle — the most efficient heat engine uses alternating isothermal and adiabatic processes, and the ideal gas law lets you compute its efficiency analytically.