Ideal Gas Law Calculator: PV = nRT Solved Step by Step
Reviewed by Jerry Croteau, Founder & Editor
Table of Contents
I was staring at a balloon and somehow got stuck on algebra
I was standing in my kitchen messing with a half-inflated balloon and a mug of hot water, and I swear I could feel the pressure change in my fingers, and then my brain did that annoying thing where it goes, “Okay, cool… but how would you actually calculate that?”
So I grabbed my phone, typed PV = nRT, and immediately forgot what each letter was supposed to be doing.
Honestly, I nodded like I understood. I didn’t.
But once you see the Ideal Gas Law as a “crowd in a room” problem—molecules bouncing around like people at a concert—it gets weirdly intuitive. Pressure is the pushing on the walls, volume is the size of the room, temperature is how hyped everyone is, and moles is literally how many “people” you’ve got in there. So yeah, it’s physics, but it’s also kind of… event planning.
PV = nRT, but in normal-person language
You’ve probably seen it written like it’s some sacred spell:
And the thing is, the formula itself isn’t the hard part. The hard part is the little “gotchas”:
- Temperature has to be Kelvin. Not Celsius, not “room temp,” not vibes. Kelvin.
- R changes depending on your units. That’s not “advanced chemistry,” it’s just unit compatibility.
- You usually solve for one variable. Like pressure, or volume, or moles. Rarely all at once (unless you’re punishing yourself).
So why does everyone get this wrong? Because most of us try to brute-force it with whatever units are sitting there, and then we get an answer that’s technically a number but spiritually nonsense.
And yes, I’ve done it. More than once.
Pick the right R (or your answer will be haunted)
I had no idea what that meant at first. “Gas constant” sounded like something you’d learn once and then never touch again. But it’s basically just a conversion helper. It’s the part that keeps your pressure units from fighting your volume units in the parking lot.
Here’s a quick cheat sheet I keep coming back to (and I still double-check it, because I’m human).
| If your pressure is in… | And volume is in… | Use R (about) | Temperature unit |
|---|---|---|---|
| atm | L | 0.08206 L·atm/(mol·K) | K |
| kPa | L | 8.314 L·kPa/(mol·K) | K |
| Pa | m³ | 8.314 Pa·m³/(mol·K) | K |
| mmHg (or torr) | L | 62.36 L·mmHg/(mol·K) | K |
But don’t memorize these like flashcards unless you enjoy suffering. Just decide what units you want, then choose the R that matches. That’s the whole game.
So, quick reminder: Kelvin is Celsius + 273.15. If your problem says 27 C, that’s 300.15 K (people usually round to 300 K in class problems and nobody yells at you).
Step-by-step: solve a real PV = nRT problem (the part everyone actually needs)
I’m going to walk through one all the way, because half the time you don’t need “theory,” you need to see the sausage get made.
Scenario: You’ve got 2.0 moles of gas in a 10.0 L container at 27 C. What’s the pressure in atm?
And yes, this is basically “molecules in a box,” which is the most honest version of chemistry.
Step 1: Write what you know.
- n = 2.0 mol
- V = 10.0 L
- T = 27 C
- P = ?
Step 2: Convert temperature to Kelvin.
T = 27 + 273.15 = 300.15 K (call it 300 K if your teacher is chill)
Step 3: Choose R that matches atm and liters.
R = 0.08206 L·atm/(mol·K)
Step 4: Rearrange the formula to solve for P.
PV = nRT → P = (nRT) / V
Step 5: Plug in and calculate.
P = (2.0 mol × 0.08206 L·atm/(mol·K) × 300.15 K) / 10.0 L
First multiply the top: 2.0 × 0.08206 × 300.15 ≈ 49.3
Then divide: 49.3 / 10.0 ≈ 4.93 atm
That’s a lot of pressure! And it makes sense: 2 moles is a decent amount of gas, 10 liters isn’t huge, and room-temp molecules are still zipping around like caffeinated gnats.
Now, if you got something like 0.00493 atm or 493 atm, don’t panic. That usually means one of three things happened: Kelvin got skipped, R didn’t match your units, or you accidentally used 1.0 L instead of 10.0 L (it happens, especially on a tiny calculator screen).
If you want to skip the arithmetic but still understand what’s happening, I built a calculator for exactly this kind of thing:
Ideal Gas Law Calculator (PV = nRT)
And if you’re bouncing between different gas setups, these help too (because half of “gas law problems” is just picking the right relationship):
- Combined Gas Law Calculator — same gas, changing conditions
- Partial Pressure Calculator — mixtures, like air (mostly nitrogen, some oxygen, a sprinkle of everything)
- Moles Calculator — when you’re stuck on “how many particles is this, basically?”
- Kelvin to Celsius Calculator — because nobody wants to do +273.15 ten times
- Celsius to Kelvin Calculator — same pain, opposite direction
So, one more mental model before you go: if you keep n and T the same and squeeze V smaller, P has to climb. Same number of molecular pinballs, smaller arcade.
And if you heat it up (higher T) without changing volume, pressure climbs too, because now the pinballs are hitting the walls harder and more often. That’s why a sealed aerosol can in a hot car is a bad idea (not “movie explosion” bad most of the time, but still… don’t).
FAQ (the stuff you’ll ask right after you think you’re done)
Do I really have to use Kelvin?
Yep. PV = nRT is built around absolute temperature. Celsius is offset (it has that arbitrary “water freezes at 0” thing), so it breaks the proportional relationship. If you use Celsius, your pressure/volume math won’t scale correctly.
What does “n” (moles) feel like in real life?
Think of n as a counting unit, like “dozens,” but for molecules. One mole is a mind-bendingly large number of particles. You don’t need to picture the exact count; you just need to know that more moles means more collisions with the container walls, which usually means more pressure (unless volume also increases).
When does the Ideal Gas Law stop being accurate?
Two common trouble spots:
- High pressure (molecules are crowded, they start “not acting ideal”)
- Low temperature (attractions matter more, and gases may condense)
For a lot of classroom problems and everyday conditions, it’s close enough to be really useful.
Related Calculators
Get smarter with numbers
Weekly calculator breakdowns, data stories, and financial insights. No spam.
Discussion
Be the first to comment!