Ideal Gas Law: Formula, Units, and Worked Examples
The ideal gas law connects pressure, volume, amount of gas, and absolute temperature through \(PV=nRT\). It combines Boyle’s, Charles’s, and Avogadro’s relationships into one equation.
Most wrong answers come from unit choices, not difficult physics. Match the units of pressure and volume to the gas constant, convert Celsius to kelvin, and decide whether the problem gives moles \(n\) or particles \(N\).

If you want to check a value before working it by hand, use the ideal gas law calculator. It keeps the unit conversion beside the result, which is where most avoidable mistakes happen.
Free download: Ideal Gas Law: Formula, Units, and Worked Examples Study Notes (PDF)
The full note as a print-ready PDF: every section and worked example, the 10-question practice set with solutions, an answer key, and a 1-page revision sheet for last-minute revision.
What Is the Ideal Gas Law?
$$PV=nRT$$
Here \(P\) is absolute pressure, \(V\) volume, \(n\) amount in moles, \(R\) the molar gas constant, and \(T\) thermodynamic temperature in kelvin. The equation models particles as having negligible volume and no intermolecular forces except during elastic collisions.
| Quantity | Symbol | Common SI unit |
|---|---|---|
| Absolute pressure | \(P\) | pascal (Pa) |
| Volume | \(V\) | cubic metre (m³) |
| Amount of substance | \(n\) | mole (mol) |
| Absolute temperature | \(T\) | kelvin (K) |
| Molar gas constant | \(R\) | \(8.314462618\ldots\,\text{J mol}^{-1}\text{K}^{-1}\) |
Because \(1\,\text{Pa m}^3=1\,\text J\), SI units fit \(R\) directly. The OpenStax ideal-gas law guide also shows the common chemistry unit combinations.
Choosing the Right Gas Constant
The numerical value of \(R\) changes with the pressure and volume units. Do not memorize one value and force every problem to use it.
| Pressure-volume units | R value |
|---|---|
| Pa and m³ | \(8.314462618\,\text{Pa m}^3\text{mol}^{-1}\text K^{-1}\) |
| kPa and L | \(8.314462618\,\text{kPa L mol}^{-1}\text K^{-1}\) |
| L atm | \(0.082057366\,\text{L atm mol}^{-1}\text K^{-1}\) |
| L bar | \(0.083144626\,\text{L bar mol}^{-1}\text K^{-1}\) |
Notice that kPa·L and Pa·m³ have the same numerical energy conversion. This makes \(R=8.314\) convenient in both of those paired unit systems.
How To Solve Ideal Gas Law Problems
The method is a unit-and-state checklist. Keep every value tied to one equilibrium state unless the equation explicitly compares two states.
- Identify the unknown and write \(PV=nRT\).
- Convert Celsius to kelvin with \(T_{\mathrm K}=T_{^\circ\mathrm C}+273.15\).
- Use absolute pressure, not gauge pressure, unless the question explicitly defines otherwise.
- Choose one consistent set of units and the matching value of \(R\).
- Rearrange symbolically, substitute numbers, and check the physical direction of change.
Worked Example: Find the Pressure
Two moles of an ideal gas occupy \(0.050\,\text{m}^3\) at 300 K. Using SI units
$$P=\frac{nRT}{V}=\frac{(2.00)(8.31446)(300)}{0.050}=9.98\times10^4\,\text{Pa}$$
The pressure is about 99.8 kPa, close to ordinary atmospheric pressure. That scale check makes the answer plausible.
Worked Example: Find the Number of Moles
A \(10.0\,\text L\) cylinder contains gas at \(2.00\,\text{atm}\) and 298 K. Using \(R=0.082057\,\text{L atm mol}^{-1}\text K^{-1}\)
$$n=\frac{PV}{RT}=\frac{(2.00)(10.0)}{(0.082057)(298)}\approx0.818\,\text{mol}$$
The Particle Form PV = NkBT
If \(N\) is the number of molecules rather than the number of moles, the ideal-gas equation becomes
$$PV=Nk_{\mathrm B}T$$
Since \(N=nN_{\mathrm A}\), the two forms agree when \(R=N_{\mathrm A}k_{\mathrm B}\). Use the Boltzmann constant when the calculation is per particle and \(R\) when it is per mole.

