ChemistryIQChemistryIQ
Gas Laws12 min read

Ideal Gas Law Problems: PV = nRT Step-by-Step with Worked Examples

By ChemistryIQ Team · April 14, 2026

The Direct Answer: PV = nRT Relates the Four Main Properties of a Gas

The ideal gas law is PV = nRT, where:

- **P** = pressure of the gas - **V** = volume of the gas - **n** = moles of gas - **R** = ideal gas constant - **T** = temperature in Kelvin (ALWAYS Kelvin, never Celsius)

The equation describes the behavior of an 'ideal gas' — a theoretical gas where molecules have no volume and don't interact with each other. Real gases deviate from ideal behavior at high pressure and low temperature, but for most introductory chemistry problems, the ideal gas law works well enough to get correct answers.

**The value of R depends on the units**:

- R = 0.08206 L·atm/(mol·K) — use when pressure is in atmospheres and volume is in liters - R = 8.314 J/(mol·K) — use when working with energy units (J = Pa·m³) - R = 62.36 L·Torr/(mol·K) — use when pressure is in mmHg/Torr and volume is in liters - R = 8.314 L·kPa/(mol·K) — use when pressure is in kPa and volume is in liters

**The #1 mistake students make**: forgetting to convert temperature to Kelvin. Celsius to Kelvin: add 273.15 (or 273 for less precise problems). Fahrenheit to Kelvin: convert to Celsius first, then add 273.15. A problem with T in Celsius will give you wildly wrong answers.

**The standard approach for any ideal gas problem**:

1. Identify what's given and what's unknown 2. Convert all units to match your chosen R value 3. Convert temperature to Kelvin 4. Solve algebraically: P = nRT/V, V = nRT/P, n = PV/RT, T = PV/(nR) 5. Check units and sanity-check the answer

Snap a photo of any ideal gas law problem and ChemistryIQ identifies the given variables, selects the correct R value based on the units, converts temperature to Kelvin, and walks through each algebraic step to solve for the unknown.

This content is for educational purposes only.

Standard Ideal Gas Law Problems: Solving for P, V, n, or T

The most common ideal gas law problems give you three of the four variables and ask you to solve for the fourth. Here are worked examples for each case.

**Problem type 1: Solving for volume (V)**

Question: How many liters of hydrogen gas are produced at 1.00 atm and 25°C when 2.50 moles of hydrogen react?

Given: n = 2.50 mol, T = 25°C = 298.15 K, P = 1.00 atm

Solve for V: V = nRT/P

Use R = 0.08206 L·atm/(mol·K) because our pressure is in atm.

V = (2.50 mol)(0.08206 L·atm/mol·K)(298.15 K) / (1.00 atm) V = 61.15 L

Rounded to 3 significant figures: V = 61.2 L

**Problem type 2: Solving for pressure (P)**

Question: A 5.00-L container holds 1.25 mol of nitrogen gas at 35°C. What is the pressure in atm?

Given: V = 5.00 L, n = 1.25 mol, T = 35°C = 308.15 K

Solve for P: P = nRT/V

P = (1.25 mol)(0.08206 L·atm/mol·K)(308.15 K) / (5.00 L) P = 6.32 atm

**Problem type 3: Solving for moles (n)**

Question: A cylinder contains 50.0 L of neon gas at 2.50 atm and 20°C. How many moles of neon are in the cylinder?

Given: V = 50.0 L, P = 2.50 atm, T = 20°C = 293.15 K

Solve for n: n = PV/(RT)

n = (2.50 atm)(50.0 L) / [(0.08206 L·atm/mol·K)(293.15 K)] n = 125 / 24.06 n = 5.20 mol

**Problem type 4: Solving for temperature (T)**

Question: 4.00 moles of helium are held in a 25.0 L tank at 1.50 atm. What is the temperature in Kelvin?

Given: n = 4.00 mol, V = 25.0 L, P = 1.50 atm

Solve for T: T = PV/(nR)

T = (1.50 atm)(25.0 L) / [(4.00 mol)(0.08206 L·atm/mol·K)] T = 37.5 / 0.3282 T = 114.3 K

Note: this temperature is in Kelvin. If the problem asks for Celsius: T(°C) = 114.3 - 273.15 = -158.85°C.

**Pressure unit conversions you'll need**:

- 1 atm = 101,325 Pa = 101.325 kPa - 1 atm = 760 mmHg = 760 Torr - 1 atm = 14.696 psi (rarely used in chem problems) - 1 atm = 1.01325 bar

