The Ideal Gas Law Explained (PV = nRT): Formula, Examples, and Real-Life Uses

Every time you take a breath, inflate a bicycle tire, or watch a hot air balloon rise, you are witnessing the Ideal Gas Law in action.
In chemistry and physics, this elegant rule explains how gases behave under different conditions. It connects four basic properties of a gas—pressure, volume, temperature, and the amount of gas—into one simple mathematical equation.
Whether you are studying for a 10th-grade chemistry test or just want to understand how the universe works, here is everything you need to know about the Ideal Gas Law.
What is the Ideal Gas Law?
The Ideal Gas Law is a formula that allows you to calculate the behavior of a “perfect” gas. The equation is:
PV = nRT
Here is what each letter stands for:
- P = Pressure: How hard the gas is pushing on the walls of its container. (Common units: Atmospheres (atm) or Pascals (Pa)).
- V = Volume: The amount of space the gas takes up. (Common units: Liters (L) or cubic meters (m^3)).
- n = Number of moles: The amount of gas particles. (1 mole = 6.022 \times 10^{23} particles).
- R = The Universal Gas Constant: A fixed number that ties the whole equation together.
- T = Temperature: How hot or cold the gas is. This must always be in Kelvin (K).
The Secret to Getting the Math Right: The “R” Value
A huge gap where students get stuck is using the wrong version of $R$. The value of $R$ changes depending on the units you use for Pressure and Volume:
- If using Liters (L) and Atmospheres (atm): Use R = 0.0821 2. If using Cubic Meters (m^3) and Pascals (Pa): Use R = 8.314
Always match your units to your $R$ constant!
Where Does the Formula Come From? (The 4 Component Laws)
The Ideal Gas Law wasn’t discovered all at once. It is actually a “super-equation” made by combining four older laws discovered by different scientists over several centuries:
- Boyle’s Law (Pressure & Volume): If you squeeze a gas into a smaller space without changing the temperature, the pressure goes up. (Example: Pushing down on a sealed syringe).
- Charles’s Law (Volume & Temperature): If you heat a gas, it expands and takes up more space. (Example: A hot air balloon inflating).
- Gay-Lussac’s Law (Pressure & Temperature): If you heat a gas inside a rigid, unbendable container, the pressure builds up. (Example: A car tire getting tight and highly pressurized on a hot summer day).
- Avogadro’s Law (Volume & Amount): If you add more gas particles to a flexible container, the volume increases. (Example: Blowing more air into a balloon makes it bigger).
Combine them all, and you get PV = nRT..
Ideal Gas Law Simulator
Constant R = 0.0821 L·atm/(mol·K)
Crucial Rule: Always Convert to Kelvin!
If you try to plug Celsius into the Ideal Gas Law, your answer will be completely wrong. Why? Because the Celsius scale includes negative numbers and zero. If you multiply or divide by zero, the math breaks.
Kelvin is an "absolute" temperature scale. Zero Kelvin (0 K) means absolutely zero heat energy—particles stop moving entirely.
- How to convert: Simply add 273.15 to your Celsius temperature.
- Example: 20°C + 273.15 = 293.15 K.
Real Gases vs. Ideal Gases: When the Law Breaks Down
The equation is called the Ideal Gas Law because it assumes the gas is acting perfectly. In an ideal world, the math assumes two things:
- Gas particles take up exactly zero space (they are tiny points).
- Gas particles do not stick to each other (no magnetic attraction).
But in reality, gases aren't perfect. Real gas particles do take up a tiny bit of space, and they do attract each other slightly.
The PV = nRT equation works perfectly for almost all gases at room temperature and normal atmospheric pressure. However, the law stops working accurately under two extreme conditions:
- Extremely High Pressure: The particles are squished so closely together that their physical size actually matters.
- Extremely Low Temperature: The particles are moving so slowly that their slight sticky attraction to one another pulls them together, turning the gas into a liquid.
Standard Temperature and Pressure (STP)
In chemistry, scientists like to compare gases on an even playing field. They created a baseline called STP (Standard Temperature and Pressure).
- Standard Temperature = 0°C (273.15 K)
- Standard Pressure = 1 atm
- Fun Fact: At STP, exactly 1 mole of any ideal gas will take up exactly 22.4 Liters of volume.
Visualizing the Ideal Gas Law
To really understand how Pressure, Volume, Temperature, and Amount interact, it helps to see it in action. I've generated an interactive simulator below.
You can use the controls to pump more gas molecules into the chamber (n), heat the gas up (T), or shrink the container's volume (V). Watch how the pressure gauge (P) reacts based on PV = nRT!
Frequently Asked Questions
Get physics insights delivered weekly
Join students and educators receiving expert explanations, study tips, and platform updates every Thursday.
Join others. No spam.

allphysicsfundamentals
Making physics accessible, interactive, and genuinely understandable for students at every level.