The laws of thermodynamics add energy, heat, work, and entropy to the state-variable picture. The ideal gas law is an equation of state, not a complete description of a thermodynamic process.
How the Combined Gas Laws Fit Inside
| Condition | Result from PV = nRT | Named relationship |
|---|---|---|
| n and T fixed | \(PV=\text{constant}\) | Boyle’s law |
| n and P fixed | \(V/T=\text{constant}\) | Charles’s law |
| n and V fixed | \(P/T=\text{constant}\) | Amontons’s law |
| P and T fixed | \(V/n=\text{constant}\) | Avogadro’s law |
For the same fixed sample moving between two equilibrium states, you can also write \(P_1V_1/T_1=P_2V_2/T_2\). This combined form cancels \(nR\), but it still requires absolute temperatures and absolute pressures.
Kinetic Meaning of Pressure and Temperature
In kinetic theory, gas pressure comes from molecular momentum transferred to container walls. For a monatomic ideal gas, the mean translational kinetic energy per particle is \(\frac32k_{\mathrm B}T\). Temperature sets the distribution’s energy scale, while pressure also depends on how many particles occupy a given volume.
$$P=\frac13\frac{N}{V}m\langle v^2\rangle$$
Combining this expression with \(PV=Nk_{\mathrm B}T\) gives \(\frac12m\langle v^2\rangle=\frac32k_{\mathrm B}T\). Different molecular masses therefore have different root-mean-square speeds at the same temperature.
Assumptions Behind an Ideal Gas
- Particles are much smaller than the average distance between them.
- Intermolecular potential energy is negligible except during collisions.
- Collisions between particles and walls are elastic.
- Particles move randomly and obey the statistical distribution appropriate to equilibrium.
- The gas is dilute enough that quantum statistics and molecular volume do not dominate.
Real gases approach ideal behaviour at low density and sufficiently high temperature. They deviate most near condensation, at high pressure, and when intermolecular attractions or molecular size matter.
Real Gases and the Compressibility Factor
A convenient deviation measure is the compressibility factor
$$Z=\frac{PV}{nRT}$$
An ideal gas has \(Z=1\). Values below one often indicate that attractions reduce pressure relative to the ideal prediction; values above one often indicate that excluded volume and repulsion dominate. The trend depends on temperature, pressure, and gas identity.
The OpenStax discussion of non-ideal gas behaviour explains how the van der Waals equation adds finite molecular size and attractions. It is an improvement, not a universal equation of state.
Common Mistakes
- Using Celsius: gas-law ratios require kelvin.
- Using gauge pressure: add atmospheric pressure when converting a gauge reading to absolute pressure.
- Mismatching R: litres and atmospheres require a different numerical value than pascals and cubic metres.
- Confusing moles and molecules: \(PV=nRT\) uses moles; \(PV=Nk_{\mathrm B}T\) uses particles.
- Assuming ideal behaviour everywhere: high pressure and low temperature can produce major deviations.
- Mixing equilibrium states: the equation relates state variables after the gas has a defined pressure and temperature.
Related Physics Guides
Use these next if you want to connect this result with the surrounding physics:
Key Takeaways
- The ideal gas law is \(PV=nRT\).
- Pressure and temperature must be absolute quantities.
- The gas constant must match your pressure-volume units.
- The particle form is \(PV=Nk_{\mathrm B}T\), with \(R=N_{\mathrm A}k_{\mathrm B}\).
- Real gases are closest to ideal at low density and away from condensation.
Practice Questions
Work each question before reading its solution. The set runs from direct recall and substitution to the applied questions that exams actually use to separate grades. All 10 also appear in the downloadable PDF with a separate answer key.
Question 1. State the ideal gas law and identify each variable with its typical units.
Solution. \(PV = nRT\): pressure (atm or Pa), volume (L or m³), \(n\) = moles, \(R\) = gas constant (0.0821 L·atm/mol·K, or 8.314 J/mol·K), \(T\) = ABSOLUTE temperature in kelvin, never Celsius. Using Celsius directly is the single most common error in this entire topic.
Question 2. A 2.0 mol sample of gas occupies 15.0 L at 300 K. Find its pressure.
Solution. \(P = \dfrac{nRT}{V} = \dfrac{2.0 \times 0.0821 \times 300}{15.0} = \dfrac{49.26}{15.0} \approx 3.28\) atm.
Question 3. State Boyle’s law, and show how it emerges from the ideal gas law by holding \(n\) and \(T\) constant.
Solution. Boyle’s law: \(P_1V_1 = P_2V_2\) at constant temperature and amount. From \(PV=nRT\), if \(n\) and \(T\) are fixed, \(nRT\) is a constant, so \(PV\) = constant, exactly Boyle’s relationship. The historical gas laws (Boyle’s, Charles’s, Gay-Lussac’s) are all special cases of the 1 unified ideal gas law, discovered separately before the general equation was assembled.
Question 4. A gas at 2.0 atm and 4.0 L is compressed to 1.0 L at constant temperature. Find the new pressure using Boyle’s law.
Solution. \(P_1V_1 = P_2V_2\): \(2.0\times4.0 = P_2 \times 1.0\), so \(P_2 = 8.0\) atm. Compressing to a quarter of the volume quadruples the pressure, an inverse relationship exactly as Boyle’s law predicts.
Question 5. A balloon holds 3.0 L of gas at 20°C. If heated to 80°C at constant pressure, find the new volume using Charles’s law, remembering to convert to kelvin first.
Solution. Convert: \(20°C = 293\) K, \(80°C = 353\) K. Charles’s law: \(\dfrac{V_1}{T_1} = \dfrac{V_2}{T_2}\), so \(V_2 = 3.0 \times \dfrac{353}{293} \approx 3.61\) L. Forgetting the kelvin conversion here would give a badly wrong answer, since Celsius has an arbitrary zero point that has no physical meaning for gas volume proportionality.
Question 6. A rigid steel tank holds gas at 2.5 atm and 25°C. If left in sunlight and heated to 45°C, find the new pressure (constant volume: Gay-Lussac’s law).
Solution. \(\dfrac{P_1}{T_1} = \dfrac{P_2}{T_2}\), with \(T_1 = 298\) K, \(T_2 = 318\) K: \(P_2 = 2.5 \times \dfrac{318}{298} \approx 2.67\) atm. This is exactly why aerosol cans warn against leaving them in hot cars: rising temperature in a fixed volume drives pressure up proportionally, and past a threshold, the can ruptures.
Question 7. Find the molar mass of a gas if 2.50 g occupies 1.05 L at STP (0°C, 1 atm).
Solution. At STP, \(n = \dfrac{PV}{RT} = \dfrac{1 \times 1.05}{0.0821 \times 273} \approx 0.0469\) mol. Molar mass \(= \dfrac{\text{mass}}{n} = \dfrac{2.50}{0.0469} \approx 53.3\) g/mol. The ideal gas law is a direct route to molar mass, historically 1 of the earliest tools for identifying unknown gases before spectroscopy existed.
Question 8. Find the density of nitrogen gas (N\(_2\), M = 28 g/mol) at STP, and derive the general relationship between gas density and molar mass.
Solution. Rearranging \(PV=nRT\) with \(n = m/M\): \(PM = \dfrac{m}{V}RT = \rho RT\), so \(\rho = \dfrac{PM}{RT}\). At STP: \(\rho = \dfrac{1\times28}{0.0821\times273} \approx 1.25\) g/L. Gas density scales directly with molar mass at fixed conditions, which is exactly why helium (M=4) balloons float while carbon dioxide (M=44) sinks in air.
Question 9. State 2 of the key assumptions of the ideal gas model, and explain, using 1 of them, why real gases deviate from ideal behavior at high pressure.
Solution. Ideal gas particles are assumed to have (1) negligible volume compared to the container, and (2) no intermolecular attractive forces. At HIGH PRESSURE, gas molecules are forced close together, so their own finite volume becomes a non-negligible fraction of the total volume, violating assumption (1) and causing the real gas to occupy MORE volume than the ideal law predicts for the same P, n, T.
Question 10. Why do real gases also deviate from ideal behavior at LOW TEMPERATURE, and what physical process does extreme deviation eventually lead to?
Solution. At low temperature, molecules move slowly enough that intermolecular attractive forces (van der Waals forces), assumed negligible in the ideal model, become significant enough to noticeably pull molecules together, reducing the pressure below the ideal prediction. Taken to the extreme, this same attraction is precisely what causes gases to CONDENSE into liquids at sufficiently low temperature, a phase transition the ideal gas law, by its very assumptions, cannot describe or predict at all.
Frequently Asked Questions
What is the ideal gas law?
The ideal gas law is PV = nRT. It relates a gas’s absolute pressure P, volume V, amount n, and absolute temperature T through the molar gas constant R.
Which value of R should I use?
Use R = 8.314462618 J mol^-1 K^-1 for Pa and m³ or kPa and L. Use about 0.082057 L atm mol^-1 K^-1 for litres and atmospheres.
Why must temperature be in kelvin?
Gas-law relationships depend on absolute thermal energy. Celsius has an arbitrary zero, so using it in ratios or PV = nRT gives incorrect results.
Does the ideal gas law use gauge or absolute pressure?
It uses absolute pressure. If a gauge reads pressure above the atmosphere, add local atmospheric pressure before using the ideal gas law.
When does the ideal gas law fail?
Deviations grow at high density, low temperature, and near phase changes, where molecular volume and intermolecular forces are no longer negligible.
What is the difference between PV = nRT and PV = NkBT?
The first uses amount in moles and the molar gas constant R. The second uses the number of particles N and the Boltzmann constant kB. They are equivalent.
Before touching the calculator, write the units beside every variable. That one habit catches nearly every gas-law mistake.
Browse more in Chemistry.