**Volume unit conversions**:

- 1 L = 1,000 mL = 1 dm³ - 1 L = 0.001 m³ - 1 m³ = 1,000 L

**The golden rule**: match your pressure and volume units to the R value. If the problem gives pressure in kPa, either convert to atm (divide by 101.325) and use R = 0.08206, OR use R = 8.314 L·kPa/(mol·K). Mixing units is how most errors happen.

ChemistryIQ automatically selects the appropriate R value based on the units in the problem and converts any units that don't match.

The Combined Gas Law and Two-State Problems

When a problem describes a gas changing from one state (initial conditions) to another state (final conditions), use the **combined gas law** rather than the ideal gas law.

**Combined gas law**:

(P₁V₁)/T₁ = (P₂V₂)/T₂

Where subscripts 1 and 2 refer to initial and final conditions. Temperature is still in Kelvin.

This equation applies when the amount of gas (n) stays constant. If n changes (some gas escapes or is added), you must use the full ideal gas law.

**When only two variables change**, the combined gas law simplifies to the classical gas laws:

- **Boyle's Law** (T constant): P₁V₁ = P₂V₂ — pressure and volume are inversely proportional at constant temperature - **Charles's Law** (P constant): V₁/T₁ = V₂/T₂ — volume and temperature are directly proportional at constant pressure - **Gay-Lussac's Law** (V constant): P₁/T₁ = P₂/T₂ — pressure and temperature are directly proportional at constant volume - **Avogadro's Law** (P and T constant): V₁/n₁ = V₂/n₂ — volume and moles are directly proportional

**Worked example — combined gas law**:

Question: A gas occupies 3.50 L at 25°C and 1.00 atm. What volume will it occupy at 45°C and 1.25 atm?

Given: V₁ = 3.50 L, T₁ = 25°C = 298.15 K, P₁ = 1.00 atm, V₂ = ?, T₂ = 45°C = 318.15 K, P₂ = 1.25 atm

Combined gas law: V₂ = V₁ × (P₁/P₂) × (T₂/T₁)

V₂ = 3.50 × (1.00/1.25) × (318.15/298.15) V₂ = 3.50 × 0.800 × 1.0671 V₂ = 2.99 L

**Intuition check**: pressure increased (1.00 → 1.25), so volume should decrease. Temperature increased (298 → 318), so volume should increase. The two effects partially cancel. Our answer of 2.99 L (decrease from 3.50) makes sense because the pressure change was larger than the temperature change in percentage terms.

**Worked example — Boyle's law (T constant)**:

Question: A balloon has volume 4.50 L at 2.00 atm. At what pressure would the volume be 6.00 L (temperature constant)?

P₁V₁ = P₂V₂ (2.00)(4.50) = P₂(6.00) 9.00 = 6.00 P₂ P₂ = 1.50 atm

**Worked example — Charles's law (P constant)**:

Question: A gas occupies 2.00 L at 20°C. What volume will it occupy at 150°C (pressure constant)?

V₁/T₁ = V₂/T₂ 2.00/293.15 = V₂/423.15 V₂ = 2.00 × (423.15/293.15) = 2.89 L

**Common mistake**: using Celsius in Charles's law or Gay-Lussac's law. Because these laws involve temperature ratios, ALWAYS convert to Kelvin first. Using Celsius gives you negative or zero temperatures that break the math.

ChemistryIQ identifies whether the problem is a two-state problem (use combined gas law) or a single-state problem (use ideal gas law) and walks through the correct equation with unit-converted values.

Ideal Gas Law Applications: Density, Molar Mass, and Stoichiometry

Beyond basic P, V, n, T problems, the ideal gas law appears in three common application areas that are regularly tested.

**Application 1: Gas density**

Gas density = mass / volume. We can derive a formula using the ideal gas law:

Start with: PV = nRT

Replace n with (mass / M) where M is the molar mass: PV = (mass/M)RT

Rearrange: mass/V = PM/(RT)

Since density = mass/V:

**d = PM/(RT)**

This tells you that gas density increases with pressure and molar mass, and decreases with temperature. It's useful for problems that ask about gas identification or about atmospheric gases at different altitudes.

**Worked example**: What is the density of nitrogen gas (N₂, M = 28.02 g/mol) at 1.00 atm and 25°C?

d = PM/(RT) = (1.00)(28.02) / [(0.08206)(298.15)] d = 28.02 / 24.47 d = 1.145 g/L

