1. The Morning My Bicycle Tyre Taught Me About Gases
I still remember the morning a flat bicycle tyre turned into a chemistry lesson I never forgot. I was sixteen, late for school, and pumping up the back tyre of my bicycle with a hand pump that had seen better days — my first, clumsy lesson in the ideal gas law. The tyre was soft and squashed flat against the ground. Ten strokes of the pump and it began to firm up. Twenty strokes and the pump handle started to push back against my hands, harder with every stroke. By thirty strokes the handle was genuinely difficult to move, and the barrel of the pump felt warm in my grip. I had not added any heat. I had only squeezed the same air into a smaller and smaller space, and the air had answered with pressure and warmth.
That small struggle contains the whole of the ideal gas law. A gas is not a vague, invisible nothing. It is a crowd of tiny particles in constant motion, and when you change how much room they have, how hot they are, or how many of them there are, the pressure they exert changes in ways you can predict with a single short equation. The equation is PV = nRT, and it is one of the most useful pieces of mathematics in all of chemistry. It tells you how the pressure, volume, temperature and amount of a gas hang together, and it works well enough to design car tyres, predict how high a weather balloon will rise, and work out how much oxygen a scuba diver is carrying.
Most people meet gases as something vague and hard to picture. You cannot see the air in a room, and you cannot hold a handful of it the way you can hold a stone. Yet gases obey rules that are simpler and cleaner than the rules for liquids or solids, and that simplicity is exactly why chemists love them. A gas fills whatever container it is in. It pushes on every wall of that container. And if you know any three of its four key properties, the ideal gas law lets you calculate the fourth.
This article builds that equation from the ground up. We will meet the four separate gas laws that came first — Boyle's, Charles's, Gay-Lussac's and Avogadro's — see how each one was discovered through hands-on experiments, and then combine them into PV = nRT. We will work through real calculations step by step, including the unit conversions and the Celsius-to-Kelvin change that catches out almost every student at least once. We will also look at where the equation breaks down, because real gases are not quite ideal, and knowing the limits of a model is part of understanding it.
2. What Is the Ideal Gas Law?
The ideal gas law is a single equation that relates four measurable properties of a gas: its pressure (P), its volume (V), the number of moles of gas present (n), and its absolute temperature (T). The equation is:
PV = nRT
Here R is a constant called the ideal gas constant, or universal gas constant. It is the same number for every gas, which is part of what makes the equation so powerful. You do not need a different constant for oxygen, nitrogen, helium or carbon dioxide. One constant serves them all, as long as the gas behaves in an ideal way.
Each symbol in the equation stands for something you can measure in a laboratory. Pressure is the force the gas exerts on the walls of its container, divided by the area of those walls. Volume is the space the gas occupies, which is normally the volume of its container, since a gas expands to fill whatever holds it. The amount n is measured in moles, the chemist's counting unit for particles, where one mole contains about 6.022 × 10²³ particles. Temperature must be measured on the Kelvin scale, the absolute scale that starts at absolute zero, the coldest temperature possible.
The equation says something simple once you read it as a sentence: pressure times volume equals the amount of gas times the gas constant times the temperature. If you double the temperature while holding everything else fixed, the product of pressure and volume must double. If you squeeze a gas into half its volume at the same temperature, its pressure must double.
2.1 What "ideal" means
The word "ideal" is doing real work in the name. The ideal gas law describes an ideal gas, a theoretical model of a gas in which the particles have no volume of their own and exert no forces on each other. Real gas particles do have a tiny volume, and they do attract each other weakly. Under ordinary conditions — low pressure and moderate temperature — those effects are so small that the equation gives answers accurate to within a percent or two. That is why the model is worth learning: it is simple, and it is right often enough to be genuinely useful.
Think of it like a map of a city. A map is not the city itself. It leaves out the cracks in the pavement and the colour of every door. But it still gets you where you need to go. The ideal gas law is a map of gas behaviour. It leaves out the tiny attractions between molecules and the tiny space the molecules themselves occupy, and in exchange it gives you a clean, reliable guide to how gases behave in the laboratory, in the kitchen, in the atmosphere and in your body.
The ideal gas law is a map, not the territory. It ignores the tiny size of gas particles and the weak pulls between them, and in exchange it gives you one equation that predicts how any gas will behave under ordinary conditions.
The OpenStax textbook puts it plainly: the individual gas laws were combined into a single equation, the ideal gas law, that relates gas quantities and is quite accurate for low pressures and moderate temperatures. That qualifier matters, and we will come back to it in section 12, where real gases start to depart from the ideal picture. For now, the key point is that the ideal gas law is not a guess. It is the product of more than a century of careful experiments, each one isolating a single relationship between two gas properties while holding the others steady.
2.2 The four properties, one at a time
Before combining anything, it helps to get a feel for each property on its own. Pressure is the one you feel most directly. When you blow up a balloon, the air inside pushes outward on the rubber, and the rubber pushes back. The harder you blow, the higher the pressure, and the tighter the balloon feels. Pressure is measured in atmospheres (atm), pascals (Pa), kilopascals (kPa), torr or millimetres of mercury (mmHg), depending on the field. One atmosphere is roughly the pressure of the air at sea level, about 101,325 pascals.
Volume is the space the gas takes up. A gas has no fixed volume of its own. Release a puff of gas from a small cylinder into a large room and it spreads through the whole room. Chemists usually measure gas volume in litres (L) or cubic metres (m³). One litre is the same as one cubic decimetre, and a thousand litres make a cubic metre.
Amount, n, is the number of moles. A mole is simply a very large number of particles, chosen so that the mass of one mole of a substance in grams equals the mass of one particle in atomic mass units. Twelve grams of carbon-12 contains one mole of carbon atoms. The same idea applies to gases: one mole of oxygen gas contains about 6.022 × 10²³ oxygen molecules. Using moles lets chemists count particles by weighing them, which is far easier than counting them one by one. The Sciory article on Atoms and Molecules covers atomic structure, bonding and the states of matter in more detail.
3. What a Gas Actually Is: The Kinetic Molecular Theory
To understand why the ideal gas law works, you need a picture of what a gas is at the level of particles. The kinetic molecular theory gives you that picture, and it rests on a handful of simple assumptions. Gas particles are in constant, random motion. They move in straight lines until they collide with something — another particle or a wall — and then they bounce off and carry on. Their collisions are elastic, meaning no kinetic energy is lost in the collision itself. The particles are tiny compared with the distances between them, so most of a gas is empty space. And the average kinetic energy of the particles depends only on the temperature: hotter gas means faster particles, colder gas means slower ones.
I first saw this theory come alive in a school laboratory, not in a textbook. My teacher had put a few drops of bromine water in a gas jar, covered it with a glass plate, and placed an empty jar upside down on top. When she slid the plate away, the brown vapour began to creep upward into the empty jar, slowly at first, then steadily, until both jars were the same pale brown. Nobody had stirred anything. Nobody had poured anything. The particles had simply wandered, by their own random motion, until they were evenly spread. That quiet, unstirred spreading — diffusion — is one of the most convincing demonstrations that gas particles really do move on their own, all the time, in every direction.
That picture explains pressure. Pressure is not a mysterious push. It is the result of countless tiny collisions. Every time a gas particle hits the wall of its container, it bounces back and gives the wall a tiny nudge. One nudge is nothing. But a container holds an enormous number of particles — trillions upon trillions — each colliding billions of times a second. Add up all those nudges over the whole wall, and you get a steady, measurable force. That is pressure: the collective effect of molecular collisions.

