Ideal Gas Law Calculator
Solve PV = nRT for any variable, in the units you choose.
Volume
22.414 L
V = nRT ÷ P = 1 × 8.314 × 273.15 ÷ 101,325 Pa = 0.022414 m³
| 0.022414 m³ |
| 22414 mL |
| 0.79154 ft³ |
How to use this calculator
- Choose the quantity to solve for: pressure, volume, amount of gas or temperature.
- Enter the other three values and pick their units. The field you are solving for is hidden.
- Temperatures can be in kelvins, Celsius or Fahrenheit; the calculator converts them to kelvins.
- Read the answer in your chosen unit, the working in SI units, and the result in other units.
The formula
PV = nRT
| Symbol | Meaning | SI unit |
|---|---|---|
| P | Pressure | pascal (Pa) |
| V | Volume | cubic meter (m³) |
| n | Amount of gas | mole (mol) |
| R | Molar gas constant, 8.314462618 | J/(mol·K) |
| T | Absolute temperature | kelvin (K) |
Rearranged for each unknown: P = nRT ÷ V, V = nRT ÷ P, n = PV ÷ RT, and T = PV ÷ nR. Unit conversions: 1 atm = 101,325 Pa, 1 bar = 100,000 Pa, 1 L = 0.001 m³, and K = °C + 273.15.
Worked example
What pressure do 0.5 mol of gas exert in a 2.0 L container at 25 °C?
- Convert: V = 2.0 L = 0.002 m³; T = 25 + 273.15 = 298.15 K
- P = nRT ÷ V = 0.5 × 8.3145 × 298.15 ÷ 0.002
- P ≈ 1,239.5 ÷ 0.002 ≈ 619,700 Pa
- In other units: about 620 kPa, or 6.12 atm
The calculator's default shows the classic result: 1 mol of gas at 0 °C and 1 atm occupies 22.414 L, the molar volume at standard temperature and pressure.
Understanding your result
The ideal gas law ties together four properties that change together. Heat a sealed container and its pressure rises; let a gas expand at constant temperature and its pressure falls. Each of the classic gas laws (Boyle's, Charles's, Gay-Lussac's and Avogadro's) is this one equation with two of the variables held constant.
Checking your answer
A quick sanity check: at room temperature and normal atmospheric pressure, one mole of gas takes up about 24.5 liters. If your result is wildly different under ordinary conditions, a unit is probably off. The most common mistake is forgetting to convert Celsius to kelvins or liters to cubic meters.
Real gases
For air, nitrogen, oxygen, helium and most gases near room temperature, the ideal gas law is accurate to within a few percent. It drifts at high pressures, like those inside a scuba tank, and near condensation, like steam close to 100 °C. For temperature conversions on their own, use the temperature converter.
Frequently asked questions
What is the ideal gas law?
It relates the pressure, volume, temperature and amount of a gas: PV = nRT. If you know any three, you can find the fourth. It describes an “ideal” gas whose molecules take up no space and don’t attract each other, which is a good approximation for most gases at everyday temperatures and pressures.
What is the value of R?
R, the molar gas constant, is 8.314462618 J/(mol·K). In other units it is 0.082057 L·atm/(mol·K) or 62.364 L·mmHg/(mol·K). Since the 2019 redefinition of SI units, R is exact. This calculator works in SI units internally, so you don’t need to pick an R to match your units.
Why must temperature be in kelvins?
The ideal gas law needs an absolute temperature scale, where zero means no thermal energy. Celsius and Fahrenheit have arbitrary zero points, so plugging them in directly gives wrong answers (and negative volumes below 0 °C). The calculator converts any temperature you enter to kelvins first.
When does the ideal gas law stop working?
At high pressures and low temperatures, real gas molecules crowd together and attract each other, and the law becomes less accurate. Near the point where a gas would condense into a liquid, equations such as the van der Waals equation are used instead.