Ideal Gas Law Calculator
Ideal Gas Law Calculator. Free online calculator with formula, examples and step-by-step guide.
Ideal Gas Law Calculator: Solve PV = nRT Instantly
The Ideal Gas Law calculator solves the fundamental gas equation PV = nRT for any one unknown variable when the other three are given. This tool is essential for chemistry students, physicists, engineers, and HVAC professionals working with gases in laboratory, industrial, or classroom settings.
Ideal Gas Law Formula
PV = nRT
Where P is the absolute pressure of the gas, V is the volume it occupies, n is the number of moles of gas, R is the ideal gas constant, and T is the absolute temperature in Kelvin. The ideal gas law combines Boyle's law, Charles's law, Gay-Lussac's law, and Avogadro's law into a single equation of state.
The ideal gas law assumes that gas molecules are point particles with no volume and no intermolecular forces. It works well for most gases at moderate pressures and temperatures. For calculations, remember that temperature must always be in Kelvin. To convert from Celsius, add 273.15 to the Celsius temperature.
Worked Examples
Example 1: Volume of a Gas at STP
A chemist has 2.5 moles of nitrogen gas (N₂) at standard temperature and pressure (0°C and 1 atm). What volume does the gas occupy?
Calculation: Using R = 0.082057 L·atm/(mol·K). T = 0 + 273.15 = 273.15 K. V = nRT / P = (2.5 × 0.082057 × 273.15) / 1 = 56.0 L
At STP, one mole of any ideal gas occupies 22.414 L. For 2.5 moles, the volume is 2.5 × 22.414 = 56.0 L, confirming the calculation. This relationship is the foundation for molar volume calculations in stoichiometry.
Example 2: Pressure in a Scuba Tank
A scuba tank has an internal volume of 12.0 L and contains 3.0 moles of compressed air at a temperature of 25°C. What is the pressure inside the tank?
Calculation: T = 25 + 273.15 = 298.15 K. P = nRT / V = (3.0 × 0.082057 × 298.15) / 12.0 = 73.39 / 12.0 = 6.12 atm
The pressure of 6.12 atm is approximately 90 psi, which is a typical pressure for a partially filled scuba tank. A fully filled tank at 200 atm would contain about 98 moles of air. This calculation is critical for dive planning and safety.
Common Uses
- Calculating the volume of gas produced or consumed in chemical reactions for stoichiometry problems
- Determining the pressure in compressed gas cylinders for industrial and medical gas storage
- Finding the number of moles of gas in a container for laboratory sample quantification
- Computing temperature changes in gases undergoing compression or expansion in engines and compressors
- Sizing gas storage tanks and pipelines for engineering and industrial process design
- Estimating the behavior of atmospheric gases in meteorology and environmental science studies
Common Mistakes
- Using Celsius instead of Kelvin in the temperature — always add 273.15 to convert from Celsius to Kelvin, because dividing by zero at -273.15°C would be meaningless
- Using the wrong value of the gas constant R for the chosen units — mismatching units is the most frequent error in gas law calculations
- Forgetting to convert pressure units consistently — if using R = 0.082057, pressure must be in atmospheres, not pascals or mmHg
- Applying the ideal gas law to conditions where it is not valid — at very high pressures or low temperatures, real gas behavior diverges significantly from ideal predictions
Pro Tip
When working with a gas that changes conditions (e.g., a balloon rising from sea level to altitude), use the combined gas law P₁V₁/T₁ = P₂V₂/T₂, which eliminates n and R from the equation when the number of moles is constant. This is much simpler than solving the ideal gas law twice. For example, if a balloon at sea level (1 atm, 300 K) has a volume of 2 L and rises to where pressure is 0.7 atm and temperature is 260 K, the new volume is (1 × 2 × 260) / (300 × 0.7) = 2.48 L.
Frequently Asked Questions
The ideal gas constant R has different values depending on the units used. The most common values are: 0.082057 L·atm/(mol·K) for pressure in atm and volume in liters; 8.314462 J/(mol·K) for SI units (pressure in Pa, volume in m³); and 62.3637 L·mmHg/(mol·K) for pressure in mmHg. Always use the correct value of R for your units.
The ideal gas law assumes gas molecules have negligible volume and no intermolecular forces. It breaks down at high pressures (above 10 atm), low temperatures (near the boiling point), and for large molecules. Under these conditions, real gases deviate significantly, and the van der Waals equation or other real gas models should be used instead.
The traditional STP is 0°C (273.15 K) and 1 atm (101.325 kPa), where one mole of an ideal gas occupies 22.414 L. The newer IUPAC standard is 0°C and 100 kPa (0.987 atm), where one mole occupies 22.711 L. Always check which standard is being used in your calculations.
Yes, the ideal gas law applies to gas mixtures using Dalton's law of partial pressures. The total pressure of a mixture equals the sum of the partial pressures of each component gas. Each gas behaves independently, contributing pressure based on its mole fraction times the total pressure. This is valid as long as the gases do not react chemically.