AP · Chemistry · Gases

The Ideal Gas Law

15 min readUpdated November 30, 2026FreeAP Chemistry, Intermolecular Forces and Properties

The ideal gas law, PV=nRTPV = nRT, links the pressure, volume, amount and kelvin temperature of a gas, so any one of them follows from the other three. Use the temperature in kelvins and a value of RR whose units match your pressure and volume. Rearranged, the same law predicts how a fixed sample responds to change and gives a gas's molar mass and density.

Quick check

  1. Convert 25 °C to kelvins.Show answerHide answer

    298 K. Add 273 to the Celsius temperature: 25+273=29825 + 273 = 298.

  2. How many moles are in 8.0 g of oxygen gas, O₂ (molar mass 32.00 g/mol)?Show answerHide answer

    0.25 mol, because n=mM=8.032.00=0.25n = \dfrac{m}{M} = \dfrac{8.0}{32.00} = 0.25.

  3. A gas in a sealed, rigid container is heated from 200 K to 400 K. What happens to its pressure?Show answerHide answer

    It doubles. With the amount and volume fixed, pressure is proportional to the kelvin temperature.

Know these already? Jump to the practice questions

What you'll be able to do

  • Calculate P, V, n or T with PV=nRTPV = nRT, using the value of R that matches the units.
  • Calculate the new pressure, volume or temperature when a fixed amount of gas changes conditions.
  • Calculate the molar mass or density of a gas from measured data.
  • Interpret graphs of pressure, volume and temperature for a fixed amount of gas.

Key terms

Ideal gas

A model gas whose particles take up no volume and do not attract each other, so it obeys PV=nRTPV = nRT exactly. Real gases come close at low pressure and high temperature.

In plain English
The perfectly behaved gas the equation describes.
Don't write
"An ideal gas is any gas at room temperature."

Absolute temperature

Temperature measured in kelvins from absolute zero, 0 K (about −273 °C), the lowest possible temperature.

In plain English
The temperature scale that starts at the true zero.
Don't write
"Doubling the Celsius temperature doubles the volume."

How do you use PV = nRT?

PV=nRTPV = nRT

On the AP® Chemistry equations sheet. P is pressure, V volume, n moles, T temperature in kelvins and R the gas constant. Pick the value of R whose units match your data:

Pressure unitVolume unitValue of R
atmL0.08206 L·atm/(mol·K)
torrL62.36 L·torr/(mol·K)
kPaL8.314 L·kPa/(mol·K)

All three values are on the sheet; 8.314 appears as J/(mol·K), and 1 J = 1 L·kPa. Convert temperatures with K = °C + 273 (on the sheet). If the units still don't match, convert: 1 atm = 760 torr = 101.3 kPa and 1 L = 1000 mL (learn this).

Key idea

Use kelvins, and an R that matches the pressure and volume units; most gas-law slips break one of these.

Check yourself

A volume is given as 250 mL and you are using R = 0.08206 L·atm/(mol·K). What value of V do you substitute?
Show answerHide answer

0.250 L. R contains liters, so the volume must be in liters.

How do P, V and T change for a fixed sample?

For a fixed amount of gas, nR is constant, so PVT\dfrac{PV}{T} stays the same:

P1V1T1=P2V2T2\frac{P_1V_1}{T_1} = \frac{P_2V_2}{T_2}

Learn this: it follows from PV=nRTPV = nRT with n fixed. Hold one more quantity constant and you get the simple relationships:

Held constantRelationshipExample
n and TP∝1VP \propto \dfrac{1}{V}halve the volume, double the pressure
n and PV∝TV \propto T (kelvins)double the kelvin temperature, double the volume
n and VP∝TP \propto T (kelvins)double the kelvin temperature, double the pressure
P and TV∝nV \propto ndouble the moles, double the volume

The note on Kinetic Molecular Theory explains each relationship at the particle level.

Check yourself

A gas at constant pressure is heated from 10 °C to 20 °C. Does its volume double?
Show answerHide answer

No. The kelvin temperature rises only from 283 K to 293 K, a factor of about 1.04, so the volume grows by about 4 per cent.

How do you find a gas's molar mass and density?

Substitute n=mMn = \dfrac{m}{M} (on the sheet) into PV=nRTPV = nRT and rearrange:

M=mRTPVM=DRTPD=PMRTM = \frac{mRT}{PV} \qquad M = \frac{DRT}{P} \qquad D = \frac{PM}{RT}

Learn these rearrangements; the second and third use density, D=mVD = \dfrac{m}{V} (on the sheet).

The density form gives a chain you can reason with. At the same temperature and pressure, equal volumes hold equal numbers of moles, so a gas with a larger molar mass packs more grams into each liter, so it is denser. Heating a gas at constant pressure does the opposite: the same mass spreads into a larger volume, so its density falls.