Once you see pressure as collisions, the gas laws stop looking like formulas to memorise and start looking like common sense. Squeeze a gas into a smaller container and the same number of particles now hit the walls more often, because they have less distance to travel between collisions. More collisions per second means more pressure. Heat a gas and its particles move faster, so each collision hits harder and collisions happen more often. More pressure again. Add more gas particles to a container and there are simply more particles to collide with the walls. The ideal gas law is what you get when you turn those three pieces of common sense into mathematics.
The theory also explains why a gas fills its container. Particles move in straight lines until something stops them, and in an open room nothing stops them until they reach a wall. They spread out because there is nothing holding them together. Liquids and solids hold together because their particles attract each other strongly. Gas particles are too far apart, and moving too fast, for those attractions to matter much. That is why a gas has no fixed shape and no fixed volume, and why it expands to fill whatever space is available.
3.1 The assumptions, stated plainly
The kinetic molecular theory makes five assumptions about an ideal gas. First, gas particles are in constant random motion. Second, the volume of the particles themselves is negligible compared with the volume of the container. Third, there are no attractive or repulsive forces between particles. Fourth, collisions between particles and with the walls are perfectly elastic, so no kinetic energy is lost. Fifth, the average kinetic energy of the particles is directly proportional to the absolute temperature.
Real gases break every one of these assumptions a little. Real particles do have volume. Real particles do attract each other. Real collisions are not perfectly elastic. But under ordinary conditions the violations are small, and the theory predicts real behaviour well. When conditions become extreme — very high pressure, very low temperature — the violations grow, and the ideal gas law starts to give wrong answers. Section 12 takes up that story. For now, hold on to the picture: a crowd of tiny, fast, randomly moving particles, bouncing off walls, and the pressure you measure is the sum of their collisions.
4. What Is Boyle's Law? Pressure and Volume
The first of the four gas laws to be nailed down was Boyle's law, and it came out of a very hands-on experiment. In the 1660s, the Irish chemist Robert Boyle and his assistant Robert Hooke built a J-shaped glass tube, sealed at the short end, and poured mercury into the long end. As they added more mercury, the trapped air in the short end was squeezed into a smaller and smaller volume, and they measured the pressure of the mercury column pressing on it. What they found was a clean, simple pattern: when the temperature and the amount of gas stay the same, pressure and volume are inversely proportional. Double the pressure, and the volume halves. Halve the pressure, and the volume doubles.
Boyle's law can be written as:
P × V = constant (at fixed T and n)
Or, for a gas changing from one state to another:
P₁V₁ = P₂V₂
The subscripts 1 and 2 simply mean "before" and "after". If you know three of the four numbers, you can calculate the fourth. The law works because of the collision picture from section 3. Squeeze the same number of particles into half the space and they hit the walls twice as often, so the pressure doubles. Let the same gas expand into twice the space and the collisions halve, so the pressure halves. Nothing about the particles themselves has changed. Only the room they have to move in.
I learned Boyle's law properly not from the J-tube but from a plastic syringe in a school lab. The teacher sealed the nozzle of a large syringe with a fingertip — or rather, with a cap — and asked us to push the plunger in. At first it moved easily. Then it resisted. The harder we pushed, the harder it pushed back, until our thumbs ached and the plunger would go no further. Then, when we pulled the plunger back out, the resistance faded. That push-back was Boyle's law in the palm of your hand: less volume, more pressure, and the relationship is exact enough to calculate.
4.1 Boyle's law in everyday life
You meet Boyle's law every time you breathe. Your lungs work as a Boyle's law machine. When the diaphragm drops and the chest expands, the volume inside the lungs increases, the pressure inside falls below the pressure of the air outside, and air flows in to even things out. When the chest contracts, the volume falls, the pressure rises above the outside air, and air flows out. You never have to think about it. Your body runs the calculation for you, thousands of times a day.
Scuba divers meet Boyle's law in a more dramatic way. As a diver descends, the water pressure rises, and the air in the diver's lungs and in any air spaces in the body is compressed. At ten metres depth, the pressure is about twice what it is at the surface, so a given amount of air takes up about half the volume. That is why divers must breathe continuously on ascent: air that was compressed at depth expands as the pressure falls, and holding your breath while it expands can injure the lungs. The rule is simple, the consequence of ignoring it is serious, and the physics is pure Boyle.

