💨 Ideal Gas Law Calculator
PV = nRT — Solve for any variable. Select the unknown and fill in the rest.
—
How to Use This Calculator
Select the variable you want to solve for, fill in the other three values, and click Calculate. The tool solves PV = nRT for whichever quantity you leave out: pressure (atm), volume (L), moles (mol), or temperature (K).
Choose your unknown from the "Solve for" dropdown. If you want to find how many moles of gas are in a container, select n (moles).
Enter pressure in atm, volume in litres, and temperature in Kelvin. Convert Celsius to Kelvin by adding 273.15. Room temperature (25°C) is 298.15 K.
Click Calculate. The result uses R = 0.08206 L·atm/(mol·K), the universal gas constant in the most common unit set for chemistry problems.
Check the unit on the result. If you solved for pressure, the answer is in atm. Multiply by 101.325 to convert to kPa, or by 760 to get mmHg.
Ideal Gas Law Formula
P is absolute pressure in atm, V is volume in litres, n is the number of moles, R is the gas constant (0.08206 L·atm/mol·K), and T is absolute temperature in Kelvin. Rearrange to solve for any one variable: for example, n = PV / (RT) or V = nRT / P. Temperature must always be in Kelvin. Using Celsius will give a completely wrong answer.
Worked Examples
Where This Calculation Comes Up
The ideal gas law is used in almost every gas-phase calculation in general chemistry. You need it when you collect a gas over water in a lab and need to find the moles of gas produced, when you want to predict the pressure inside a sealed container at a new temperature, or when you calculate the volume a gas sample will occupy at standard conditions. Stoichiometry problems involving gases almost always end with an ideal gas law step.
In engineering, the ideal gas law is the starting point for designing gas storage tanks, HVAC systems, and chemical reactors. While real gases deviate from ideal behavior at high pressures (above about 10 atm) or very low temperatures, the equation gives answers accurate to within a few percent for most practical situations. Scuba divers use a simplified version of this relationship to understand how gas volume changes as they descend, and automotive engineers use it when calculating engine cylinder pressures.
Frequently Asked Questions
What is the ideal gas law?
PV = nRT, where P = pressure (atm), V = volume (L), n = moles, R = 0.08206 L·atm/(mol·K), T = temperature (K).
What units does this calculator use?
Pressure in atm, volume in litres, temperature in Kelvin, moles in mol. You can convert: K = °C + 273.15.
What is the value of R?
R = 0.08206 L·atm/(mol·K) = 8.314 J/(mol·K) = 62.36 L·mmHg/(mol·K).
When is the ideal gas law accurate?
At low pressures (< 10 atm) and high temperatures, real gases behave nearly ideally. For high pressure or low temperature, use the Van der Waals equation.
How do I convert Celsius to Kelvin?
Add 273.15: T(K) = T(°C) + 273.15. Always use Kelvin in gas law calculations.