One equation for gases

Ideal Gas Law (PV = nRT)

The ideal gas law states that the pressure of a gas times its volume equals the amount of gas in moles times the gas constant times the absolute temperature: PV = nRT. It merges the older gas laws into one equation and describes most gases well at everyday pressures and temperatures, as long as temperature is in kelvins and pressure is absolute.

Hot air balloons rising over a misty valley at sunrise, heated air expanding inside the envelopes as the ideal gas law predicts
Heating the air in a balloon makes it expand, so the envelope holds fewer, lighter molecules than the cool air around it.

At a Glance

The ideal gas law is PV = nRT, where P is absolute pressure in pascals, V is volume in cubic meters, n is the amount of gas in moles, R = 8.314 J/(mol·K) is the gas constant, and T is the temperature in kelvins. Knowing any three of P, V, n and T lets you calculate the fourth.

Stated by
Émile Clapeyron
Year
1834, combining the earlier gas laws
Formula
PV = nRT, or PV = NkBT for N molecules
Gas constant
R = 8.314 462 618... J/(mol·K), exact
Units
P in Pa, V in m³, n in mol, T in K
Applies to
Gases at low to moderate pressure and well above their boiling point
On this page
  1. What Does the Ideal Gas Law Say?
  2. The Ideal Gas Law Explained Simply
  3. What Is the Formula for the Ideal Gas Law?
  4. Which Units and Which Value of R Should You Use?
  5. How Does It Combine Boyle's, Charles's and Avogadro's Laws?
  6. What Is the Molecular Form PV = NkT?
  7. Where Do You See the Ideal Gas Law in Everyday Life?
  8. Who Discovered the Ideal Gas Law?
  9. Going Deeper: When Does the Ideal Gas Law Fail?
  10. Practice Ideal Gas Law Problems
  11. Common Misconceptions
  12. Key Facts
  13. Quiz
  14. FAQ

What Does the Ideal Gas Law Say?

The ideal gas law ties together the four quantities that describe a sample of gas: pressure, volume, amount and temperature. Change one of them and at least one other must change to keep the equation balanced. Squeeze a gas into a smaller volume at the same temperature and its pressure climbs; heat it in a rigid container and its pressure climbs too.

The word "ideal" signals a model. An ideal gas is made of particles so small and so far apart that their own size and their pull on each other can be ignored. Real air, nitrogen, oxygen and helium come very close to this at ordinary conditions, which is why the law works so well in practice.

Two rules make or break every calculation. Temperature must be absolute, in kelvins, and pressure must be absolute, not the gauge reading on a tire pump. Our kelvin page explains why the scale has to start at absolute zero.

The Ideal Gas Law Explained Simply

Picture a gas as a swarm of tiny balls flying around a box and bouncing off the walls. Every bounce gives the wall a small push, and all those pushes together are the pressure.

Put more balls in the box and there are more bounces, so pressure goes up. Make the balls move faster by heating them and each bounce hits harder and more often, so pressure goes up again. Give the balls a bigger box and they reach the walls less often, so pressure goes down. The ideal gas law is simply the bookkeeping for all three effects at once.

What Is the Formula for the Ideal Gas Law?

The law is written PV=nRT. The left side, pressure times volume, has units of energy, and the right side does too, which is a useful sanity check. The gas constant R converts between moles and kelvins on one side and pascals and cubic meters on the other.

Because the equation has four variables, it can be solved for any one of them. Pressure is P=nRT/V, volume is V=nRT/P, amount is n=PV/(RT), and temperature is T=PV/(nR). If you prefer to let software handle the rearranging and the unit conversions, our ideal gas law calculator does all four.

Here is the ideal gas law with each variable and its SI unit, plus the four rearranged forms.

PV=nRT
What each symbol means
SymbolQuantitySI unit
Pabsolute pressurepascal (Pa)
Vvolumecubic meter (m³)
namount of gasmole (mol)
Rideal gas constant (8.314 J/(mol·K))joule per mole kelvin (J/(mol·K))
Tabsolute temperaturekelvin (K)

Rearranged to find another variable:

P=nRTVV=nRTPn=PVRTT=PVnR

Valid for: ideal gas (low pressure, high temperature); T in kelvin, P absolute.

Example 1 How much air is in a scuba tank?