4.2 A worked example: Boyle's law
A gas occupies 6.00 L at a pressure of 1.00 atm. It is compressed at constant temperature until the pressure reaches 3.00 atm. What is the new volume?
Using P₁V₁ = P₂V₂:
P₁ = 1.00 atm, V₁ = 6.00 L, P₂ = 3.00 atm
V₂ = P₁V₁ / P₂ = (1.00 × 6.00) / 3.00 = 6.00 / 3.00 = 2.00 L
The volume falls to one third of its original value because the pressure has tripled. Notice that the units of pressure cancel as long as both pressures use the same unit, and the answer comes out in litres because the volume was given in litres. That cancelling of units is a useful check: if your units do not cancel properly, something has gone wrong.
The most common mistake with Boyle's law is forgetting the conditions. The law only holds when the temperature and the amount of gas stay constant. If you compress a gas quickly, it warms up, and the temperature change spoils the simple inverse relationship. Compress it slowly, letting the heat escape, and the law holds cleanly. That is why careful experiments keep the temperature steady, and why textbook problems always say "at constant temperature" — it is not decoration, it is a condition of the law.
5. What Is Charles's Law? Volume and Temperature
Charles's law is the relationship between the volume of a gas and its temperature when the pressure and the amount of gas stay the same. It is named after Jacques Charles, a French scientist and ballooning pioneer who studied the behaviour of gases in the 1780s. Charles found that gases expand by the same fraction for each degree of warming, and contract by the same fraction for each degree of cooling. His work was published by Joseph Louis Gay-Lussac in 1802, who gave Charles the credit, which is why the law carries Charles's name rather than Gay-Lussac's.
Charles's law states that the volume of a fixed amount of gas is directly proportional to its absolute temperature when the pressure is held constant:
V / T = constant (at fixed P and n)
Or, for a change from one state to another:
V₁ / T₁ = V₂ / T₂
The crucial detail is that T must be the absolute temperature in kelvin. The law does not work with Celsius temperatures, because Celsius starts at an arbitrary point — the freezing point of water — rather than at the true zero of molecular motion. At 0 °C a gas still has plenty of molecular motion and plenty of volume. At 0 K, the motion stops, and the law predicts the volume falls to zero. That is the physical reason the Kelvin scale is not optional here.
The collision picture explains Charles's law neatly. Heat a gas and its particles move faster. Faster particles hit the walls harder and more often, which would raise the pressure. But if the container can expand — a balloon, a piston free to move — the gas pushes the wall outward instead, increasing the volume until the pressure falls back to its original value. The volume grows in exact proportion to the absolute temperature. Double the Kelvin temperature and the volume doubles. Halve it and the volume halves.
5.1 Hot air balloons
The hot air balloon is Charles's law made visible. The air inside the balloon's envelope is heated by a burner until it is much hotter than the air outside. The hot air expands, some of it escapes through the opening at the bottom, and the air that remains inside is less dense than the surrounding air. The balloon rises because the envelope now contains fewer, faster molecules pushing outward, and the whole craft is lighter than the air it displaces. OpenStax describes how the seventeenth- and eighteenth-century scientists who worked out these relationships were driven partly by the desire to understand nature and partly by the quest to make balloons in which they could fly. The science and the adventure were the same project.

5.2 A worked example: Charles's law
A gas occupies 2.00 L at 300 K. It is heated at constant pressure until its temperature reaches 450 K. What is the new volume?
Using V₁ / T₁ = V₂ / T₂:
V₁ = 2.00 L, T₁ = 300 K, T₂ = 450 K
V₂ = V₁ × T₂ / T₁ = 2.00 × 450 / 300 = 2.00 × 1.50 = 3.00 L
The temperature rose by a factor of 1.5, so the volume rose by the same factor. Now try the same problem in Celsius, and watch it go wrong: 300 K is 27 °C and 450 K is 177 °C. Using 2.00 × 177 / 27 gives 13.1 L, which is nonsense. The Celsius numbers do not start at zero molecular motion, so their ratios mean nothing. That is the whole reason for the Kelvin rule, and it is worth learning the hard way once, in a worked example, rather than in an exam.
6. Pressure and Temperature: Gay-Lussac's Law
The third relationship is between pressure and temperature when the volume and the amount of gas are held fixed. It is known as Gay-Lussac's law, or sometimes Amontons's law after Guillaume Amontons, who first established the relationship around 1700. Gay-Lussac measured it more precisely around 1800. The law states that the pressure of a fixed amount of gas is directly proportional to its absolute temperature when the volume is constant:
P / T = constant (at fixed V and n)
Or:
P₁ / T₁ = P₂ / T₂
Again, T must be in kelvin. The explanation follows directly from the collision picture. Heat a gas in a sealed, rigid container and its particles move faster. They hit the walls harder and more often. The walls cannot move, so the volume cannot grow to relieve the pressure. The pressure rises in exact proportion to the absolute temperature. Double the Kelvin temperature and the pressure doubles.
The pressure cooker is the classic example, and it is one where the physics changes what you can cook. A sealed pot of water on a stove builds up pressure as it heats, and because the pressure is higher, the water inside boils at a higher temperature than 100 °C. Food cooks faster because it is sitting in hotter water and hotter steam. The safety valve on top exists because Gay-Lussac's law has no sense of mercy: keep heating a sealed container and the pressure keeps rising until something gives way. The valve gives way first, by design.
Aerosol cans carry the same warning for the same reason. The label that says "do not expose to heat" is Gay-Lussac's law printed as a safety instruction. Heat a sealed can and the pressure inside climbs. The can is built to withstand normal temperatures, but a can left in a hot car or near a fire can reach pressures its walls were never designed for. The gas inside is not doing anything strange. It is obeying the law exactly, and the law says hotter means higher pressure when the volume cannot change.

