Chemistry

The ideal gas law: PV = nRT

The ideal gas law, PV=nRTPV = nRT, connects a gas's pressure (P), volume (V), amount in moles (n) and temperature (T). R is the gas constant: 0.08206 L·atm/(mol·K) when pressure is in atmospheres, or 8.314 J/(mol·K). Temperature must be in kelvins. If you know three of P, V, n and T, you can solve for the fourth.

Updated

Key ideas

PV=nRTPV = nRT
  • PP is pressure, in atmospheres (atm) when you use R = 0.08206. 1 atm = 101.325 kPa = 760 mmHg.
  • VV is volume, in liters (L).
  • nn is the amount of gas, in moles (mol).
  • RR is the gas constant. Pick the value whose units match your pressure and volume (table below).
  • TT is the absolute temperature, in kelvins (K): T=∘C+273.15T = {}^{\circ}\text{C} + 273.15.
Pick R to match your units
Pressure unitVolume unitR
atmL0.08206 L·atm/(mol·K)
kPaL8.314 L·kPa/(mol·K)
mmHg (torr)L62.36 L·mmHg/(mol·K)
Pam³8.314 J/(mol·K)

When the same gas changes conditions and the amount stays fixed, nRnR cancels and you get the combined gas law. Boyle's law (constant T), Charles's law (constant P) and Gay-Lussac's law (constant V) are all special cases of it:

P1V1T1=P2V2T2\frac{P_1 V_1}{T_1} = \frac{P_2 V_2}{T_2}

At STP (0 °C = 273.15 K and 1 atm), 1 mol of an ideal gas takes up about 22.4 L. Some newer textbooks define STP as 1 bar instead, which gives 22.7 L, so check which one your class uses.

Worked examples

Example 1: solve for volume

Problem What volume does 2.00 mol of gas take up at 25.0 °C and 1.00 atm?

  1. Convert the temperature to kelvins.
    T=25.0+273.15=298.15 KT = 25.0 + 273.15 = 298.15\ \text{K}
  2. Solve PV=nRTPV = nRT for VV.
    V=nRTPV = \frac{nRT}{P}
  3. Plug in. Every unit except liters cancels.
    V=2.00 mol×0.08206 L⋅atmmol⋅K×298.15 K1.00 atm=48.93 LV = \frac{2.00\ \text{mol} \times 0.08206\ \tfrac{\text{L·atm}}{\text{mol·K}} \times 298.15\ \text{K}}{1.00\ \text{atm}} = 48.93\ \text{L}

Answer 48.9 L

Example 2: solve for pressure

Problem 0.500 mol of nitrogen is in a 10.0 L tank at 300. K. What is the pressure?

  1. Solve for PP.
    P=nRTVP = \frac{nRT}{V}
  2. Plug in.
    P=0.500 mol×0.08206 L⋅atmmol⋅K×300. K10.0 L=1.231 atmP = \frac{0.500\ \text{mol} \times 0.08206\ \tfrac{\text{L·atm}}{\text{mol·K}} \times 300.\ \text{K}}{10.0\ \text{L}} = 1.231\ \text{atm}

Answer 1.23 atm

Example 3: find the mass of a gas

Problem A 5.00 L tank holds carbon dioxide at 2.50 atm and 27.0 °C. How many grams of CO2\mathrm{CO_2} are inside?

  1. Temperature in kelvins.
    T=27.0+273.15=300.15 KT = 27.0 + 273.15 = 300.15\ \text{K}
  2. Solve for moles.
    n=PVRT=2.50 atm×5.00 L0.08206 L⋅atmmol⋅K×300.15 K=0.5075 moln = \frac{PV}{RT} = \frac{2.50\ \text{atm} \times 5.00\ \text{L}}{0.08206\ \tfrac{\text{L·atm}}{\text{mol·K}} \times 300.15\ \text{K}} = 0.5075\ \text{mol}
  3. Moles to grams with MCO2=12.01+2(16.00)=44.01M_{\mathrm{CO_2}} = 12.01 + 2(16.00) = 44.01 g/mol.
    0.5075 mol×44.01 g/mol=22.34 g0.5075\ \text{mol} \times 44.01\ \text{g/mol} = 22.34\ \text{g}

Answer 22.3 g of CO2\mathrm{CO_2}

Example 4: combined gas law

