Ideal Gas Law Calculator

Calculate pressure, volume, temperature, or moles using the ideal gas law equation PV = nRT. Leave one field empty to solve for that variable.

atm
L
mol
K
Result

Frequently Asked Questions

Why must temperature be in Kelvin?

The ideal gas law requires an absolute temperature scale because gas volume is directly proportional to absolute temperature. At 0 Kelvin (absolute zero), an ideal gas would have zero volume. The Celsius scale has an arbitrary zero point (freezing point of water), which would give incorrect results.

What is the molar volume of a gas at STP?

At Standard Temperature and Pressure (0°C and 1 atm), one mole of any ideal gas occupies 22.4 liters. This is a useful constant for quick calculations in stoichiometry involving gases.

Can I use this for real gases?

Yes, for most practical purposes at moderate temperatures and pressures. Real gases like nitrogen, oxygen, and helium behave very similarly to ideal gases under normal conditions. For high precision or extreme conditions, use the Van der Waals equation instead.

How do I convert pressure units?

Common pressure conversions: 1 atm = 760 mmHg = 760 torr = 101.325 kPa = 1.01325 bar = 14.696 psi. This calculator uses atmospheres (atm), so convert your pressure to atm before entering.

What gases are considered "ideal"?

No real gas is perfectly ideal, but noble gases (helium, neon, argon) and diatomic gases (H2, N2, O2) at room temperature and atmospheric pressure behave very close to ideally. Gases with strong intermolecular forces (like water vapor or ammonia) deviate more from ideal behavior.

