Free to Use

Ideal Gas Law Calculator

Calculate pressure, volume, temperature, or moles of an ideal gas using the ideal gas law (PV = nRT). Supports multiple unit conversions and includes a gas selection feature with molar mass reference data.

🧪 Gas Constant (R): 8.314462 J/(mol·K)

Real-World Ideal Gas Law Examples

🎈 Air in a Tire

Problem: A car tire contains 0.5 moles of air at 298 K in a volume of 12 L. What is the pressure inside the tire?

Solution: Using PV = nRT → P = nRT / V

P = (0.5 × 0.082057 × 298) / 12 = 1.02 atm

This is approximately atmospheric pressure. Car tires are typically inflated to 2-2.5 atm (30-36 psi) above atmospheric pressure.

⚗️ Moles of CO₂ in a Soda Can

Problem: A 355 mL soda can contains CO₂ at a pressure of 3.5 atm and 277 K. How many moles of CO₂ are in the can?

Solution: Using PV = nRT → n = PV / RT

n = (3.5 × 0.355) / (0.082057 × 277) = 0.0547 mol

That's about 2.4 g of CO₂ (using molar mass 44.01 g/mol).

🔥 Hot Air Balloon

Problem: A hot air balloon has a volume of 2,500 m³ and contains air at 1.0 atm. If the air inside is heated to 373 K, how many moles of air are inside?

Solution: Using PV = nRT. Convert V = 2500 m³ = 2,500,000 L, P = 1 atm, T = 373 K.

n = (1 × 2,500,000) / (0.082057 × 373) = 81,703 mol

With air's molar mass of ~28.97 g/mol, that's about 2,367 kg of air inside the balloon.

🧊 Volume of Gas at STP

Problem: What volume does 1 mole of an ideal gas occupy at standard temperature and pressure (STP: 0°C, 1 atm)?

Solution: Using PV = nRT → V = nRT / P

V = (1 × 0.082057 × 273.15) / 1 = 22.414 L

This is the molar volume of an ideal gas at STP. Real gases deviate slightly from this value under different conditions.

Ideal Gas Law Formula & Guide

PV = nRT
The Ideal Gas Law

Where P is pressure, V is volume, n is the number of moles, R is the universal gas constant, and T is absolute temperature (in Kelvin).

P = nRT / V
Solve for Pressure
V = nRT / P
Solve for Volume
n = PV / RT
Solve for Moles
T = PV / nR
Solve for Temperature

The universal gas constant R = 8.314462 J/(mol·K) (SI units). Other common values include 0.082057 L·atm/(mol·K) and 62.3637 L·mmHg/(mol·K).

Key Concepts

📌 What is an Ideal Gas?

An ideal gas is a theoretical gas whose molecules occupy negligible volume, have no intermolecular forces, and undergo perfectly elastic collisions. Most real gases approximate ideal behavior at high temperatures and low pressures.

📌 The Gas Constant R

The universal gas constant R appears in the ideal gas law and has different numerical values depending on the units used. The SI value is 8.314462 J/(mol·K). Our calculator automatically adjusts R based on your selected pressure and volume units.

📌 Temperature Must Be in Kelvin

The ideal gas law requires absolute temperature in Kelvin (K). To convert: K = °C + 273.15 or K = (°F - 32) × 5/9 + 273.15. Our calculator handles conversions automatically.

📌 When Does the Ideal Gas Law Fail?

Real gases deviate from ideal behavior at high pressures (where molecular volume matters) and low temperatures (where intermolecular forces become significant). For precise work with real gases, use the van der Waals equation or other real gas models.

🎈
Four Calculation Modes
Solve for pressure, volume, amount (moles), or temperature. Select your mode with radio buttons and enter the three known values.
📐
Multi-Unit Support
Pressure in atm, Pa, kPa, bar, psi, or mmHg. Volume in L, mL, m³, ft³, or gal. Temperature in K, °C, or °F. Amount in mol, mmol, or kmol.
⚗️
Gas Selection Reference
Select from common gases (Air, O₂, N₂, H₂, CO₂, He, Ar) to view molar mass and density at STP for practical reference.
📝
Step-by-Step Solutions
Every calculation includes a detailed step-by-step breakdown showing the formula, substitution, unit conversions, and final result.

⚠️ Important Note: The ideal gas law assumes ideal gas behavior, which is most accurate at low pressures and high temperatures. Real gases may deviate significantly at high pressures or near condensation points. For critical engineering or scientific applications, consider using real gas equations of state (van der Waals, Peng-Robinson, etc.). This calculator is for educational and estimation purposes only.

Frequently Asked Questions

What is the ideal gas law?
The ideal gas law is a fundamental equation in physics and chemistry that relates the pressure (P), volume (V), temperature (T), and amount (n) of an ideal gas: PV = nRT. It combines Boyle's Law, Charles's Law, Gay-Lussac's Law, and Avogadro's Law into a single equation. The law assumes gas molecules occupy negligible volume and have no intermolecular forces.
What value of R should I use?
The value of R depends on your units. The most common values are: 0.082057 L·atm/(mol·K) (when using atm and liters), 8.314462 J/(mol·K) (SI units, Pa and m³), 62.3637 L·mmHg/(mol·K) (mmHg and liters), and 0.0831447 L·bar/(mol·K) (bar and liters). Our calculator automatically selects and displays the appropriate R value based on your chosen pressure and volume units.
Why must temperature be in Kelvin?
The ideal gas law requires absolute temperature (Kelvin) because it is derived from the kinetic theory of gases, where temperature is proportional to the average kinetic energy of gas molecules. The Kelvin scale starts at absolute zero (-273.15°C), where molecular motion theoretically stops. Using Celsius or Fahrenheit would create incorrect proportional relationships because their zero points are arbitrary.
What is STP in gas calculations?
STP stands for Standard Temperature and Pressure. The traditional definition is 0°C (273.15 K) and 1 atm (101.325 kPa). At STP, one mole of an ideal gas occupies 22.414 liters. The newer IUPAC definition uses 0°C and 100 kPa (0.987 atm), giving a molar volume of about 22.711 L. Our calculator uses 0°C and 1 atm as the traditional STP reference.
How accurate is the ideal gas law for real gases?
The ideal gas law is most accurate for gases at low pressures and high temperatures — conditions where molecules are far apart and intermolecular forces are negligible. Under standard conditions, many common gases (He, Ne, Ar, N₂, O₂, H₂) follow the ideal gas law within 1% error. However, at high pressures or near condensation temperatures, deviations can be significant. The compressibility factor Z (Z = PV/nRT) quantifies deviation: Z = 1 for ideal gases, Z ≠ 1 for real gases.
What are the combined gas laws that make up PV = nRT?
The ideal gas law combines four simpler gas laws: Boyle's Law (P₁V₁ = P₂V₂ at constant n, T), Charles's Law (V₁/T₁ = V₂/T₂ at constant n, P), Gay-Lussac's Law (P₁/T₁ = P₂/T₂ at constant n, V), and Avogadro's Law (V₁/n₁ = V₂/n₂ at constant P, T). Together, these give V ∝ nT/P, and introducing R as the proportionality constant gives the complete ideal gas law: PV = nRT.