PV = nRT — relating pressure, volume, moles, and temperature
What the Law Says
The ideal gas law relates all four quantities that describe a sample of gas at once: pressure (P), volume (V), the number of moles (n), and temperature (T). Unlike Boyle’s, Charles’s, Avogadro’s, or Gay-Lussac’s laws — which each hold two of these quantities fixed — the ideal gas law lets all four vary together through a single constant of proportionality, the gas constant R.
| Symbol | Quantity | Common Units |
|---|---|---|
| P | Pressure | atm, kPa, mmHg, bar, Pa |
| V | Volume | L, mL, cm³, m³ |
| n | Moles | mol, mmol |
| R | Gas constant | depends on the units chosen for P and V |
| T | Temperature | K (always Kelvin in the equation) |
R’s numeric value depends on which pressure and volume units you use. The most common versions are:
| 0.08206 | L·atm / (mol·K) |
| 8.314 | J / (mol·K) (also L·kPa / (mol·K)) |
| 62.36 | L·mmHg / (mol·K) |
| 0.08314 | L·bar / (mol·K) |
The calculator below handles unit conversions automatically, so you never need to look up the right version of R yourself — enter values in whatever units are convenient.
Because all four variables are related through PV = nRT, this single equation contains Boyle’s, Charles’s, Avogadro’s, and Gay-Lussac’s laws as special cases — each one is just what’s left over when two of the four quantities are held constant.
Using the Ideal Gas Law
The ideal gas law is most useful when you know three of the four quantities for a single state of a gas and need to find the fourth — unlike the other gas laws, there’s no “before and after,” just one snapshot of a gas sample.
Example 1- solving for pressure
A 10.0 L container holds 0.500 mol of gas at 298 K. What is the pressure?
n = (0.500 × 0.08206 × 298) ÷ (10.0)
V ≈ 1.22 atm
Example 2- solving for volume
A sample of gas contains 2.00 mol at a temperature of 300 K and a pressure of 1.50 atm. What is the volume?
n = (2.0 × 0.08206 × 300) ÷ (1.50)
V ≈ 32.8 L
Example 3- solving for mols
A sample of gas has a volume of 5.00 L at a pressure of 1.50 atm and a temperature of 300 K. How many moles of gas are present?
n = (1.50 × 5.00) ÷ (0.0821 × 300)
n ≈ 0.305 mol
Example 4- solving for temperature
A 0.500 mol sample of gas is at a pressure of 1.00 atm and occupies 11.2 L. What is its temperature?
T = (1.00 × 11.2) ÷ (0.500 × 0.0821)
T ≈ 273 K
Ideal Gas Law Calculator
Enter any three values (using whichever units you like) and the fourth will be calculated for you automatically — there is no separate solve button, just start typing. Use Reset to clear the calculator and start over.
The field with the green background is the one being calculated for you. R is applied automatically behind the scenes, whatever units you pick for P, V, n, and T.
Practice Problems
Problem 1 (Solve for Volume)
A sample of 0.400 mol of gas is at 2.00 atm and 350 K. What volume does it occupy?
Show Answer
Problem 2 (Solve for Pressure)
A 1.20 mol sample of gas occupies 15.0 L at 298 K. What is the pressure?
Show Answer
Problem 3 (Solve for Moles)
A 3.00 L container holds gas at 2.50 atm and 400 K. How many moles of gas are present?
Show Answer
Problem 4 (Solve for Temperature)
A 0.750 mol sample of gas occupies 20.0 L at 1.00 atm. What is its temperature?