6.1 A worked example: Gay-Lussac's law
A car tyre is inflated to 2.00 atm at 293 K (20 °C). After a long drive on a hot day, the air inside reaches 323 K (50 °C). What is the new pressure, assuming the tyre volume stays roughly constant?
Using P₁ / T₁ = P₂ / T₂:
P₁ = 2.00 atm, T₁ = 293 K, T₂ = 323 K
P₂ = P₁ × T₂ / T₁ = 2.00 × 323 / 293 = 2.00 × 1.102 = 2.20 atm
The pressure has risen by about 10%, from 2.00 to 2.20 atm. That is a real effect, and it is one reason tyre pressures are specified for cold tyres: a pressure measured on a hot tyre after driving will read higher than the same tyre measured cold, and the difference is physics, not a faulty gauge.
7. Avogadro's Law: Amount and Volume
Avogadro's law is the relationship between the amount of gas and its volume when pressure and temperature are held constant. It is named after Amedeo Avogadro, an Italian scientist who proposed it in 1811. The law states that equal volumes of different gases, at the same temperature and pressure, contain equal numbers of molecules. Put the other way round, the volume of a gas is directly proportional to the number of moles present:
V / n = constant (at fixed P and T)
Or:
V₁ / n₁ = V₂ / n₂
This was a bold claim in 1811, because nobody could see molecules or count them. Avogadro was reasoning from the volumes of gases that react together. When hydrogen and oxygen react to form water vapour, two volumes of hydrogen combine with one volume of oxygen to make two volumes of water vapour. Those neat whole-number ratios only make sense if equal volumes contain equal numbers of particles. Avogadro's insight gave chemists a way to count particles by measuring volumes, and it became one of the foundations of modern chemistry.
The collision picture explains Avogadro's law as well. Add more particles to a container at fixed pressure and temperature, and the extra particles need extra room, or the pressure would rise. If the container can expand — a balloon, a piston — the volume grows in proportion to the number of particles added. Double the moles and the volume doubles. The identity of the gas does not matter. A mole of helium, a mole of nitrogen and a mole of carbon dioxide all occupy the same volume at the same temperature and pressure, because the law depends on the number of particles, not on what kind they are.
7.1 One mole, 22.4 litres
Avogadro's law leads directly to one of the most quoted numbers in chemistry: at standard temperature and pressure — 0 °C (273.15 K) and 1 atm — one mole of any ideal gas occupies about 22.4 litres. You can check it with the ideal gas law itself: V = nRT / P = 1.00 × 0.08206 × 273.15 / 1.00 = 22.4 L. That number is worth remembering, because it gives you an instant sense of scale. A mole of gas is a large volume, roughly the size of a big bucket, and it contains about 6.022 × 10²³ molecules.
That scale explains why gas calculations feel different from solid or liquid calculations. A mole of water is 18 grams and takes up 18 millilitres, a thimbleful. A mole of water vapour at standard temperature and pressure takes up 22.4 litres, more than a thousand times the volume. Same number of molecules, wildly different space, because gas particles are far apart and mostly empty space. When water boils and turns to steam, it expands by roughly that factor, which is why a kettle lid rattles and why steam burns are so dangerous: a small amount of liquid becomes a large volume of very hot gas.

8. Putting the Four Laws Together: PV = nRT
We now have four separate relationships. Boyle's law says V is proportional to 1/P at fixed T and n. Charles's law says V is proportional to T at fixed P and n. Gay-Lussac's law says P is proportional to T at fixed V and n. Avogadro's law says V is proportional to n at fixed P and T. Each law is true on its own. The ideal gas law is what you get when you combine all four into one equation that holds all of them at once.
The combination is straightforward. Boyle's law and Charles's law and Avogadro's law can be merged into a single proportionality: V is proportional to nT/P. Rearranging gives PV proportional to nT. The constant of proportionality that turns that proportion into an equation is R, the ideal gas constant. The result is the ideal gas law:
PV = nRT
The French engineer Émile Clapeyron is usually credited with writing the equation in this combined form in 1834, bringing together the work of Boyle, Charles, Gay-Lussac and Avogadro into a single statement. It was a genuine synthesis: four experimental laws, each discovered separately over nearly two centuries, turned out to be four faces of one equation. That is the kind of unification scientists hope for, and it is why the ideal gas law is taught as one equation rather than four.
The table below summarises the four laws and what each one holds constant. It is worth studying, because most gas law problems are really asking you to recognise which law applies — which variables are changing and which are being held steady.
Law | Relationship | Held constant | Equation |
|---|---|---|---|
Boyle's law | Pressure and volume are inversely proportional | Temperature, amount | P₁V₁ = P₂V₂ |
Charles's law | Volume and temperature are directly proportional | Pressure, amount | V₁/T₁ = V₂/T₂ |
Gay-Lussac's law | Pressure and temperature are directly proportional | Volume, amount | P₁/T₁ = P₂/T₂ |
Avogadro's law | Volume and amount are directly proportional | Pressure, temperature | V₁/n₁ = V₂/n₂ |
Ideal gas law | All four quantities in one equation | Nothing — all four can change | PV = nRT |

