Calculate pressure, volume, temperature, or amount using PV = nRT. Perfect for chemistry and physics students.
Pressure (P) arises from gas molecules colliding with container walls. Higher temperature or more moles increases collision frequency and thus pressure.
Left plot: P decreases as V increases (inverse relation).
Middle plot: V increases linearly with T.
Right plot: P increases linearly with T.
The ideal gas law is one of the most fundamental equations in chemistry and physics. Written as, it describes the state of a hypothetical “ideal gas” — a gas whose molecules occupy no volume and exert no intermolecular forces on one another. Despite being a simplification, the ideal gas law is remarkably accurate for most common gases at moderate temperatures and pressures.
The equation was first stated in its complete form in 1834 by Benoît Paul Émile Clapeyron, who unified earlier empirical gas laws into a single relationship. Each variable in the equation has a specific physical meaning:
The law tells us that if you know any three of these four variables (P, V, n, T), you can calculate the fourth. This makes it an indispensable tool for chemists, physicists, engineers, and students across many disciplines.
The universal gas constant is a physical constant that relates energy to temperature and amount of substance. Its value is precisely defined as:
Depending on the units you use for pressure and volume, R takes different numerical values:
| Value of R | Units | Common use |
|---|---|---|
| 8.314 | J/(mol·K) | SI standard, physics, engineering |
| 0.08206 | L·atm/(mol·K) | General chemistry courses |
| 62.36 | L·mmHg/(mol·K) | Lab settings using mmHg/torr |
| 8314 | L·Pa/(mol·K) | SI with litres for volume |
Always match your choice of R to the units you use for P and V. Using mismatched units is one of the most common sources of error in gas law calculations.
The ideal gas law unifies three earlier empirical laws. Each one describes what happens when two variables are held constant:
At constant temperature and amount, pressure and volume are inversely proportional. Compressing a gas increases its pressure.
Derived from PV = nRT by holding n, R, T constant.
At constant pressure and amount, volume is directly proportional to absolute temperature. Heating a gas causes it to expand.
Derived from PV = nRT by holding n, R, P constant.
At constant volume and amount, pressure is directly proportional to absolute temperature. This is why pressure cookers build up pressure when heated.
Derived from PV = nRT by holding n, R, V constant.
At constant pressure and temperature, volume is directly proportional to amount. Equal volumes of gases at the same conditions contain equal numbers of molecules.
Derived from PV = nRT by holding P, R, T constant.
Chemists often quote gas properties at defined standard conditions to allow fair comparison. Three reference conditions are commonly used:
Note that IUPAC redefined STP in 1982 to use 1 bar (100,000 Pa) rather than 1 atm. Some older textbooks still use the pre-1982 definition. Always check which standard your source is using.
The ideal gas law assumes two things that are never exactly true: (1) gas molecules have zero volume, and (2) there are no intermolecular attractions or repulsions. Real gases deviate from this model most noticeably under:
For more accurate results in these regimes, chemists use the van der Waals equation:
where corrects for intermolecular attractions and corrects for molecular volume. However, for most introductory chemistry and engineering problems, the ideal gas law gives results accurate to within a few percent.
Official thermophysical property data for hundreds of real gases from the National Institute of Standards and Technology.
Free video lessons on PV = nRT with worked examples covering AP Chemistry and general chemistry courses.
Open-access textbook chapter on the ideal gas equation with derivations, examples, and practice problems.
Pressure inversely proportional to volume
Volume directly proportional to temperature
Pressure directly proportional to temperature
Volume directly proportional to amount
Every November, my tire pressure light comes on. Every single year. The tires aren't leaking — I checked. Twice. Took my Honda Civic to Discount Tire, and the guy behind the counter didn't even look at the car. "It's the cold," he said. "Happens to everyone."
He was right. And the reason fits in one equation.
When the temperature outside drops from a comfortable 80°F in September to 30°F in November, the air molecules inside your tires slow down. They hit the tire walls less often and with less force. The rubber doesn't shrink. The air doesn't escape. But the pressure drops — roughly 1 PSI for every 10°F decrease, according to the Tire Industry Association. A 50-degree swing means you've lost about 5 PSI without a single molecule leaving the tire.
That's not a rule of thumb someone made up. It falls straight out of the ideal gas law.
Before the formula, here's the situation in numbers. Say your tires were filled to 35 PSI on a warm September day at 80°F. November hits, and it's 30°F outside. The volume of the tire stays roughly the same — it's a rigid container. The amount of air (moles) hasn't changed either. Only the temperature moved.
First, convert to absolute temperature (Kelvin), because gas laws don't work with Fahrenheit or Celsius — they need a scale where zero means zero molecular motion.
Temperature Conversion
Since volume and the amount of gas stay constant, pressure is directly proportional to temperature. That gives us:
Plug in the numbers:
You started at 35 PSI. Now you're at 31.7. That's a 3.3 PSI drop — enough to trigger the TPMS warning on most cars (which typically fires at 25% below the recommended pressure). And you didn't drive over a single nail.
Why Kelvin? Celsius and Fahrenheit have arbitrary zero points. Kelvin starts at absolute zero — the temperature where molecules stop moving entirely (−459.67°F). Gas pressure depends on molecular motion, so you need a scale that starts at "no motion." Using Celsius in gas law calculations gives nonsensical results.
The tire example used a simplified version. The full ideal gas law connects four variables at once: pressure, volume, temperature, and the amount of gas.
The Ideal Gas Law
= pressure (in atm, PSI, or Pascals)
= volume (liters)
= moles of gas (amount of stuff)
= gas constant (0.0821 L·atm/mol·K)
= temperature (Kelvin — always Kelvin)
In plain English: pressure times volume equals the amount of gas times a constant times the temperature. If you lock down any three variables, the fourth is determined. That's it. One equation, four knobs.
The tire scenario locked volume and moles, so only pressure and temperature could change. That's actually a special case called Gay-Lussac's Law. Boyle's Law holds temperature constant and watches pressure and volume trade off. Charles's Law holds pressure constant and links volume to temperature. They're all just PV = nRT with different variables pinned down.
Before PV = nRT existed as one equation, three scientists discovered pieces of it independently:
| Law | Relationship | Held Constant | Real-World Example |
|---|---|---|---|
| Boyle's | P ↑ → V ↓ | T, n | Squeezing a syringe |
| Charles's | T ↑ → V ↑ | P, n | Hot air balloon rising |
| Gay-Lussac's | T ↑ → P ↑ | V, n | Tire pressure in winter |
PV = nRT is just all three laws stitched together. Once you see it that way, the equation stops being abstract. It's a description of how gas molecules behave when you change their environment — squeeze them, heat them, add more of them, or give them more room.
Scuba diving. At 30 meters depth, the pressure is about 4 atmospheres. A lungful of air at that depth occupies ¼ of its surface volume (Boyle's Law). Rise too fast without exhaling and that air expands back to full size inside your lungs. That's how lung overexpansion injuries happen — and why every dive instructor drills "never hold your breath."
Cooking at altitude. In Denver (5,280 feet), atmospheric pressure is about 83% of sea level. Water boils at 202°F instead of 212°F. Your pasta takes longer. Your cake rises faster and then collapses. The ideal gas law explains why — lower external pressure means gas bubbles in the batter expand more easily.
The connection to density is direct: gas density depends on pressure and temperature. Hot air is less dense than cold air (same pressure, higher temperature, more volume per mole). That's why hot air balloons float and why warm air rises in your house.
The ideal gas law assumes gas molecules are infinitely small points that don't attract each other. Real molecules have volume and do interact. At high pressures (molecules crammed together) or low temperatures (molecules moving slowly enough to "stick"), the ideal gas law starts giving wrong answers.
For everyday conditions — room temperature, atmospheric pressure, the air in your tires — PV = nRT is accurate within 1-2%. For industrial applications involving extreme conditions, engineers use the Van der Waals equation, which adds correction terms for molecular size and intermolecular forces.
But for your TPMS light? PV = nRT is more than good enough. And now you know why it comes on every November.
PV = nRT relates pressure, volume, temperature, and the amount of gas. It's used to predict how gases behave when conditions change — calculating tire pressure at different temperatures, determining gas volumes in chemical reactions, sizing storage tanks, and understanding atmospheric phenomena. It works well for most gases at everyday temperatures and pressures.
Gas pressure is directly proportional to temperature (Gay-Lussac's Law). When temperature drops, air molecules move slower and exert less force on the tire walls. The rule of thumb: about 1 PSI lost for every 10°F drop. A 50°F temperature swing from summer to winter can cost you 5 PSI — enough to trigger your TPMS warning.
At very high pressures (above ~10 atm) or very low temperatures (near a gas's boiling point), real gas behavior deviates significantly from the ideal model. The Van der Waals equation accounts for molecular volume and intermolecular attractions. For everyday conditions — room temperature, atmospheric pressure — PV = nRT is accurate within 1-2%.
Calculate molarity, moles, volume, mass, solution dilution, mixing, and gas solubility with step-by-step solutions.
Solve for density, mass, or volume with automatic unit conversions and material presets.
Solve uniformly accelerated motion using all 5 kinematic equations. Calculate velocity, acceleration, displacement, or time.
Calculate complex expressions and apply significant figures rules automatically with step-by-step explanations.