Problem A weather balloon holds 2.50 L of helium at 1.00 atm and 20.0 °C. It rises to where the pressure is 0.800 atm and the temperature is −10.0-10.0 °C. What is its new volume?

  1. Convert both temperatures.
    T1=20.0+273.15=293.15 KT2=−10.0+273.15=263.15 KT_1 = 20.0 + 273.15 = 293.15\ \text{K} \qquad T_2 = -10.0 + 273.15 = 263.15\ \text{K}
  2. Solve the combined gas law for V2V_2.
    V2=V1×P1P2×T2T1V_2 = V_1 \times \frac{P_1}{P_2} \times \frac{T_2}{T_1}
  3. Plug in.
    V2=2.50 L×1.00 atm0.800 atm×263.15 K293.15 K=2.805 LV_2 = 2.50\ \text{L} \times \frac{1.00\ \text{atm}}{0.800\ \text{atm}} \times \frac{263.15\ \text{K}}{293.15\ \text{K}} = 2.805\ \text{L}
  4. Sense check: lower pressure makes it bigger, colder air makes it a little smaller. Bigger overall makes sense.

Answer 2.81 L

Common mistakes and how to fix them

  • Using Celsius. At 0 °C the formula would give zero volume. Fix: always add 273.15 first.
  • Mismatched R. Using 0.08206 with a pressure in kPa makes the answer off by a factor of about 100. Fix: match R to your pressure unit, or convert pressure to atm.
  • Using mL. Fix: R = 0.08206 needs liters. Divide mL by 1000.
  • Using the combined gas law when the amount changes. If gas is added or leaks out, n changes. Fix: use PV=nRTPV = nRT for each state instead.

Practice problems

  1. Convert 37 °C (body temperature) to kelvins.

    1. 236 K
    2. 310 K
    3. 37 K
    4. 273 K
    Show answer

    Answer: 310 K

    37+273.15=310.1537 + 273.15 = 310.15, which is 310 K to the ones place.

  2. What volume does 1.00 mol of an ideal gas take up at 273.15 K and 1.00 atm?

    1. 1.00 L
    2. 8.31 L
    3. 22.4 L
    4. 24.5 L
    Show answer

    Answer: 22.4 L

    V=nRT/P=1.00×0.08206×273.15÷1.00=22.4V = nRT/P = 1.00 \times 0.08206 \times 273.15 \div 1.00 = 22.4 L. 24.5 L is the volume at 25 °C.

  3. 3.00 mol of gas is in a 25.0 L container at 350. K. What is the pressure in atm?

    Show answer

    Answer: 3.45 atm

    P=nRT/V=3.00×0.08206×350.÷25.0=3.447P = nRT/V = 3.00 \times 0.08206 \times 350. \div 25.0 = 3.447, so 3.45 atm.

  4. A gas takes up 4.00 L at 1.00 atm. At the same temperature, the pressure is raised to 2.00 atm. What is the new volume?

    1. 8.00 L
    2. 2.00 L
    3. 4.00 L
    4. 0.500 L
    Show answer

    Answer: 2.00 L

    With T fixed, P1V1=P2V2P_1V_1 = P_2V_2: V2=1.00×4.00÷2.00=2.00V_2 = 1.00 \times 4.00 \div 2.00 = 2.00 L. Double the pressure, half the volume.

  5. How many moles of gas are in a 6.00 L container at 2.00 atm and 300. K?

    Show answer

    Answer: 0.487 mol

    n=PV/RT=(2.00×6.00)÷(0.08206×300.)=12.0÷24.62=0.487n = PV/RT = (2.00 \times 6.00) \div (0.08206 \times 300.) = 12.0 \div 24.62 = 0.487 mol.

Frequently asked questions

Why does temperature have to be in kelvins?

The gas laws need a temperature scale that starts at zero energy. Kelvin does: 0 K is absolute zero. Celsius puts zero at water's freezing point, so doubling a Celsius number does not double the energy of the gas, and the math breaks.

What makes a gas ideal?

An ideal gas is a model: its particles take up no space and do not attract each other. Real gases act almost ideal at ordinary temperatures and pressures. They drift away from the model at very high pressures or very low temperatures, where particles are crowded or slow.

Which gas law should I use?

If the problem gives moles or grams, or asks for them, use PV=nRTPV = nRT. If one sample of gas changes from one set of conditions to another, use the combined gas law and cross out whatever stays constant.

How do I find molar mass with the ideal gas law?

Use PV=nRTPV = nRT to find moles from the measured pressure, volume and temperature. Then divide the mass of the gas sample by those moles. The result in g/mol tells you which gas it could be.

Sources

  1. OpenStax Chemistry 2e, 9.2 Relating Pressure, Volume, Amount, and Temperature: The Ideal Gas Law, accessed October 1, 2026
  2. NIST, molar gas constant R (CODATA), accessed October 1, 2026

Try asking Ducky

  • “Check my units on problem 5. Did I pick the right R for kilopascals?”
  • “Which gas law should I use for this question on my worksheet, and why?”
  • “Quiz me on Boyle's, Charles's and the combined gas law, one question at a time.”

Free to start. The web app works in any browser, Chromebooks included; the Mac app can also draw on your real screen.