8.1 The combined gas law
Sometimes a problem changes three variables at once — pressure, volume and temperature — while the amount of gas stays the same. For that case, the ideal gas law rearranges into the combined gas law:
P₁V₁ / T₁ = P₂V₂ / T₂
This is simply the ideal gas law with n and R cancelled out, since they are the same on both sides. It is a handy shortcut when no moles are given and none are asked for. A weather balloon rising through the atmosphere is the classic case: as it climbs, the outside pressure falls, the temperature falls, and the balloon expands. The combined gas law predicts the new volume from the new pressure and temperature without ever needing to know how many moles of helium are inside.
A worked example: a gas occupies 5.00 L at 1.00 atm and 273 K. It is taken to a pressure of 2.00 atm and a temperature of 300 K. What is the new volume?
Using P₁V₁ / T₁ = P₂V₂ / T₂:
V₂ = P₁V₁T₂ / (T₁P₂) = 1.00 × 5.00 × 300 / (273 × 2.00) = 1500 / 546 = 2.75 L
The pressure doubled, which alone would halve the volume, but the temperature also rose, which pushes the volume up a little. The two effects partly cancel, and the volume ends up at 2.75 L, a little more than half the original 5.00 L. The LibreTexts treatment of the ideal gas law derives the same combined form from the four individual laws. Working through the arithmetic like this, step by step, is the best defence against the most common error in gas law problems: forgetting that two things are changing at once.
9. The Gas Constant R and the Units That Trip Everyone Up
The ideal gas constant R is the number that makes PV = nRT work, and its value depends on the units you use for pressure and volume. This is the single most error-prone part of gas law calculations, and it deserves a section of its own. The constant is the same physical quantity in every unit system. What changes is the number you write down, because the number has to carry the units with it.
The most common value in school and university chemistry is:
R = 0.08206 L·atm·mol⁻¹·K⁻¹
Use this value when pressure is in atmospheres and volume is in litres. If your pressure is in kilopascals and your volume is in litres, use R = 8.314 kPa·L·mol⁻¹·K⁻¹. If you are working in SI units — pressure in pascals, volume in cubic metres — use R = 8.314 J·mol⁻¹·K⁻¹. The National Institute of Standards and Technology (NIST) lists the molar gas constant as 8.314462618 J·mol⁻¹·K⁻¹, a value now fixed exactly by the definition of the SI units. For ordinary calculations, 8.314 is more than precise enough.
The table below gives the common forms of R. Pick the row that matches your units, and do not mix rows. Mixing units is how a correct method produces a wrong answer.
Value of R | Use when pressure is in | Use when volume is in |
|---|---|---|
0.08206 L·atm·mol⁻¹·K⁻¹ | atmospheres (atm) | litres (L) |
8.314 J·mol⁻¹·K⁻¹ | pascals (Pa) | cubic metres (m³) |
8.314 kPa·L·mol⁻¹·K⁻¹ | kilopascals (kPa) | litres (L) |
62.36 L·torr·mol⁻¹·K⁻¹ | torr (mmHg) | litres (L) |
The four rows above are the four forms of R you are most likely to need. The first row is the workhorse for school and university problems, because most textbook questions give pressure in atmospheres and volume in litres. The second row is the SI form, used in physics and engineering. The third and fourth rows cover the cases where pressure comes in kilopascals or torr. Whichever row you choose, the rule is the same: the units of R must match the units of your pressure and volume, or the equation will give you a wrong number with no warning.
10. Worked Calculations: Using PV = nRT Step by Step
This is the section where the ideal gas law earns its keep. The method is the same for every problem, and it is worth learning as a routine rather than as a trick for each question. First, write down what you know and what you are looking for. Second, convert every quantity into the units that match your R. Third, rearrange the equation to solve for the unknown. Fourth, substitute the numbers and calculate. Fifth, check that the answer makes sense.
That routine sounds slow, and at first it is. After a few problems it becomes fast, and after many problems it becomes automatic. The students who get gas law problems wrong are almost never the ones who do not know the equation. They are the ones who skip the conversion step, or who forget that temperature must be in kelvin, or who use the wrong form of R. The routine exists to catch those errors before they reach the answer.

