Ideal Gas Law Calculator -- Solve PV = nRT

Calculate pressure, volume, temperature, or moles using the ideal gas law

Ideal Gas Law Calculator

Solve PV = nRT for any variable with multiple unit options and conversions

Gas Constant (R)
R = 0.08206 L*atm/(mol*K)
P Pressure
V Volume
n Amount
T Temperature
Pressure (P)
1.00 atm
Pressure (P)
1.00 atm
Volume (V)
22.4 L
Amount (n)
1.00 mol
Temperature (T)
273.15 K

Unit Conversions

Ideal Gas Visualization

P (Pressure) V T (Temperature), n (Moles)

Molar Masses of Common Gases

Gas Formula Molar Mass (g/mol)
Hydrogen H2 2.016
Helium He 4.003
Nitrogen N2 28.014
Oxygen O2 31.998
Carbon Dioxide CO2 44.009
Carbon Monoxide CO 28.010
Methane CH4 16.043
Ammonia NH3 17.031
Argon Ar 39.948
Chlorine Cl2 70.906

Understanding the Ideal Gas Law

The ideal gas law, PV = nRT, is one of the most fundamental equations in chemistry and physics. It describes the relationship between four key properties of an ideal gas: pressure (P), volume (V), amount in moles (n), and temperature (T). The constant R is the universal gas constant, which ties these properties together.

This equation combines three historical gas laws discovered experimentally:

  • Boyle's Law: At constant temperature and amount, pressure and volume are inversely proportional (P1V1 = P2V2)
  • Charles's Law: At constant pressure and amount, volume and temperature are directly proportional (V1/T1 = V2/T2)
  • Avogadro's Law: At constant temperature and pressure, volume and amount are directly proportional (V1/n1 = V2/n2)

When combined, these relationships give us the ideal gas law. The gas constant R has a value that depends on the units used. The most common values are:

  • 0.08206 L*atm/(mol*K) - used when pressure is in atmospheres and volume in liters
  • 8.314 J/(mol*K) - the SI unit, used in thermodynamics and when working with energy
  • 8.314 kPa*L/(mol*K) - used when pressure is in kilopascals
  • 62.36 L*mmHg/(mol*K) - used when pressure is in millimeters of mercury

Standard Temperature and Pressure (STP) is a reference condition defined as 0 degrees Celsius (273.15 K) and 1 atmosphere of pressure. At STP, one mole of an ideal gas occupies 22.414 liters. This is known as the molar volume and is extremely useful for stoichiometry calculations. The IUPAC redefined STP in 1982 to be 0C and 1 bar (100 kPa), giving a molar volume of 22.711 L.

Real-world applications of the ideal gas law include calculating the amount of gas needed to fill a container, determining the pressure inside a sealed vessel at different temperatures, sizing industrial gas storage tanks, and understanding atmospheric behavior. It's used extensively in chemical engineering, meteorology, and aerospace applications.

Practical Examples

Example 1: A 10-liter container holds 0.5 moles of nitrogen gas at 25C. What is the pressure?

Convert temperature to Kelvin: T = 25 + 273.15 = 298.15 K
Using PV = nRT: P = nRT/V = (0.5 mol)(0.08206 L*atm/mol*K)(298.15 K) / (10 L) = 1.22 atm

Example 2: What volume does 2 moles of oxygen gas occupy at STP?

At STP: T = 273.15 K, P = 1 atm
Using PV = nRT: V = nRT/P = (2 mol)(0.08206)(273.15) / 1 = 44.8 L
This is exactly 2 times the molar volume at STP.

When the Ideal Gas Law Breaks Down: The ideal gas law assumes that gas molecules have no volume and no intermolecular forces. This works well at high temperatures and low pressures, but becomes increasingly inaccurate at high pressures (above ~10 atm), low temperatures (near the boiling point), or for gases with strong intermolecular forces like ammonia or water vapor. For these conditions, use the Van der Waals equation or other real gas equations that account for molecular size and attractions.

Frequently Asked Questions

What is the ideal gas law?

The ideal gas law is PV = nRT, where P is pressure, V is volume, n is the number of moles of gas, R is the universal gas constant, and T is temperature in Kelvin. It describes the behavior of an ideal gas by relating its pressure, volume, temperature, and amount. This equation is derived from combining Boyle's Law, Charles's Law, and Avogadro's Law.