What is the ideal gas law?
The ideal gas law is the equation that relates the four state variables of a gas — pressure (P), volume (V), amount (n), and temperature (T): PV = nRT. Where: P = pressure (in pascals, atm, bar, or other pressure units). V = volume (in liters, cubic meters, or other volume units). n = amount of substance in moles. R = the universal gas constant (8.314 J/mol·K or 0.08206 L·atm/mol·K). T = temperature in Kelvin (never Celsius or Fahrenheit — always convert first). What it describes: the ideal gas law models an "ideal gas" — a theoretical gas whose particles: have no volume (point particles). Have no intermolecular forces (perfectly elastic collisions only). Follow Newton's laws of motion exactly. Under these assumptions, all gases behave identically, regardless of their molecular identity. Real gases approximate ideal behavior: at low pressure (molecules far apart; interactions negligible). At high temperature (kinetic energy dominates over intermolecular forces). Near room temperature and pressure, most common gases (N₂, O₂, CO₂, He, Ar) approximate ideal behavior closely enough for most calculations. Deviations from ideal behavior: at high pressure: molecules occupy significant volume; real gas volume is higher than ideal. At low temperature: intermolecular attractive forces become significant; real gas pressure is lower than ideal. Gases near their boiling point deviate most. For non-ideal conditions: use the van der Waals equation: (P + a(n/V)²)(V − nb) = nRT, where a and b are gas-specific constants. History: the ideal gas law unifies three experimentally derived laws: Boyle's Law (P ∝ 1/V at constant T), Charles's Law (V ∝ T at constant P), and Avogadro's Law (V ∝ n at constant P and T).
How do you solve ideal gas law problems?
Solving ideal gas law problems systematically prevents common errors. Follow these steps: Step 1 — Identify what you know and what you need: PV = nRT has five quantities: P, V, n, R, T. R is constant. You typically know three of the remaining four and solve for the fourth. Step 2 — Convert units to consistent set: temperature must be in Kelvin: T(K) = T(°C) + 273.15. Example: 25°C = 298.15 K. This is the most common source of errors. Pressure: if using R = 0.08206 L·atm/(mol·K), pressure must be in atm. If using R = 8.314 J/(mol·K) = 8.314 L·kPa/(mol·K), pressure must be in kPa. Volume: if using R = 0.08206 L·atm/(mol·K), volume must be in liters. Step 3 — Rearrange PV = nRT for your unknown: solving for P: P = nRT/V. Solving for V: V = nRT/P. Solving for n: n = PV/RT. Solving for T: T = PV/(nR). Step 4 — Substitute and calculate: example problem: what is the volume of 2.00 mol of gas at 25°C and 1.50 atm? T = 25 + 273.15 = 298.15 K. R = 0.08206 L·atm/(mol·K). V = nRT/P = (2.00)(0.08206)(298.15) / 1.50 = 48.92 / 1.50 = 32.6 liters. Step 5 — Check your answer: does the magnitude make sense? At STP, 1 mol ≈ 22.4 L. At room temperature (~298 K), 1 mol ≈ 24.5 L. 2 mol at slightly elevated temperature and 1.5 atm: (2)(24.5)/1.5 ≈ 32.7 L — consistent with our answer. Common mistakes: forgetting to convert °C to K (most common error). Using inconsistent units for R (R = 0.08206 requires atm and liters). Confusing moles with grams — must convert mass to moles first: n = mass / molar mass.
What is the value of the gas constant R?
The universal gas constant R is a physical constant that appears in the ideal gas law (PV = nRT) and many other thermodynamic equations. It relates energy scale to temperature for one mole of substance. Primary value: R = 8.314 J/(mol·K) = 8.314 Pa·m³/(mol·K). This is the SI value and should be used when pressure is in pascals and volume is in cubic meters. Common values in different unit systems: R = 0.08206 L·atm/(mol·K) → most common in chemistry (use when P in atm, V in liters). R = 8.314 L·kPa/(mol·K) → SI-adjacent (use when P in kPa, V in liters). R = 83.14 cm³·bar/(mol·K) → materials science. R = 1.987 cal/(mol·K) ≈ 2.000 cal/(mol·K) → thermochemistry (rare today). R = 8.314 J/(mol·K) → thermodynamics, physical chemistry. The key rule: choose R based on your pressure and volume units. Mixing units is the primary source of calculation errors. Example of unit matching: if given P = 2.50 atm and V = 10.0 L, use R = 0.08206 L·atm/(mol·K). If given P = 253.3 kPa and V = 10.0 L, use R = 8.314 L·kPa/(mol·K). Both will give the same answer — as long as units are consistent. Physical meaning: R = k_B × N_A, where: k_B = Boltzmann constant = 1.381 × 10⁻²³ J/K (energy scale per molecule). N_A = Avogadro's number = 6.022 × 10²³ mol⁻¹ (molecules per mole). R scales Boltzmann's per-molecule energy to per-mole energy. It appears in: ideal gas law (PV = nRT). Gibbs free energy (ΔG = ΔH − TΔS, where S includes R). Nernst equation (E = E° − RT/nF × ln Q). Boltzmann distribution and entropy.
When does the ideal gas law fail?
The ideal gas law breaks down when the assumptions underlying it no longer hold — primarily at high pressures and low temperatures. The two key assumptions that fail: Assumption 1 — Gas molecules have no volume: in reality, gas molecules have finite size. At high pressure, molecules are forced closer together, and the finite volume of the molecules themselves becomes a significant fraction of the total container volume. The real gas occupies more volume than the ideal gas law predicts. Assumption 2 — No intermolecular forces: in reality, molecules attract each other (van der Waals forces, dipole-dipole, hydrogen bonding). At low temperatures, kinetic energy is insufficient to overcome these attractive forces. Molecules spend more time closer together than ideal behavior predicts. The real gas exerts less pressure than the ideal gas law predicts. Conditions where ideal gas law fails: high pressure (above ~10 atm): molecular volume correction becomes significant. Low temperature (especially near boiling point): intermolecular attractions become significant. Any gas near its condensation point. Dense gases (CO₂, ammonia, water vapor) at elevated conditions. Which gases deviate most: noble gases (He, Ar): smallest deviations; nearly ideal under most conditions. Non-polar diatomics (N₂, O₂, H₂): small deviations; good approximation at ambient conditions. Polar molecules (NH₃, H₂O, HCl): larger deviations due to strong intermolecular forces. CO₂: moderate deviations, especially above ~20 atm. How to correct for non-ideal behavior: van der Waals equation: (P + a(n/V)²)(V − nb) = nRT. 'a' corrects for intermolecular attractions (pressure correction). 'b' corrects for finite molecular volume. Each gas has its own a and b constants. More sophisticated: Peng-Robinson, Redlich-Kwong equations (used in chemical engineering). Rule of thumb: for most calculation purposes, the ideal gas law is accurate within 1–2% at pressures below 10 atm and temperatures above the gas's boiling point + 50°C.
Why does my answer come out wrong when I use Celsius?
PV = nRT requires absolute temperature (Kelvin), because the relationship only holds true when zero actually means zero energy. Celsius has an arbitrary zero point (freezing water), so plugging in Celsius directly gives a systematically wrong answer — sometimes a small one, sometimes a wildly wrong one near 0°C. Always convert first: K = °C + 273.15.
Which value of R should I use?
It depends entirely on which units your pressure and volume are in. This calculator uses R = 0.08206 L·atm/(mol·K), which pairs with pressure in atmospheres and volume in liters. If your pressure is in mmHg, you'd need R = 62.36 L·mmHg/(mol·K) instead — mixing a pressure unit with the wrong R constant is a common source of an answer that's off by a large, confusing factor.
Why is my calculated volume different from the textbook "22.4 L per mole" I remember?
22.4 L/mol is specifically the molar volume at STP (0°C/273.15 K and 1 atm) — it only applies exactly at that one temperature/pressure combination. At any other temperature or pressure, the real molar volume is different, which is exactly why this calculator exists rather than just memorizing one number.