10.1 Finding the volume
A sample contains 2.00 mol of gas at a pressure of 1.00 atm and a temperature of 273 K. What volume does it occupy?
Rearrange the ideal gas law to solve for volume: V = nRT / P.
n = 2.00 mol, R = 0.08206 L·atm·mol⁻¹·K⁻¹, T = 273 K, P = 1.00 atm
V = 2.00 × 0.08206 × 273 / 1.00
V = 0.16412 × 273 = 44.8 L
Two moles of gas at standard temperature and pressure occupy 44.8 litres, which is exactly twice the molar volume of 22.4 litres.
10.2 Finding the pressure
A rigid container of volume 10.0 L holds 0.500 mol of gas at 300 K. What is the pressure inside?
Rearrange to solve for pressure: P = nRT / V.
n = 0.500 mol, R = 0.08206 L·atm·mol⁻¹·K⁻¹, T = 300 K, V = 10.0 L
P = 0.500 × 0.08206 × 300 / 10.0
P = 12.309 / 10.0 = 1.23 atm
The pressure is a little above atmospheric pressure, which makes sense: half a mole of gas in ten litres at room temperature is a fairly ordinary, uncompressed sample. If the answer had come out as 123 atm or 0.0123 atm, that would be a sign of a slipped decimal point, and the sensible move would be to redo the arithmetic rather than trust the number.
10.3 Finding the amount
A gas at 2.50 atm and 350 K occupies 4.00 L. How many moles are present?
Rearrange to solve for amount: n = PV / RT.
P = 2.50 atm, V = 4.00 L, R = 0.08206 L·atm·mol⁻¹·K⁻¹, T = 350 K
n = 2.50 × 4.00 / (0.08206 × 350)
n = 10.0 / 28.721 = 0.348 mol
About a third of a mole. Notice the structure of the calculation: pressure times volume on top, the gas constant times temperature underneath. The units work out too — atmospheres and litres cancel against the units of R, leaving moles. Checking units is not a formality. It is a second, independent way of catching errors, and it works even when the numbers look plausible.
10.4 Finding the temperature
A sample of 1.50 mol of gas is held at 3.00 atm in a 25.0 L container. What is its temperature?
Rearrange to solve for temperature: T = PV / nR.
P = 3.00 atm, V = 25.0 L, n = 1.50 mol, R = 0.08206 L·atm·mol⁻¹·K⁻¹
T = 3.00 × 25.0 / (1.50 × 0.08206)
T = 75.0 / 0.12309 = 609 K
The temperature is 609 K, which is 336 °C. That is very hot, and it should be: squeezing one and a half moles into 25 litres at three atmospheres takes a great deal of thermal energy. If the problem had asked for the temperature in Celsius, this is the point where you subtract 273.15, giving 336 °C. The conversion goes at the end, after the calculation, never at the start. Doing it at the start is the error that section 11 is about.
10.5 Finding a molar mass from density
The ideal gas law can also identify an unknown gas. Suppose a gas has a density of 1.96 g/L at 1.00 atm and 273 K. What is its molar mass?
Density is mass divided by volume, and the number of moles is mass divided by molar mass. Combining those facts with PV = nRT gives a useful rearrangement: M = dRT / P, where d is the density and M is the molar mass.
d = 1.96 g/L, R = 0.08206 L·atm·mol⁻¹·K⁻¹, T = 273 K, P = 1.00 atm
M = 1.96 × 0.08206 × 273 / 1.00
M = 1.96 × 22.402 = 43.9 g/mol
A molar mass of about 44 g/mol points to carbon dioxide, CO₂, whose molar mass is 44.01 g/mol. A single density measurement, combined with the ideal gas law, has identified the gas. This is not a parlour trick. It is how chemists worked out the identities and molar masses of gases long before modern instruments existed, and it remains a standard laboratory exercise.
10.6 How much air is in a scuba tank?
A scuba tank has a volume of 12.0 L and is filled to 200 atm at 293 K. How many moles of air does it hold, and what volume would that air occupy at the surface?
First, the moles: n = PV / RT.
P = 200 atm, V = 12.0 L, R = 0.08206 L·atm·mol⁻¹·K⁻¹, T = 293 K
n = 200 × 12.0 / (0.08206 × 293)
n = 2400 / 24.044 = 99.8 mol
Roughly 100 moles of air — about 2.9 kilograms of it, since air averages about 29 g/mol. Now the volume that air would occupy at the surface, at 1.00 atm and the same temperature:
V = nRT / P = 99.8 × 0.08206 × 293 / 1.00 = 2400 L
The tank holds 12 litres of space, but it holds 2,400 litres of surface-equivalent air. That is the point of compressing gas: a small, portable container carries an enormous volume of breathable air. It is also the reason the tank is built like a pressure vessel, and the reason a damaged tank is dangerous. The ideal gas law tells you exactly how much energy is stored in that compression, and it is a great deal.
11. How Do You Convert Celsius to Kelvin?
If there is one question that decides whether a gas law calculation succeeds or fails, it is this one: how do you convert Celsius to Kelvin? The answer is simple, and the consequences of getting it wrong are large, which is a combination that catches out an astonishing number of students, including good ones who know the rest of the material cold.
The conversion is:
T(K) = T(°C) + 273.15
To go the other way, subtract: T(°C) = T(K) − 273.15. In most school and university problems, 273 is used instead of 273.15, and the difference is negligible for the answers. The key point is the size of the step: one kelvin is exactly the same size as one degree Celsius. The two scales differ only in where they put zero. Celsius puts zero at the freezing point of water. Kelvin puts zero at absolute zero, the temperature where molecular motion stops. That difference of 273.15 degrees is the whole conversion.
11.1 Why the conversion matters so much
The reason the conversion matters is that the gas laws use ratios and products of temperatures. In Charles's law, V₁/T₁ = V₂/T₂, the temperatures appear as a ratio, and a ratio only makes sense if both temperatures are measured from a true zero. Celsius temperatures are not measured from a true zero. A gas at 20 °C is not "twice as hot" as a gas at 10 °C, because 0 °C is not the absence of heat — it is just the freezing point of water. A gas at 0 °C still has plenty of molecular motion. A gas at 0 K has none.
The earlier Charles's law example showed the damage. A gas heated from 300 K to 450 K expands by a factor of 1.5. In Celsius, that is a change from 27 °C to 177 °C, and the ratio 177/27 is 6.56, which would predict a volume more than six times larger. The correct answer is 3.00 L. The Celsius answer is 13.1 L. The error is not small and it is not subtle. It is a factor of more than four, and it comes from a single skipped step.
The same error in the ideal gas law itself is just as destructive. A temperature entered as 25 instead of 298 throws every answer off by a factor of twelve. A temperature entered as a negative Celsius value — say, −40 °C in a winter problem — can even produce a negative absolute temperature in the calculation, which is physically meaningless and a certain sign that the conversion was missed.
Temperature in gas law calculations must be in kelvin. Celsius is a scale with an arbitrary zero, and ratios of Celsius temperatures mean nothing. Add 273.15 before you calculate, and subtract it only at the very end if the answer is asked for in Celsius.
11.2 A conversion table worth memorising
Some temperatures come up so often that it is worth knowing their Kelvin values without reaching for a calculator:
−273.15 °C = 0 K, absolute zero, the coldest temperature possible
−40 °C = 233 K, a very cold winter day — and the one temperature where Celsius and Fahrenheit agree
0 °C = 273 K, the freezing point of water, and standard temperature
20 °C = 293 K, a comfortable room
25 °C = 298 K, the standard laboratory temperature in many textbooks
37 °C = 310 K, normal human body temperature
100 °C = 373 K, the boiling point of water at sea level
Notice that 25 °C, the most common laboratory temperature in textbook problems, is 298 K — nearly 300 K. That gives you a quick sanity check: at room temperature, your Kelvin value should be just under 300. If you see 25 in a gas law calculation where a temperature belongs, something has gone wrong.
12. When the Ideal Gas Law Stops Working: Real Gases
So far this article has treated the ideal gas law as a reliable guide, and under ordinary conditions it is. But the word "ideal" is a warning as well as a name. Real gases depart from ideal behaviour, and the departures grow as conditions become more extreme. Knowing where the model breaks down is part of understanding the model, and it is also where some of the most interesting chemistry lives.
The ideal gas law assumes that gas particles have no volume and exert no forces on each other. Both assumptions fail in real gases, and they fail in opposite directions. The volume of the particles themselves makes the real volume larger than the ideal prediction, because the particles take up space that the ideal model treats as empty. The attractions between particles make the real pressure smaller than the ideal prediction, because the attractions pull particles toward each other and away from the walls, so they hit the walls less hard.
At low pressure and moderate temperature, both effects are tiny. The particles are far apart, so their volume is negligible compared with the container, and they are moving fast enough that their weak attractions barely matter. At high pressure, the particles are squeezed close together, and their own volume becomes a significant fraction of the container. At low temperature, the particles move slowly, and their attractions have time to matter. In both cases, the ideal gas law starts to give wrong answers.