A 12-liter scuba tank (0.012 m³) is filled to an absolute pressure of 20,000,000 Pa at a temperature of 293 K. How many moles of air does it hold?

  1. Given:
    • absolute pressure: P=20,000,000 Pa
    • volume: V=0.012 m3
    • ideal gas constant: R=8.314 J/(mol·K)
    • absolute temperature: T=293 K
  2. Formula: n=PVRT
  3. Substitute: P=20,000,000 Pa,V=0.012 m3,R=8.314 J/(mol·K),T=293 K
  4. Answer: n=98.52 mol

At such a high pressure real air deviates a little from ideal behavior, so a dive shop's figure would differ by a few percent.

Which Units and Which Value of R Should You Use?

In SI units, R is exactly 8.314 462 618... J/(mol·K), and the full value is on our gas constant page. With that value you must use pascals, cubic meters, moles and kelvins. Mixing liters with pascals is the most common source of answers that are off by a factor of 1,000.

Chemists often prefer liters and atmospheres. Dividing the SI value by 101.325 gives R = 0.08206 L·atm/(mol·K), and multiplying that by 760 gives 62.36 L·Torr/(mol·K) (both computed). Pick the version of R that matches your units and the rest of the calculation stays clean. Our units of pressure page lists the conversions.

The table shows how the volume of one mole changes with temperature at normal atmospheric pressure. At 0 °C it is about 22.4 liters, the familiar value used at standard temperature and pressure.

Example 2 Sizing a party balloon

A balloon is filled with 0.50 mol of helium at room temperature, 298 K, and at normal air pressure, 101,325 Pa. What volume does the helium take up?

  1. Given:
    • amount of gas: n=0.5 mol
    • ideal gas constant: R=8.314 J/(mol·K)
    • absolute temperature: T=298 K
    • absolute pressure: P=101,325 Pa
  2. Formula: V=nRTP
  3. Substitute: n=0.5 mol,R=8.314 J/(mol·K),T=298 K,P=101,325 Pa
  4. Answer: V=0.01223 m3

Multiply cubic meters by 1,000 to get liters; this balloon holds a little over 12 liters of gas.

Volume of one mole of an ideal gas at 101,325 Pa
Temperature (°C)Temperature (K)Molar volume (L)Molar volume (m³)
−40233.1519.130.01913
0273.1522.410.02241
20293.1524.060.02406
37310.1525.450.02545
100373.1530.620.03062
300573.1547.030.04703
Source: Computed with V = nRT/P, n = 1 mol, R = 8.314 462 618 J/(mol·K) and P = 101,325 Pa (NIST CODATA 2022) · Retrieved October 2026

How Does It Combine Boyle's, Charles's and Avogadro's Laws?

Before the ideal gas law, scientists found several simpler rules by holding two quantities fixed and varying the others. Each one drops straight out of PV=nRT when you freeze the right variables, as the second table shows.

  • Boyle's law: at fixed n and T, pressure and volume are inversely proportional.
  • Charles's law: at fixed n and P, volume is proportional to absolute temperature.
  • Gay-Lussac's law: at fixed n and V, pressure is proportional to absolute temperature.
  • Avogadro's law: at fixed P and T, volume is proportional to the number of moles.

When only the amount of gas is fixed, the same idea gives the combined gas law, P1V1/T1=P2V2/T2. Our gas laws overview shows how the whole family fits together.

The diagram shows a piston resting on a trapped gas. The gas pushes up hard enough to balance both the air above and the piston's weight, so the trapped gas sits at a pressure a little above the outside air.

The classic gas laws as special cases of PV = nRT
LawHeld constantRelationExample
Boyle's lawn and TP₁V₁ = P₂V₂Pushing a syringe plunger raises the pressure inside
Charles's lawn and PV₁/T₁ = V₂/T₂A balloon shrinks when taken outside on a cold day
Gay-Lussac's lawn and VP₁/T₁ = P₂/T₂Tire pressure rises after a long drive
Avogadro's lawP and TV₁/n₁ = V₂/n₂Blowing more air into a balloon makes it bigger
Combined gas lawnP₁V₁/T₁ = P₂V₂/T₂A weather balloon rising into colder, thinner air
Source: Derived from PV = nRT; statements from our laws dataset · Retrieved October 2026
Free-body diagram of a 5 kg piston on trapped gas, gas force 454.33 N up balancing 405.3 N of air pressure and 49.03 N weight
The trapped gas must reach about 113,600 Pa, slightly above the outside air, to hold the piston still (computed).

What Is the Molecular Form PV = NkT?

Physicists often count molecules instead of moles. Replacing n with the number of molecules N, and R with the Boltzmann constant kB, gives PV=NkBT. The two forms agree because R=NAkB, where NA is Avogadro's number, the count of particles in one mole.