Key Takeaways

  • The Ideal Gas Law is PV = nRT, relating pressure, volume, moles, and temperature
  • The gas constant R = 0.08206 L·atm/(mol·K) when using standard units
  • Temperature must always be in Kelvin (K = °C + 273.15)
  • At STP (0°C, 1 atm), 1 mole of ideal gas occupies 22.4 liters
  • Real gases deviate from ideal behavior at high pressures and low temperatures
Variable Symbol SI Unit Other Common Units Notes
PressurePPascal (Pa)atm, bar, mmHg (Torr), psi, kPa1 atm = 101,325 Pa = 1.01325 bar = 760 mmHg = 14.696 psi
VolumeVCubic meter (m³)Liter (L), mL, cm³1 m³ = 1,000 L; 1 L = 1 dm³ = 1,000 mL
AmountnMole (mol)—1 mol = 6.022 × 10²³ particles (Avogadro's number)
TemperatureTKelvin (K)°C, °FT(K) = T(°C) + 273.15; always use Kelvin in gas law calculations
Gas constantR8.314 J/(mol·K)0.08206 L·atm/(mol·K), 8.314 L·kPa/(mol·K)Use R = 0.08206 when P in atm and V in liters
Note: The gas constant R has different values depending on units. The most common mistake in ideal gas calculations is mixing units (e.g., using atm for pressure but m³ for volume without converting). Always ensure consistent units.
Condition Temperature Pressure Molar Volume Used By
STP (old IUPAC, pre-1982)0°C (273.15 K)1 atm (101.325 kPa)22.414 L/molMany textbooks; US high school chemistry
STP (new IUPAC, post-1982)0°C (273.15 K)1 bar (100 kPa)22.711 L/molCurrent IUPAC standard
SATP (Standard Ambient)25°C (298.15 K)1 bar (100 kPa)24.789 L/molThermodynamic tables; standard enthalpy
NTP (Normal Temperature)20°C (293.15 K)1 atm (101.325 kPa)24.055 L/molEngineering, HVAC, gas flow
RTP (Room Temperature)25°C (298.15 K)1 atm (101.325 kPa)24.466 L/molUK A-level chemistry; some textbooks
Note: "STP" can refer to two different conditions depending on the source. Always check which STP definition a problem uses. The most common in US high school and university chemistry is the old IUPAC STP: 0°C and 1 atm, with 22.414 L/mol. Post-1982 IUPAC uses 1 bar instead of 1 atm.
Law Formula Constant Description
Boyle's LawP₁V₁ = P₂V₂Temperature, amount (n)Pressure and volume are inversely proportional
Charles's LawV₁/T₁ = V₂/T₂Pressure, amount (n)Volume is directly proportional to temperature (K)
Gay-Lussac's LawP₁/T₁ = P₂/T₂Volume, amount (n)Pressure is directly proportional to temperature (K)
Avogadro's LawV₁/n₁ = V₂/n₂Temperature, pressureVolume is directly proportional to moles of gas
Combined Gas LawP₁V₁/T₁ = P₂V₂/T₂Amount (n)Boyle + Charles + Gay-Lussac combined
Ideal Gas LawPV = nRT—All variables; complete equation for ideal gases
Note: The ideal gas law subsumes all the simpler gas laws. When one or more variables is held constant, the ideal gas law reduces to the simpler relationship. Real gases deviate from ideal behavior at high pressure and low temperature — use the van der Waals equation or other real gas equations for those conditions.

What Is the Ideal Gas Law?

The Ideal Gas Law is a fundamental equation in chemistry and physics that describes the relationship between pressure (P), volume (V), amount of substance (n), and temperature (T) for an ideal gas. This equation combines Boyle's Law, Charles's Law, and Avogadro's Law into a single comprehensive formula.

An "ideal gas" is a theoretical gas composed of randomly moving, non-interacting point particles. While no real gas is perfectly ideal, many gases behave approximately as ideal gases under normal conditions, making this law extremely useful for calculations in chemistry, physics, and engineering.

PV = nRT
P = Pressure (atm)
V = Volume (L)
n = Number of moles (mol)
R = Gas constant (0.08206 L·atm/mol·K)
T = Temperature (K)

The Universal Gas Constant (R)

The gas constant R can have different values depending on the units used. Here are the most common values:

Value of R Units Common Use
0.08206 L·atm/(mol·K) This calculator (most common)
8.314 J/(mol·K) SI units, thermodynamics
62.36 L·mmHg/(mol·K) When pressure is in mmHg
1.987 cal/(mol·K) Energy calculations in calories

How to Use This Calculator

1

Identify the Unknown Variable

Determine which variable (P, V, n, or T) you need to calculate. Leave that field empty.

2

Enter Known Values

Fill in the three known values. Make sure temperature is in Kelvin (add 273.15 to Celsius).

3

Click Calculate

The calculator will solve for the missing variable using PV = nRT with R = 0.08206 L·atm/(mol·K).

4

Interpret Results

Results are displayed with appropriate units. Verify your answer makes physical sense.

Pro Tip: Temperature Conversion

Always convert Celsius to Kelvin before using the ideal gas law: K = °C + 273.15. For example, room temperature (25°C) = 298.15 K. Using Celsius directly will give incorrect results!

Derived Equations

The ideal gas law can be rearranged to solve for any variable:

P = nRT/V
To find Pressure
V = nRT/P
To find Volume
n = PV/RT
To find Moles
T = PV/nR
To find Temperature

Standard Temperature and Pressure (STP)

At Standard Temperature and Pressure (STP), defined as 0°C (273.15 K) and 1 atm, one mole of an ideal gas occupies exactly 22.4 liters. This is known as the molar volume of an ideal gas at STP.

You can verify this using the ideal gas law:

V = nRT/P = (1 mol)(0.08206 L·atm/mol·K)(273.15 K)/(1 atm) = 22.4 L

Real Gases vs. Ideal Gases

The ideal gas law works well under these conditions:

  • Low pressure - Molecules are far apart
  • High temperature - Kinetic energy overcomes intermolecular forces
  • Non-polar gases - Weaker intermolecular attractions

Real gases deviate from ideal behavior when:

  • Pressure is very high (molecules are compressed)
  • Temperature is very low (molecules move slowly)
  • The gas is near its condensation point

For real gases under extreme conditions, the Van der Waals equation provides more accurate results by accounting for molecular size and intermolecular forces.

What if my reagents aren't 100% pure?
Account for purity in your mass calculation: actual mass needed = theoretical mass / (purity fraction). For example, 95% pure NaCl: if you need 10g of pure NaCl, weigh out 10/0.95 = 10.53g. Always check the Certificate of Analysis for the actual purity of each lot.