Ideal Gas Law Calculator
Calculate pressure, volume, temperature, or moles using the ideal gas law PV = nRT.
Solve For
Pressure
Unit Conversions
Input Values (in SI units)
Standard Conditions Reference
What Is the Ideal Gas Law?
The Ideal Gas Law is one of the most fundamental equations in chemistry and physics. It describes the behavior of an ideal gas by relating four macroscopic properties: pressure (P), volume (V), amount of substance in moles (n), and absolute temperature (T). The equation PV = nRT provides a simple yet powerful framework for predicting how a gas responds to changes in its environment.
An ideal gas is a theoretical gas in which the gas particles have no volume and experience no intermolecular forces. Real gases approximate ideal behavior at low pressures and high temperatures, where the distance between molecules is large compared to molecular size. At high pressures or low temperatures, deviations from ideality occur because molecular volumes and attractive forces become significant.
The ideal gas constant R connects the four variables. Its value depends on the units used: R = 0.08206 L·atm/(mol·K) when pressure is in atmospheres, R = 8.314 J/(mol·K) when pressure is in Pascals, and R = 62.36 L·mmHg/(mol·K) when pressure is in mmHg. This calculator uses R = 0.08206 L·atm/(mol·K) and performs automatic unit conversions.
This calculator allows you to solve for any one of the four variables (P, V, n, or T) given the other three. It supports multiple pressure units (atm, kPa, bar, mmHg, psi), volume units (L, mL, m³), and temperature units (K, °C, °F), making it easy to work with data from different sources.
The Ideal Gas Law Formula
The ideal gas law combines several simpler gas laws (Boyle's, Charles's, and Avogadro's laws) into a single equation.
Ideal Gas Law
Where:
- P= Pressure of the gas (atm, kPa, bar, mmHg, or psi)
- V= Volume of the gas container (L, mL, or m³)
- n= Amount of gas in moles (mol)
- R= Universal gas constant (0.08206 L·atm/(mol·K))
- T= Absolute temperature (K, °C, or °F)
How to Use This Calculator
Follow these steps to solve ideal gas law problems:
- Choose What to Solve For: Click the button for the variable you want to calculate: Pressure (P), Volume (V), Moles (n), or Temperature (T). The calculator will show input fields for the other three variables.
- Enter the Known Values: Fill in the three known quantities. Use the unit dropdowns to select the appropriate units for pressure, volume, and temperature. The calculator handles all unit conversions internally.
- View the Result: The calculated value appears in the results section along with conversions to other common units. For pressure, you see atm, kPa, bar, mmHg, and psi. For volume, you see L, mL, and m³. For temperature, you see K, °C, and °F.
The calculator also displays a reference table for standard conditions: STP (0°C, 1 atm, where 1 mol of ideal gas occupies 22.4 L) and room conditions (25°C, 1 atm, where 1 mol occupies 24.5 L).
Understanding the Results
The results provide both the calculated value and practical unit conversions:
Primary Result: The value in the most common unit for that variable. Pressure is shown in atm, volume in liters, moles as a number, and temperature in Kelvin. These are the standard units used with R = 0.08206 L·atm/(mol·K).
Unit Conversions: All results include conversions to related units. For pressure, the calculator shows atm (atmospheres), kPa (kilopascals), bar, mmHg (millimeters of mercury), and psi (pounds per square inch). For volume, it shows L (liters), mL (milliliters), and m³ (cubic meters).
Standard Conditions: The calculator provides reference values at STP (Standard Temperature and Pressure: 0°C, 1 atm) and at room conditions (25°C, 1 atm). At STP, one mole of an ideal gas occupies exactly 22.4 L, which is a useful benchmark for gas calculations.
Input Values (SI): The calculator shows all inputs converted to SI-like base units (atm, L, mol, K) so you can verify the calculation and use the values in further calculations.
Real-World Applications
The ideal gas law is used extensively in chemistry laboratories for gas collection, pressure regulation, and reaction stoichiometry. When gases are collected over water, the ideal gas law helps account for water vapor pressure to determine the true gas volume. Chemists use it to calculate the amount of gas needed for a reaction or to predict the pressure of a gas at different temperatures.
In engineering, the ideal gas law governs the design of pneumatic systems, gas storage tanks, and pressure vessels. Automotive engineers use it to calculate air-fuel ratios in engines, while HVAC engineers use it to size ductwork and predict air behavior in heating and cooling systems. The law is also fundamental to scuba diving calculations for predicting gas consumption at different depths and pressures.
Environmental science uses the ideal gas law to convert between concentrations of atmospheric gases in different units. Air quality measurements often need to be expressed in parts per million (ppm) at standard conditions, which requires the ideal gas law for conversion. Climate scientists use it to model atmospheric pressure changes with altitude.
Medical applications include calculating gas flows in ventilators, determining oxygen requirements for patients, and understanding blood gas analysis results. The ideal gas law helps physicians interpret arterial blood gas values and adjust ventilation settings appropriately.
Worked Examples
Finding Pressure at STP
Problem:
What is the pressure of 2.0 moles of gas in a 44.8 L container at 273.15 K (0°C)?
Solution Steps:
- 1Given: n = 2.0 mol, V = 44.8 L, T = 273.15 K, R = 0.08206 L·atm/(mol·K)
- 2Apply PV = nRT, solving for P: P = nRT / V
- 3P = (2.0 × 0.08206 × 273.15) / 44.8
- 4P = 44.86 / 44.8 = 1.001 atm
Result:
The pressure is approximately 1.00 atm, consistent with STP conditions where 2 mol occupies 44.8 L at 1 atm.
Volume of Gas at Room Temperature
Problem:
How many liters does 0.5 moles of an ideal gas occupy at 25°C and 1 atm?
Solution Steps:
- 1Given: n = 0.5 mol, T = 25°C = 298.15 K, P = 1 atm, R = 0.08206 L·atm/(mol·K)
- 2Apply PV = nRT, solving for V: V = nRT / P
- 3V = (0.5 × 0.08206 × 298.15) / 1
- 4V = 12.24 L
Result:
0.5 moles of ideal gas occupies 12.24 L at room conditions (25°C, 1 atm).
Temperature from Pressure Change
Problem:
A gas at 1.5 atm and 300 K is compressed to 2.0 atm at constant volume. What is the new temperature?
Solution Steps:
- 1At constant volume: P₁/T₁ = P₂/T₂ (Gay-Lussac's Law)
- 2Given: P₁ = 1.5 atm, T₁ = 300 K, P₂ = 2.0 atm
- 3T₂ = P₂ × T₁ / P₁
- 4T₂ = 2.0 × 300 / 1.5 = 400 K (127°C)
Result:
The new temperature is 400 K (127°C) after compression at constant volume.
Tips & Best Practices
- ✓Always convert temperature to Kelvin before using the ideal gas law.
- ✓Use the R value that matches your unit system to avoid conversion errors.
- ✓At STP, 1 mole of any ideal gas occupies 22.4 L — a useful quick reference.
- ✓For gas mixtures, use Dalton's Law: each gas obeys PV = nRT independently.
- ✓Remember that volume must be positive and temperature must be in Kelvin (not negative).
- ✓Real gases deviate from ideal behavior at high pressures and low temperatures.
Frequently Asked Questions
Sources & References
Last updated: 2026-06-06
Help us improve!
How would you rate the Ideal Gas Law Calculator?
Editorial Note
MyCalcBuddy Editorial Team
This page is maintained as an educational calculator reference.
Formula Source: Chemistry: The Central Science
by Brown, LeMay, Bursten