What is the value of R in the ideal gas law?

The universal gas constant R has different values depending on units: R = 0.08206 L*atm/(mol*K), R = 8.314 J/(mol*K), R = 8.314 kPa*L/(mol*K), or R = 62.36 L*mmHg/(mol*K). The value 8.314 J/(mol*K) is the SI standard and is used in thermodynamics calculations. The choice of R depends on the units you're using for pressure and volume.

What is STP in chemistry?

STP (Standard Temperature and Pressure) is defined as 0 degrees Celsius (273.15 K) and 1 atm (101.325 kPa). At STP, one mole of an ideal gas occupies exactly 22.414 liters, known as the molar volume. IUPAC updated STP to 0C and 1 bar (100 kPa) in 1982, giving a molar volume of 22.711 L. You may encounter both definitions depending on the source.

When does the ideal gas law not apply?

The ideal gas law becomes inaccurate at high pressures (above ~10 atm), low temperatures (near the boiling point of the gas), and for gases with strong intermolecular forces. Under these conditions, use the Van der Waals equation or other real gas equations. Noble gases and diatomic gases behave most ideally. Polar gases like ammonia and water vapor deviate significantly from ideal behavior.

How do I convert Celsius to Kelvin?

Add 273.15 to the Celsius temperature: K = C + 273.15. For example, 25C = 298.15 K and 0C = 273.15 K. The ideal gas law requires temperature in Kelvin because it is an absolute scale where 0 K represents absolute zero (no molecular motion). Negative temperatures in Kelvin are impossible, which prevents mathematical errors in gas law calculations.

Can I use the ideal gas law for mixtures of gases?

Yes! For gas mixtures, the total pressure equals the sum of partial pressures (Dalton's Law), and each gas obeys the ideal gas law independently. You can calculate the total moles as the sum of all component moles, or treat each gas separately and add their pressures. This is useful for calculating the composition of air or industrial gas mixtures.

What's the difference between STP, NTP, and SATP?

STP (Standard Temperature and Pressure) is 0C and 1 atm (or 1 bar in IUPAC). NTP (Normal Temperature and Pressure) is 20C and 1 atm. SATP (Standard Ambient Temperature and Pressure) is 25C and 1 bar. Each gives a different molar volume: 22.4 L at STP (old definition), 24.0 L at NTP, and 24.8 L at SATP. Always check which standard is being used in a problem.

Privacy & Limitations

  • All calculations run entirely in your browser -- nothing is sent to any server.
  • Results are computed using standard formulas and should be verified for critical applications.

Related Tools

Related Tools

View all tools

Ideal Gas Law Calculator FAQ

What is the ideal gas law?

The ideal gas law is PV = nRT, where P is pressure, V is volume, n is the number of moles of gas, R is the universal gas constant, and T is temperature in Kelvin. It describes the behavior of an ideal gas by relating its pressure, volume, temperature, and amount.

What is the value of R in the ideal gas law?

The universal gas constant R has different values depending on units: R = 0.08206 L*atm/(mol*K), R = 8.314 J/(mol*K), R = 8.314 kPa*L/(mol*K), or R = 62.36 L*mmHg/(mol*K). The value 8.314 J/(mol*K) is the SI standard.

What is STP in chemistry?

STP (Standard Temperature and Pressure) is defined as 0 degrees Celsius (273.15 K) and 1 atm (101.325 kPa). At STP, one mole of an ideal gas occupies exactly 22.414 liters, known as the molar volume. IUPAC updated STP to 0C and 1 bar (100 kPa) in 1982, giving a molar volume of 22.711 L.

When does the ideal gas law not apply?

The ideal gas law becomes inaccurate at high pressures (above ~10 atm), low temperatures (near the boiling point of the gas), and for gases with strong intermolecular forces. Under these conditions, use the Van der Waals equation or other real gas equations. Noble gases and diatomic gases behave most ideally.

How do I convert Celsius to Kelvin?

Add 273.15 to the Celsius temperature: K = C + 273.15. For example, 25C = 298.15 K and 0C = 273.15 K. The ideal gas law requires temperature in Kelvin because it is an absolute scale where 0 K represents absolute zero (no molecular motion).

Request a New Tool
Improve This Tool