Check yourself

A gas is heated at constant pressure. Does its density increase, decrease or stay the same?
Show answerHide answer

It decreases. The volume grows while the mass stays the same, so the mass per liter falls.

How do you read gas-law graphs?

Graph, fixed amount of gasShapeWhat it shows
P against V, constant Tcurve falling toward both axesPV is constant
P against 1/V, constant Tstraight line through the originP∝1VP \propto \dfrac{1}{V}
V against T in kelvins, constant Pstraight line through the originV∝TV \propto T
V against T in °C, constant Pstraight line reaching V = 0 at −273 °Cabsolute zero is −273 °C
P against T in kelvins, constant Vstraight line through the originP∝TP \propto T

To read a slope, compare the line with PV=nRTPV = nRT. For V against T at constant pressure, V=(nRP)TV = \left(\dfrac{nR}{P}\right)T, so the slope is nRP\dfrac{nR}{P}: more gas gives a steeper line, and a higher pressure a shallower one.

Examiner's eye

Marks are lost for calling V proportional to T from a straight line on a Celsius axis: proportional means a line through the origin, which needs kelvins.

Check yourself

One gas sample gives two lines of V against T (kelvins), one at 1 atm and one at 2 atm. Which line is steeper?
Show answerHide answer

The 1 atm line. The slope is nRP\dfrac{nR}{P}, so the smaller pressure gives the larger slope.

Worked example 1: Pressure from PV = nRT

Question: A rigid 2.50 L flask holds 0.150 mol of nitrogen gas, N₂, at 27 °C. Calculate the pressure in the flask, in atm, to 3 significant figures. Use R = 0.08206 L·atm/(mol·K).

What tells you the method

One state of a gas with three of P, V, n and T known: use PV=nRTPV = nRT directly.

  1. Step 1: Convert the temperature.

    T=27+273=300T = 27 + 273 = 300 K.

    Why

    The gas law works only with absolute temperature.

  2. Step 2: Rearrange for P.

    P=nRTVP = \dfrac{nRT}{V}.

    Why

    P is the unknown, so divide both sides by V.

  3. Step 3: Substitute.

    P=(0.150)(0.08206)(300)2.50=1.477P = \dfrac{(0.150)(0.08206)(300)}{2.50} = 1.477 atm.

    Why

    R in L·atm/(mol·K) with V in liters gives P in atm.

Check it

Units: mol × L·atm/(mol·K) × K ÷ L leaves atm. Size: 0.150 mol in 2.50 L is 0.0600 mol/L, about 1.5 times the 0.0406 mol/L of a gas at 1 atm and 300 K, so about 1.5 atm fits.

Answer

1.481.48 atm.

Worked example 2: A balloon changes conditions

Question: A weather balloon holds 3.00 L of helium at 25 °C and 1.00 atm. It rises until the pressure is 0.500 atm and the temperature is −23 °C. No helium escapes and the balloon stretches freely. Calculate the new volume, in liters, to 3 significant figures.

What tells you the method

A fixed amount of gas moving between two states: use P1V1T1=P2V2T2\dfrac{P_1V_1}{T_1} = \dfrac{P_2V_2}{T_2}.

  1. Step 1: Convert the temperatures.

    T1=25+273=298T_1 = 25 + 273 = 298 K and T2=−23+273=250T_2 = -23 + 273 = 250 K.

    Why

    The ratios must use absolute temperatures.

  2. Step 2: Rearrange for V2V_2.

    V2=V1×P1P2×T2T1V_2 = V_1 \times \dfrac{P_1}{P_2} \times \dfrac{T_2}{T_1}.

    Why

    Each ratio applies one change: the pressure change, then the temperature change.

  3. Step 3: Substitute.

    V2=3.00×1.000.500×250298=5.03V_2 = 3.00 \times \dfrac{1.00}{0.500} \times \dfrac{250}{298} = 5.03 L.

    Why

    The pressure units cancel in the ratio, and so do the kelvins.

Check it

Halving the pressure alone would double the volume to 6.00 L; cooling from 298 K to 250 K shrinks it by about 16 per cent, so a little over 5 L fits.

Answer

5.035.03 L.

Worked example 3: Molar mass from a class investigation

Question: In a class investigation, an evacuated 0.500 L flask was filled with an unknown noble gas at 22 °C and 745 torr.

MeasurementMass (g)
Evacuated flask112.450
Flask filled with gas114.147

(a) Calculate the molar mass of the gas, in g/mol, to 3 significant figures. Use R = 62.36 L·torr/(mol·K). (b) Identify the gas, using these molar masses: neon 20.18, argon 39.95, krypton 83.80, xenon 131.29 g/mol.