**Application 2: Finding molar mass from gas density**

You can invert the density formula to find molar mass if you know the gas's density at specific conditions:

**M = dRT/P**

This is a common exam question format: 'An unknown gas has a density of X g/L at Y °C and Z atm. What is its molar mass?'

**Worked example**: An unknown gas has a density of 1.25 g/L at 35°C and 0.95 atm. What is its molar mass?

M = dRT/P = (1.25)(0.08206)(308.15) / (0.95) M = 31.61 / 0.95 M = 33.3 g/mol

This is close to O₂ (32.00 g/mol) and H₂S (34.08 g/mol). Based on the molar mass alone, the gas is likely one of these — more context from the problem (what reaction produced it, what smell, etc.) would identify which.

**Application 3: Gas stoichiometry**

If a chemical reaction produces or consumes a gas, the ideal gas law connects the amount of gas (in moles) to the volume occupied.

**Worked example**: How many liters of CO₂ gas are produced at 1.00 atm and 25°C when 50.0 g of calcium carbonate decomposes?

Reaction: CaCO₃ → CaO + CO₂

Step 1: Find moles of CaCO₃. Molar mass of CaCO₃ = 40.08 + 12.01 + 3(16.00) = 100.09 g/mol Moles of CaCO₃ = 50.0 / 100.09 = 0.4996 mol

Step 2: Use stoichiometry. The reaction is 1:1, so moles of CO₂ = 0.4996 mol.

Step 3: Use the ideal gas law to find volume of CO₂. V = nRT/P = (0.4996)(0.08206)(298.15) / (1.00) V = 12.22 L

**Standard temperature and pressure (STP)**:

You may see problems referring to STP (Standard Temperature and Pressure). The IUPAC definition since 1982 is T = 273.15 K (0°C) and P = 100 kPa (1 bar). The older definition (still used in many US textbooks) is T = 273.15 K and P = 1 atm (101.325 kPa). Read the problem carefully to see which definition is being used.

At OLD STP (1 atm, 273.15 K), 1 mole of any ideal gas occupies 22.414 L. This is the 'molar volume at STP' and a commonly memorized shortcut for stoichiometry problems.

At NEW STP (1 bar, 273.15 K), 1 mole of gas occupies 22.711 L. Slightly different, but most textbooks still use the 22.4 L value.

For any problem requiring high precision, don't use the shortcut — use PV = nRT with actual conditions. The shortcut saves a calculation but introduces error when the actual conditions aren't standard.

**Dalton's Law of Partial Pressures** (bonus application):

When multiple gases are mixed, each gas exerts a partial pressure proportional to its mole fraction:

P_total = P₁ + P₂ + P₃ + ...

The partial pressure of gas i equals x_i × P_total, where x_i is the mole fraction of gas i.

This is heavily tested and appears in problems about gas collection over water — where you have to subtract the vapor pressure of water from total pressure to get the partial pressure of the collected gas.

ChemistryIQ identifies which application category a problem falls into (density, molar mass, stoichiometry, mixtures), sets up the appropriate equation, and walks through the calculation step by step with the correct unit conversions.

Study Chemistry with AI

Get step-by-step solutions, practice problems, and AI-powered explanations.

FAQs

Common questions about ideal gas law problems

No — R depends on the units. R = 0.08206 L·atm/(mol·K) is used when pressure is in atm and volume is in liters. If pressure is in kPa, use R = 8.314 L·kPa/(mol·K). If pressure is in mmHg or Torr, use R = 62.36 L·Torr/(mol·K). For energy problems (like thermodynamics), use R = 8.314 J/(mol·K). The simplest approach: convert all units to atm and liters, then use R = 0.08206.

The ideal gas law requires an absolute temperature scale — one where 0 represents the absolute absence of thermal energy. Kelvin is an absolute scale (0 K = -273.15°C = absolute zero). Celsius is not absolute because 0°C is just the freezing point of water, not the absence of thermal energy. Using Celsius in PV = nRT would give you negative or zero temperatures in conditions that aren't actually cold, breaking the math. Always convert to Kelvin: T(K) = T(°C) + 273.15.

Yes. Snap a photo of any ideal gas law problem and ChemistryIQ identifies the given variables, converts all units to match the appropriate R value, converts temperature to Kelvin, and walks through each algebraic step to solve for the unknown. It also handles the combined gas law, gas density, molar mass from density, and gas stoichiometry problems.

More Articles