This version links the law directly to individual molecules, and it is the starting point of the kinetic theory of gases. That theory shows that PV=NkBT follows from treating a gas as particles bouncing off walls, and that temperature measures their average kinetic energy.

Example 3 Counting the molecules in a cubic meter of air

A room holds air at 101,325 Pa and 293 K. Using the molecular form PV = NkBT with kB = 1.380649 × 10⁻²³ J/K, how many gas molecules are in 1 m³ of it?

  1. Given:
    • absolute pressure: P=101,325 Pa
    • volume: V=1 m3
    • Boltzmann constant: kB=1.381×10−23 J/K
    • absolute temperature: T=293 K
  2. Formula: N=PVkBT
  3. Substitute: P=101,325 Pa,V=1 m3,kB=1.381×10−23 J/K,T=293 K
  4. Answer: N=2.505×1025

The count does not depend on which gas fills the room, a direct consequence of the ideal gas law.

Where Do You See the Ideal Gas Law in Everyday Life?

Car tires are a classic case. Their volume barely changes, so pressure follows temperature. A tire set to 220 kPa on the gauge on a 10 °C morning reads about 231 kPa after warming to 20 °C (computed, using absolute pressure). That is why drivers are told to check pressure when the tires are cold.

Hot air balloons use the law the other way around. Heating the air inside at constant pressure makes it expand, so fewer molecules fill the envelope and the inside air becomes lighter than the cooler air around it. The diagram below shows the forces on a balloon floating in balance.

Other examples include a sealed bag of chips puffing up on a mountain road as outside pressure drops, bread dough rising as yeast adds gas, and weather balloons that grow several times wider as they climb into thin air before they burst.

Free-body diagram of a floating hot air balloon, 33,643 N buoyant force balancing the weight of hot air and of the balloon and load
With air densities from the ideal gas law, a 2,800 m³ balloon heated to 100 °C can float a load of about 780 kg (computed).
Hand attaching an air connector to a car tire valve on a cool morning, when tire pressure checks follow the ideal gas law
Tire pressure rises as the air inside warms, so pressure is checked when the tires are cold.

Who Discovered the Ideal Gas Law?

The law grew out of nearly two centuries of experiments. Robert Boyle published the pressure and volume relation in 1662. Jacques Charles worked out the volume and temperature relation around 1787, and Gay-Lussac published it in 1802. Amedeo Avogadro proposed in 1811 that equal volumes of gas at the same conditions hold equal numbers of molecules.

In 1834 the French engineer Émile Clapeyron combined these results into a single equation, the form we now write as PV = nRT. Later, August Krönig in 1856 and Rudolf Clausius in 1857 derived it from a model of moving molecules, turning an experimental rule into a consequence of mechanics.

Going Deeper: When Does the Ideal Gas Law Fail?

The model assumes that molecules take up no space and do not attract each other. Both assumptions break down when a gas is squeezed hard or cooled close to its condensation point. At high pressure the molecules' own volume becomes a noticeable share of the container, and the gas is harder to compress than the law predicts.

Near condensation, attractions between molecules pull them slightly toward each other and away from the walls, so the measured pressure falls below the ideal value. Eventually the gas turns into a liquid, something the ideal gas law cannot describe at all. More detailed equations, such as the van der Waals equation, add correction terms for molecular size and attraction.

For air, nitrogen, oxygen and the noble gases near room temperature and at pressures up to a few atmospheres, the errors are usually below one percent. Steam near boiling, carbon dioxide under pressure and refrigerant gases call for more care.

Practice Ideal Gas Law Problems

Work through a few problems of your own using different units for pressure and volume, then check each answer with the ideal gas law calculator. When you are ready, try the quiz below to test the key ideas.

Common Misconceptions

Myth: You can plug degrees Celsius into PV = nRT.

Physics: Temperature must be absolute. Using 20 instead of 293 K gives an answer that is wrong by a factor of about 15.

Myth: The pressure on a tire gauge is the P in the ideal gas law.

Physics: A gauge reads pressure above the atmosphere. Add about 101 kPa to get the absolute pressure the law needs.

Myth: Heavier gases take up more space than light ones under the same conditions.

Physics: At the same pressure and temperature, equal numbers of molecules fill equal volumes, whatever the gas. Molar mass affects density, not volume per mole.

Myth: The ideal gas law is exact for every gas.