12.1 The van der Waals equation
The Dutch physicist Johannes van der Waals proposed the most famous correction to the ideal gas law in 1873. His equation keeps the same shape as PV = nRT but adds two corrections: one for the volume of the particles, and one for the attractions between them. For one mole of gas, it reads:
(P + a/V²)(V − b) = RT
The constant b corrects for the volume the particles occupy, and the constant a corrects for the attractions between them. Each gas has its own values of a and b, measured experimentally. For helium, both constants are tiny, because helium atoms are small and barely attract each other. For carbon dioxide and water vapour, the constants are much larger, because the molecules are bigger and attract each other more strongly.
The van der Waals equation is not something most students need to use in calculations. It matters because it shows exactly where the ideal gas law comes from and exactly what it leaves out. The ideal gas law is the van der Waals equation with a and b set to zero — the limit where particles have no size and no attractions. That is a clean way to see the relationship between the two: the ideal gas law is not a different kind of statement. It is the simple case of a more complete statement, and the simple case is good enough whenever a and b are small compared with the quantities they correct.
12.2 Which gases are least ideal?
Not all gases depart from ideal behaviour equally. Small, light, non-polar gases such as helium, hydrogen and nitrogen behave almost ideally under most conditions. They are the gases for which the ideal gas law is most accurate. Large, heavy, polar gases such as carbon dioxide, ammonia and water vapour depart the most. Their molecules are bigger, so the volume correction matters more, and they attract each other more strongly, so the attraction correction matters more.
Temperature matters as well. At high temperatures, all gases behave more ideally, because fast-moving particles spend little time near each other and their attractions have little chance to act. At low temperatures, the departures grow, and near the temperature where a gas condenses into a liquid, the ideal gas law fails badly. That failure is not a surprise. Condensation is precisely what happens when attractions between particles win over their thermal motion, and the ideal gas law assumes those attractions do not exist. A model that assumes away the very force that causes condensation cannot describe condensation.
A useful rule of thumb: the ideal gas law is accurate to within a few percent for most gases at pressures below about 10 atm and temperatures well above the gas's boiling point. For helium at room temperature and pressure, the error is far less than 1%. For carbon dioxide at 100 atm, the error can exceed 10%. For water vapour near its condensation point, the equation is not a reliable guide at all. The water molecule, with its strong hydrogen bonding, is one of the least ideal of common gases — a fact explored in detail in the Sciory article on Why Water Is the Weirdest Molecule.
13. The Ideal Gas Law in the Real World
The ideal gas law is not confined to textbooks and examinations. It shows up in weather forecasting, in medicine, in engines and in cooking, and once you know what to look for, you start seeing it everywhere. This section follows the equation out of the laboratory and into the world.
13.1 Weather balloons and the atmosphere
Weather balloons are the most direct application of the ideal gas law in everyday science. A balloon is filled with helium at the ground, where the pressure is about 1 atm, and released. As it climbs, the outside pressure falls — at 10 kilometres up, the pressure is roughly a quarter of its sea-level value — and the balloon expands. The ideal gas law predicts how much: if the pressure falls by a factor of four and the temperature falls by a factor of about 1.3, the volume must grow by a factor of about three. Balloon designers use exactly this calculation to decide how much helium to put in and how large the balloon can grow before it bursts. Most weather balloons are designed to burst at around 30 kilometres, having expanded to many times their launch volume.
The atmosphere itself is a gas, and its behaviour is governed by the same laws. Warm air expands and becomes less dense, which is why it rises. Cool air contracts and becomes denser, which is why it sinks. Those risings and sinkings drive the winds and shape the weather, and the meteorologists who forecast that weather use equations built on the ideal gas law as a foundation. The Sciory article on Meteorology explains how those motions turn into the weather systems we live under, from sea breezes to hurricanes.
13.2 Breathing, anaesthesia and medicine
Your lungs are a Boyle's law machine, as section 4 described, but medicine uses the ideal gas law more precisely than that. An anaesthetist delivering a gas anaesthetic needs to know exactly how much anaesthetic agent a patient is receiving, and the dose is calculated from the pressure, volume and temperature of the gas mixture using the ideal gas law. A ventilator pushing air into a patient's lungs must deliver a precise volume at a precise pressure, and the relationship between the two is governed by the same equation.
13.3 Engines, tyres and everyday machines
The internal combustion engine is a gas law machine. In each cylinder, a mixture of fuel and air is compressed, ignited, and allowed to expand, pushing a piston. The compression raises the temperature and pressure exactly as the gas laws predict, and the expansion converts the pressure into work. Engine designers calculate the compression ratio — the ratio of the cylinder volume before and after compression — using the gas laws, because the temperature reached during compression determines whether the fuel ignites cleanly or knocks.
Car tyres, already met in sections 5 and 6, are a slower version of the same physics. A tyre is a fixed volume of gas whose pressure rises and falls with temperature. That is why tyre pressure should be checked cold, and why a tyre that looks fine on a warm afternoon can look soft on a cold morning. The change is about 1% of the pressure for every 3 K of temperature change, which is small per degree but adds up across the seasons.

