Ideal Gas Law Calculator
Enter any three values, leave one empty. The calculator solves PV = nRT for the missing variable.
The ideal gas law
PV = nRT is the equation of state for an ideal gas — pressure times volume equals moles times the gas constant times absolute temperature. Four variables, one constraint, so given any three you can solve for the fourth. The fifth quantity, the gas constant R, is the same number every time but takes different numerical values depending on which units you use for P and V. R = 0.08206 L·atm/(mol·K) for atmospheres and liters; R = 8.314 J/(mol·K) for pascals and cubic meters. This calculator picks R from your unit selections automatically and converts °C to K before plugging in.
The non-obvious twist is the temperature: T must be in Kelvin, because the equation references absolute zero. Plug in Celsius or Fahrenheit and the math fails — at 0 °C the gas obviously hasn’t disappeared. The other twist is in the unit of pressure: atm, kPa, mmHg, and Pa all show up in textbooks, and the right value of R follows from your choice. The calculator handles those conversions internally so the units cancel correctly.
What the calculator does
- Enter values for any three of P, V, n, T.
- Pick units for each from the dropdowns.
- Leave the unknown blank.
- The calculator converts everything to a consistent unit set, picks the matching R, solves PV = nRT for the missing variable, and shows the substitution and arithmetic.
Worked examples
Find volume. 2.00 mol at 1.00 atm and 25.0 °C.
- T = 25.0 + 273.15 = 298.15 K
- V = nRT/P = (2.00 × 0.08206 × 298.15) / 1.00 = 48.9 L
Find pressure. 0.500 mol N2 in a 10.0 L container at 300 K.
- P = nRT/V = (0.500 × 0.08206 × 300) / 10.0 = 1.23 atm
Find moles. 5.60 L at 1.50 atm and 350 K.
- n = PV/RT = (1.50 × 5.60) / (0.08206 × 350) = 0.292 mol
Find temperature. 1.00 mol occupying 30.0 L at 0.800 atm.
- T = PV/(nR) = (0.800 × 30.0) / (1.00 × 0.08206) = 292 K (19 °C)
Mixed units. 500 mL flask at 760 mmHg and 22 °C.
- V = 0.500 L, P = 760 mmHg = 1.000 atm, T = 295.15 K
- n = (1.000 × 0.500) / (0.08206 × 295.15) = 0.0207 mol
Where PV = nRT sits among the other gas laws
The empirical gas laws are special cases of PV = nRT with one or more variables held constant: Boyle’s (P1V1 = P2V2 at constant n, T), Charles’s (V1/T1 = V2/T2 at constant n, P), Avogadro’s (V1/n1 = V2/n2 at constant T, P), and the combined gas law (P1V1/T1 = P2V2/T2 at constant n) for two-state problems on the same sample. The full PV = nRT form is the most general; reach for the combined gas law when you have initial and final states of one fixed amount of gas.