Ideal Gas Law Calculator
Solve PV = nRT for pressure, volume, moles, or temperature.
R = 0.082057 L·atm·mol⁻¹·K⁻¹ · temperature must be in kelvin
The ideal gas law is PV = nRT, with R = 0.0821 L·atm·mol⁻¹·K⁻¹. For 2.0 mol of gas in a 10.0 L container at 300 K, solve for pressure: P = nRT ÷ V = (2.0 × 0.0821 × 300) ÷ 10.0 = 4.93 atm. Temperature must be in kelvin.
PV = nRT
The ideal gas law links the pressure, volume, amount, and temperature of a gas through the universal gas constant R. It is an excellent approximation for real gases at moderate pressures and temperatures well above their boiling points. Enter any three quantities and the fourth follows.
R = 0.0821 L·atm·mol⁻¹·K⁻¹ when P is in atm, V in L, n in mol, T in K
Worked example
Find the pressure of 2.0 mol of gas in a 10.0 L container at 300 K. Solve PV = nRT for P.
- 1 Rearrange for pressure. P = nRT ÷ V — divide both sides by the volume V.
- 2 Substitute with R = 0.0821. P = (2.0 mol × 0.0821 × 300 K) ÷ 10.0 L = 49.26 ÷ 10.0.
- 3 Compute the result. P = 4.93 atm. Check the units cancel to leave atm: mol × (L·atm·mol⁻¹·K⁻¹) × K ÷ L = atm.
Gas constant R in common units
Pick the value of R that matches your pressure unit; this tool uses the L·atm form.
| R value | Units | Use when |
|---|---|---|
| 0.0821 | L·atm·mol⁻¹·K⁻¹ | Pressure in atm, volume in L |
| 8.314 | J·mol⁻¹·K⁻¹ | SI units (Pa, m³) |
| 62.36 | L·mmHg·mol⁻¹·K⁻¹ | Pressure in mmHg (torr) |
| 8.314 | L·kPa·mol⁻¹·K⁻¹ | Pressure in kPa, volume in L |
Assumptions and common mistakes
Temperature must be absolute. The law uses kelvin: K = °C + 273.15. Plugging in Celsius is the single most common error and gives nonsense answers.
Match R to your units. Using R = 0.0821 means pressure must be atm and volume liters. Switching to kPa or mmHg without changing R breaks the calculation.
It models an ideal gas. Real gases deviate at very high pressure or low temperature, where molecular volume and intermolecular attractions matter. Near those conditions, use the van der Waals equation instead.