What tells you the method

Mass, volume, temperature and pressure of one gas sample: find moles from PV=nRTPV = nRT, then M=mnM = \dfrac{m}{n}.

  1. Step 1: Find the mass of gas.

    114.147−112.450=1.697114.147 - 112.450 = 1.697 g.

    Why

    The flask was evacuated, so the gain in mass is the gas alone.

  2. Step 2: Find the moles.

    T=22+273=295T = 22 + 273 = 295 K, so n=PVRT=(745)(0.500)(62.36)(295)=0.02025n = \dfrac{PV}{RT} = \dfrac{(745)(0.500)}{(62.36)(295)} = 0.02025 mol.

    Why

    R in L·torr/(mol·K) matches the pressure in torr, so no conversion is needed.

  3. Step 3: Divide mass by moles.

    M=1.6970.02025=83.8M = \dfrac{1.697}{0.02025} = 83.8 g/mol.

    Why

    Molar mass is grams per mole.

  4. Step 4: Match the value.

    83.8 g/mol matches krypton, 83.80 g/mol.

    Why

    The other noble gases are far from 83.8 g/mol, so the match is clear.

Check it

For krypton under these conditions, D=PMRT=(745)(83.80)(62.36)(295)=3.39D = \dfrac{PM}{RT} = \dfrac{(745)(83.80)}{(62.36)(295)} = 3.39 g/L, and the measured density is 1.697÷0.500=3.391.697 \div 0.500 = 3.39 g/L.

Answer

(a) 83.883.8 g/mol; (b) krypton.

Your turn

Question: Calculate the density of carbon dioxide gas, CO₂ (molar mass 44.01 g/mol), at 1.00 atm and 0 °C, in g/L, to 3 significant figures. Use R = 0.08206 L·atm/(mol·K).

  1. Step 1: Choose the density form.

    D=PMRTD = \dfrac{PM}{RT}, from PV=nRTPV = nRT with n=mMn = \dfrac{m}{M}.

  2. Step 2: Convert the temperature.

    T=0+273=273T = 0 + 273 = 273 K.

  3. Step 3: Your go: substitute and calculate D.

Show the full solutionHide the solution

Step 3. D=(1.00)(44.01)(0.08206)(273)=1.96D = \dfrac{(1.00)(44.01)}{(0.08206)(273)} = 1.96 g/L. The units are atm × g/mol ÷ (L·atm/(mol·K) × K), which leaves g/L.

Answer: 1.961.96 g/L.

Traps

Trap

Celsius temperatures work in gas-law ratios as long as both are in Celsius.

It seems right because the units match. But pressure and volume are proportional to absolute temperature, so the ratio must use kelvins: from 10 °C to 20 °C the temperature rises from 283 K to 293 K, a 4 per cent increase, not a doubling.

A gas is heated at constant pressure from 50 °C to 100 °C. By what factor does its volume change?

By 373323=1.15\dfrac{373}{323} = 1.15, not by 2. Convert both temperatures to kelvins before taking the ratio.

Trap

Any value of R gives the right answer if you calculate carefully.

It seems right because R is a constant. But its number depends on its units: with P in atm and V in liters you need 0.08206, and using 8.314 there makes the answer about 101 times too large.

With the pressure in kPa and the volume in liters, which value of R do you use?

8.314 L·kPa/(mol·K), the same number as 8.314 J/(mol·K).

What's examined

On the AP® Chemistry exam, the ideal gas law belongs to Unit 3 (Intermolecular Forces and Properties) and appears in both multiple-choice and free-response questions. Expect calculations with PV=nRTPV = nRT, changes to a fixed sample, molar mass or density from experimental data, and graphs of pressure, volume and temperature to interpret. Show the equation, the values substituted with units, and an answer with sensible significant figures.

Practice questions

  1. Recall A calculation gives pressure in torr and volume in liters. Which value of R should you use?
  • A) 0.08206 L·atm/(mol·K)
  • B) 62.36 L·torr/(mol·K)
  • C) 8.314 J/(mol·K)
  • D) 22.4 L/mol
Show answer

Answer: B. Its units contain torr and liters, matching the data.

Why the others are wrong:

  • A needs the pressure in atm.
  • C matches kPa with liters, or SI units, not torr.
  • D is the molar volume of an ideal gas at 0 °C and 1 atm, not a gas constant.
  1. Apply At the same temperature and pressure, which gas has the greatest density?
  • A) Helium, He (4.00 g/mol)
  • B) Methane, CH₄ (16.04 g/mol)
  • C) Carbon dioxide, CO₂ (44.01 g/mol)
  • D) Nitrogen, N₂ (28.02 g/mol)
Show answer