Physics: It is a model. Real gases deviate at high pressure and near condensation, where molecular size and attraction matter.

Key Facts

  • The ideal gas law is PV = nRT, linking pressure, volume, amount of gas and absolute temperature.
  • In SI units the gas constant is exactly R = 8.314 462 618... J/(mol·K).
  • Temperature must be in kelvins and pressure must be absolute, not gauge pressure.
  • Boyle's, Charles's, Gay-Lussac's and Avogadro's laws are all special cases of the ideal gas law.
  • The molecular form PV = NkBT counts molecules instead of moles, and R = NAkB.
  • One mole of an ideal gas at 0 °C and 101,325 Pa fills about 22.4 liters.
  • The law works best at low pressure and high temperature and fails near condensation.
Did you know? At room temperature and normal pressure, a single cubic centimeter of air holds about 25 billion billion molecules, and that count would be the same for helium, carbon dioxide or any other gas under the same conditions.

Quick Quiz: How Well Do You Know Ideal Gas Law (PV = nRT)?

6 questions. Tap an answer to check it.

  1. In PV = nRT, what unit must temperature be in?

  2. A fixed amount of gas is kept at constant temperature while its volume is halved. What happens to the pressure?

  3. What is the value of R in SI units?

  4. Under which conditions does a real gas behave most like an ideal gas?

  5. A sealed rigid container of gas is heated from 300 K to 600 K. What happens to its pressure?

  6. Who first combined the gas laws into the single equation PV = nRT?

Frequently Asked Questions

What is the ideal gas law in simple terms?

The ideal gas law says that for any gas, pressure times volume equals the amount of gas times a constant times the absolute temperature: PV = nRT. In plain words, a gas pushes harder when you add more of it, heat it, or squeeze it into less space. The equation lets you predict how one of those changes affects the others.

What is R in PV = nRT?

R is the ideal gas constant, also called the molar gas constant. In SI units it is exactly 8.314 462 618... J/(mol·K). With liters and atmospheres it becomes about 0.08206 L·atm/(mol·K). R equals Avogadro's number times the Boltzmann constant, so it is really the Boltzmann constant scaled up from one molecule to one mole.

What units do you use in the ideal gas law?

With R = 8.314 J/(mol·K), use pascals for pressure, cubic meters for volume, moles for amount and kelvins for temperature. If you prefer liters and atmospheres, switch to R = 0.08206 L·atm/(mol·K). The key is consistency: the units of R must match the units of every other quantity, and temperature must always be in kelvins.

Why must temperature be in kelvin for gas laws?

Gas pressure and volume are proportional to absolute temperature, which starts at absolute zero. The Celsius and Fahrenheit scales have their zeros at arbitrary points, so doubling a Celsius reading does not double the molecular energy. Only the kelvin scale makes the proportionality work. Using Celsius can even give negative volumes, which is a clear sign of the mistake.

What makes a gas ideal?

An ideal gas is a model in which molecules are treated as points with no volume that never attract or repel each other except during brief, perfectly elastic collisions. No real gas is exactly ideal, but most gases come close when they are at low pressure and far above the temperature where they would condense into a liquid.

When does the ideal gas law not work?

It loses accuracy at high pressures, where molecules are crowded and their own volume matters, and at low temperatures near condensation, where attractions between molecules become important. Gases with strong attractions, such as water vapor or ammonia, deviate sooner than helium or nitrogen. In those cases, equations with correction terms, such as the van der Waals equation, work better.

How is the ideal gas law related to Boyle's and Charles's laws?

Both are special cases. Hold the amount of gas and the temperature fixed and PV = nRT reduces to PV = constant, which is Boyle's law. Hold the amount and pressure fixed and it reduces to V/T = constant, which is Charles's law. The ideal gas law packs these and Avogadro's and Gay-Lussac's laws into one equation.

What is the difference between PV = nRT and PV = NkT?

They are the same law written for different counts. PV = nRT uses moles and the gas constant R, which suits chemistry and engineering. PV = NkBT uses the actual number of molecules and the Boltzmann constant, which suits molecular physics. Since one mole contains Avogadro's number of molecules, R equals Avogadro's number times kB.

Sources

Constants come from NIST CODATA 2022 (public domain) and unit definitions from the BIPM SI Brochure (CC BY 4.0). Text, diagrams and illustrations are original work by Physics Tribune.

Physics Tribune Editorial Team
Written by our editors and checked against NIST and BIPM reference data. Every worked example is recomputed in code. Read our editorial policy. Last updated October 2026.