13.4 The kitchen
The kitchen holds a small museum of gas laws. A pressure cooker uses Gay-Lussac's law to cook faster. A bottle of sparkling water uses the solubility of carbon dioxide under pressure: the gas stays dissolved while the bottle is sealed and pressurised, and fizzes out when the cap is opened and the pressure falls. A whipped-cream dispenser uses a small cartridge of nitrous oxide at high pressure to push cream out and whip air into it at the same time. None of these devices comes with a physics label, but all of them are gas law demonstrations that happen to be useful.
Frequently Asked Questions
What is the ideal gas law?
The ideal gas law is the equation PV = nRT, which relates the pressure (P), volume (V), amount in moles (n) and absolute temperature (T) of a gas, with R the ideal gas constant. It combines Boyle's, Charles's, Gay-Lussac's and Avogadro's laws into a single equation. It describes an ideal gas, a model in which particles have no volume and exert no forces on each other, and it is accurate for most real gases at low pressure and moderate temperature.
What is Boyle's law?
Boyle's law states that the pressure and volume of a fixed amount of gas are inversely proportional when the temperature is held constant: P₁V₁ = P₂V₂. Double the pressure and the volume halves; halve the pressure and the volume doubles. It works because squeezing the same particles into a smaller space makes them collide with the walls more often, which raises the pressure.
What is Charles's law?
Charles's law states that the volume of a fixed amount of gas is directly proportional to its absolute temperature when the pressure is held constant: V₁/T₁ = V₂/T₂. Double the Kelvin temperature and the volume doubles. The temperature must be in kelvin, because the law depends on ratios of temperatures measured from absolute zero, and Celsius temperatures do not start at absolute zero.
How do you convert Celsius to Kelvin?
Add 273.15 to the Celsius temperature: T(K) = T(°C) + 273.15. Room temperature of 25 °C is 298 K, water freezes at 0 °C = 273 K, and water boils at 100 °C = 373 K. To convert back, subtract 273.15. In most textbook problems 273 is used instead of 273.15. Never use Celsius temperatures directly in gas law calculations, because ratios of Celsius temperatures give wrong answers.
What is the value of the ideal gas constant R?
The value depends on the units. The most common form is R = 0.08206 L·atm·mol⁻¹·K⁻¹, used when pressure is in atmospheres and volume is in litres. In SI units, R = 8.314 J·mol⁻¹·K⁻¹, and the National Institute of Standards and Technology lists the molar gas constant as 8.314462618 J·mol⁻¹·K⁻¹. Always pick the form of R that matches the units of your pressure and volume.
When does the ideal gas law not work?
The ideal gas law breaks down at high pressure and low temperature, where real gas particles are squeezed close together and their own volume and the attractions between them can no longer be ignored. Large, polar gases such as carbon dioxide and water vapour depart from ideal behaviour more than small gases such as helium. Near the point where a gas condenses into a liquid, the equation fails badly. The van der Waals equation adds corrections for particle volume and attractions and works better under those conditions.
Why does a hot air balloon rise?
A hot air balloon rises because heating the air inside the envelope makes it expand, following Charles's law. Some air escapes through the opening at the bottom, so the air remaining inside is less dense than the cooler air outside. The balloon becomes lighter than the air it displaces, and buoyancy lifts it. Cooling the air has the opposite effect, which is why balloon pilots control altitude by heating the air to climb and letting it cool to descend.