Ideal gas law calculator: solve PV = nRT for any variable
Find the pressure, volume, amount or temperature of a gas from the other three values. The calculator uses R = 8.314 L·kPa/(mol·K) and opens with 1 mol of gas at 273.15 K and 101.325 kPa, which fills 22.414 L.
PV = nRT
R = 8.314 L·kPa/(mol·K)
How to use the calculator
Under Solve for, choose P, V, n or T; that box shows the answer. Enter the other three values in kilopascals (kPa), liters (L), moles (mol) and kelvins (K). The answer updates as you type.
Convert your data first. For 25 °C, enter 298.15 K. For 1.50 atm, enter 1.50 × 101.325 = 151.99 kPa. For 500 mL, enter 0.500 L.
Worked example
What volume do 2.00 mol of an ideal gas occupy at 300 K and 101.325 kPa? Rearrange PV = nRT to V = nRT ÷ P.
First multiply: nRT = 2.00 mol × 8.314 L·kPa/(mol·K) × 300 K = 4,988.4 L·kPa. Then divide: V = 4,988.4 L·kPa ÷ 101.325 kPa = 49.232 L. Moles, kelvins and kilopascals cancel, leaving liters. To three significant figures, the answer is 49.2 L.
The formula explained
In PV = nRT, P is pressure, V is volume, n is the amount of gas in moles, T is the absolute temperature and R is the gas constant. Rearranged: P = nRT ÷ V, V = nRT ÷ P, n = PV ÷ RT and T = PV ÷ nR.
The law combines Boyle's law (volume falls as pressure rises), Charles's law (volume is proportional to kelvin temperature) and Avogadro's law (volume is proportional to moles).
Units and tips
Because 1 L·kPa is exactly 1 joule, R = 8.314 L·kPa/(mol·K) is the same as 8.314 J/(mol·K). Useful conversions: 1 atm = 101.325 kPa = 760 mmHg, 1 bar = 100 kPa and 1 m³ = 1,000 L.
Always use kelvins: K = °C + 273.15. Using more digits of R (8.314462618) changes the last decimal place, giving 49.234 L instead of 49.232 L above.
FAQ
What is the molar volume of a gas at STP?
One mole of an ideal gas occupies 22.414 L at 0 °C and 1 atm (101.325 kPa). Under the current IUPAC definition of STP, 0 °C and 100 kPa, the molar volume is about 22.711 L.
What is the value of R in PV = nRT?
R is 8.314 J/(mol·K), which equals 8.314 L·kPa/(mol·K). In other units it is 0.08206 L·atm/(mol·K) or 62.36 L·mmHg/(mol·K).
Why does temperature have to be in kelvins?
Gas pressure and volume are proportional to absolute temperature, measured from absolute zero. In Celsius, a gas at 0 °C would seem to have zero volume, and colder gases negative volumes.
When does the ideal gas law not work?
It becomes inaccurate at high pressures and low temperatures, where gas particles are close together and attract one another. Chemists then use corrections such as the van der Waals equation.