Answer: C. At the same T and P, equal volumes hold equal moles, so density is proportional to molar mass, and CO₂ has the largest.

Why the others are wrong:

  • A has the smallest molar mass, so it is the least dense; small particles do not pack more closely in a gas.
  • B has the most atoms per molecule, but density depends on molar mass, not atom count.
  • D has a molar mass of 28.02 g/mol, below that of CO₂.
  1. Apply For a fixed amount of gas, which graph is a straight line through the origin?
  • A) Pressure against temperature in kelvins, at constant volume
  • B) Pressure against volume, at constant temperature
  • C) Volume against temperature in °C, at constant pressure
  • D) Volume against pressure, at constant temperature
Show answer

Answer: A. With n and V fixed, P=(nRV)TP = \left(\dfrac{nR}{V}\right)T, a direct proportion.

Why the others are wrong:

  • B is a curve, because P is inversely proportional to V.
  • C is a straight line, but it reaches V = 0 at −273 °C, not at the origin.
  • D is a curve for the same reason as B.
  1. Apply A gas sample occupies 450 mL at 1.20 atm and 300 K. Calculate its volume, in mL, at 0.900 atm and 360 K, to 3 significant figures.
Show answer

Answer: 720720 mL.

Marking points:

  • V2=V1×P1P2×T2T1V_2 = V_1 \times \dfrac{P_1}{P_2} \times \dfrac{T_2}{T_1}.
  • V2=450×1.200.900×360300=720V_2 = 450 \times \dfrac{1.20}{0.900} \times \dfrac{360}{300} = 720 mL: both the lower pressure and the higher temperature increase the volume.
  1. Exam-style In a class investigation, the volume of a trapped air sample was measured at constant pressure.
Temperature (°C)Volume (mL)
20.029.3
60.033.3
100.037.3

The points lie on a straight line. Extend the line to find the temperature, in °C, at which the volume would be zero. Give your answer to the nearest whole degree.

Show answer

Answer: −273-273 °C.

Marking points:

  • Slope: 37.3−29.3100.0−20.0=0.100\dfrac{37.3 - 29.3}{100.0 - 20.0} = 0.100 mL per °C.
  • From 20.0 °C, the volume falls to zero after 29.30.100=293\dfrac{29.3}{0.100} = 293 °C more cooling, so 20−293=−27320 - 293 = -273 °C.
  • This is absolute zero, 0 K, which is why gas-law calculations use kelvins.
  1. Exam-style A rigid 1.00 L steel tank holds 4.40 g of carbon dioxide, CO₂ (molar mass 44.01 g/mol), at 27 °C. Use R = 0.08206 L·atm/(mol·K). (a) Calculate the pressure in the tank, in atm, to 3 significant figures. (b) The tank is heated to 127 °C. Calculate the new pressure, in atm, to 3 significant figures.
Show answer

Answer: (a) 2.462.46 atm; (b) 3.283.28 atm.

Marking points:

  • n=4.4044.01=0.09998n = \dfrac{4.40}{44.01} = 0.09998 mol and T=300T = 300 K.
  • P=(0.09998)(0.08206)(300)1.00=2.46P = \dfrac{(0.09998)(0.08206)(300)}{1.00} = 2.46 atm.
  • The tank is rigid, so P∝TP \propto T: P2=2.461×400300=3.28P_2 = 2.461 \times \dfrac{400}{300} = 3.28 atm.
  1. Apply A fixed amount of gas is kept at constant pressure. Which change doubles its volume?
  • A) Heating it from 20 °C to 40 °C
  • B) Heating it from 100 K to 400 K
  • C) Cooling it from 400 K to 200 K
  • D) Heating it from 200 K to 400 K
Show answer

Answer: D. Volume is proportional to kelvin temperature, and 400 K is twice 200 K.

Why the others are wrong:

  • A doubles the Celsius number only; in kelvins, 293 K to 313 K raises the volume by about 7 per cent.
  • B quadruples the kelvin temperature, so it quadruples the volume.
  • C halves the kelvin temperature, so it halves the volume.

Key points

Recall, then reveal

Say the main points from memory first, then check them.

Show key pointsHide key points
  • PV=nRTPV = nRT needs temperature in kelvins and an R whose units match the pressure and volume.
  • For a fixed sample, PVT\dfrac{PV}{T} is constant, so P, V and T changes can be found from ratios.
  • Molar mass is M=mRTPVM = \dfrac{mRT}{PV}; gas density rises with molar mass and falls as temperature rises at constant pressure.
  • Direct proportions with temperature show as straight lines through the origin only on a kelvin axis.

Keep learning

Explore AP Chemistry tutoring →

View the full Chemistry syllabus →

More in this unit

Intermolecular Forces and Properties

All Gases notes

Part of Novark's AP Chemistry notes