Ideal Gas Law Calculator

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

Gas Parameters

Pressure in atmospheres (atm)
Volume in liters (L)
Amount of gas in moles
Temperature in Kelvin (K)

Results

Result
-
Calculate to see result

Understanding the Ideal Gas Law

The ideal gas law, expressed as PV = nRT, is one of the most fundamental equations in chemistry and physics. It describes the relationship between pressure, volume, temperature, and the number of moles of an ideal gas, allowing us to predict gas behavior under various conditions.

What is the Ideal Gas Law?

The ideal gas law combines several simpler gas laws (Boyle's, Charles's, and Avogadro's laws) into a single equation:

PV = nRT

Where:

  • P: Pressure (typically in atmospheres, atm)
  • V: Volume (typically in liters, L)
  • n: Number of moles of gas
  • R: Universal gas constant (0.0821 L·atm/mol·K)
  • T: Temperature (must be in Kelvin)

Why the Ideal Gas Law Matters

  • Predicting behavior: Calculate how gases respond to changing conditions
  • Engineering applications: Design pressure vessels, engines, and HVAC systems
  • Laboratory work: Determine gas quantities and concentrations
  • Safety: Predict pressure changes to prevent explosions
  • Environmental science: Model atmospheric processes
  • Industrial processes: Optimize reactions involving gases

The Gas Constant R

The universal gas constant R has different values depending on units:

  • 0.0821 L·atm/(mol·K) - most common in chemistry
  • 8.314 J/(mol·K) - SI units
  • 62.36 L·torr/(mol·K) - when using torr
  • 8.314 × 10³ L·Pa/(mol·K) - when using pascals

Our calculator uses R = 0.0821 L·atm/(mol·K) by default.

Example Calculations

Example 1: Finding Pressure

Calculate the pressure of 2.0 mol of gas in a 10.0 L container at 298 K:

  • P = nRT / V
  • P = (2.0 mol)(0.0821)(298 K) / 10.0 L
  • P = 4.89 atm

Example 2: Finding Volume

What volume does 1.0 mol of gas occupy at STP (1 atm, 273.15 K)?

  • V = nRT / P
  • V = (1.0)(0.0821)(273.15) / 1.0
  • V = 22.4 L (the molar volume at STP)

Assumptions of the Ideal Gas Law

The ideal gas law assumes:

  • Gas molecules have negligible volume
  • No intermolecular forces between molecules
  • Collisions are perfectly elastic
  • Molecules move randomly

Real gases deviate from ideal behavior at high pressures and low temperatures. For real gases, use the van der Waals equation instead.

Standard Temperature and Pressure (STP)

STP is defined as:

  • Temperature: 273.15 K (0°C)
  • Pressure: 1 atm (101.325 kPa)
  • Molar volume: 22.4 L/mol

Note: IUPAC now defines STP as 273.15 K and 1 bar (100 kPa), giving 22.7 L/mol.

Applications

  • Scuba diving: Calculating air consumption at depth
  • Hot air balloons: Determining lift from heated air
  • Tire pressure: Predicting pressure changes with temperature
  • Chemical reactions: Calculating gas yields
  • Atmospheric science: Modeling air pressure and density
  • Respiration: Understanding lung volumes and gas exchange

Related Gas Laws

  • Boyle's Law: P₁V₁ = P₂V₂ (at constant T and n)
  • Charles's Law: V₁/T₁ = V₂/T₂ (at constant P and n)
  • Gay-Lussac's Law: P₁/T₁ = P₂/T₂ (at constant V and n)
  • Avogadro's Law: V₁/n₁ = V₂/n₂ (at constant P and T)
  • Combined Gas Law: P₁V₁/T₁ = P₂V₂/T₂ (at constant n)

Tips for Using the Ideal Gas Law

  • Always convert temperature to Kelvin (K = °C + 273.15)
  • Ensure all units are consistent with your choice of R
  • Remember pressure can be in many units (atm, Pa, torr, psi)
  • For real gases, corrections may be needed at extreme conditions
  • Check reasonableness of answers (e.g., negative values indicate errors)

Whether you're a student learning gas laws, a chemist working with gases, or an engineer designing systems, our ideal gas law calculator provides quick, accurate results for all your PV=nRT calculations.

Frequently Asked Questions

Worked example: what pressure do 2 mol of gas exert in a 10 L tank at 25 °C?

Convert the temperature to kelvin first: 25 + 273.15 = 298.15 K. With R = 0.0821 L·atm/(mol·K), P = nRT ÷ V = (2 × 0.0821 × 298.15) ÷ 10 = 48.956 ÷ 10 = 4.8956 atm. The calculator also converts this to 496.05 kPa (× 101.325) and 3720.67 torr (× 760).

Which form of the ideal gas law and which R value does this calculator use?

It uses PV = nRT with R = 0.0821 L·atm/(mol·K). P is pressure in atm, V is volume in liters, n is moles, and T is absolute temperature in kelvin. Pick the unknown and it rearranges the equation: P = nRT/V, V = nRT/P, n = PV/RT or T = PV/nR. Because R is rounded to 0.0821 (the more precise value is 0.082057), results can differ from other tools in the fourth significant figure.

Why must temperature be entered in kelvin?

The ideal gas law requires absolute temperature, because volume and pressure scale with T measured from absolute zero. Entering 25 for 25 °C would make the gas about 12 times colder than it really is. Add 273.15 to Celsius values; for Fahrenheit, use K = (°F − 32) × 5/9 + 273.15.

When does the ideal gas law stop being accurate?

It assumes gas particles have no volume and do not attract each other. That works well for gases like N₂, O₂ and He near room temperature and pressures of a few atmospheres. Accuracy drops at high pressure, at low temperature, and close to the point where a gas condenses, as with steam or CO₂ under compression. In those cases the van der Waals equation or measured compressibility data give better values.