Chemistryideal gas lawPV=nRTmoles

Ideal Gas Law Calculator

The ideal gas law combines Boyle's Law, Charles's Law, and Avogadro's Law into a single equation relating pressure, volume, moles, and temperature of an ideal gas. This calculator solves for the number of moles when you provide the other three variables, using the gas constant R = 0.08206 L·atm/mol·K.

Advertisement

Calculator

atm
L
K

See your Ideal Gas Law Calculator results

Enter your email to unlock results — free forever.

or

No spam, ever. Unsubscribe at any time.

Advertisement

Formula

PV = nRT → n = PV / (RT)

P is pressure in atmospheres. V is volume in liters. n is the number of moles (the result). R is the ideal gas constant = 0.08206 L·atm/(mol·K). T is temperature in Kelvin. This form of the ideal gas law uses units consistent with the most common laboratory measurements — liters for volume and atmospheres for pressure. At STP (0°C, 1 atm), one mole of ideal gas occupies exactly 22.414 liters.

How to use the Ideal Gas Law Calculator

  1. 1

    Enter your pressure

    Value should be in atm.

  2. 2

    Enter your volume

    Value should be in L.

  3. 3

    Enter your temperature

    Value should be in K.

  4. 4

    Read your results instantly

    Results update in real time as you type.

Advertisement

The ideal gas law and its assumptions

The ideal gas law PV = nRT is derived from three simpler laws: Boyle's Law (P ∝ 1/V at constant T and n), Charles's Law (V ∝ T at constant P and n), and Avogadro's Law (V ∝ n at constant P and T). It assumes that gas molecules have no volume themselves and exert no intermolecular attractions or repulsions — the 'ideal gas' approximation. Under these assumptions, all gases behave identically on a per-mole basis. The equation works best for real gases at low pressures (where molecules are far apart) and high temperatures (where kinetic energy dominates over intermolecular attractions). The van der Waals equation corrects for non-ideal behavior.

STP, SATP, and molar volume

Standard Temperature and Pressure (STP) is defined by IUPAC as 0°C (273.15 K) and 100 kPa (0.987 atm). At STP, one mole of an ideal gas occupies 22.711 liters. An older definition of STP used 1 atm and 0°C, giving a molar volume of 22.414 L/mol — the value still commonly seen in textbooks. Standard Ambient Temperature and Pressure (SATP) uses 25°C (298.15 K) and 100 kPa, giving a molar volume of about 24.790 L/mol. When a problem says 'STP,' clarify which definition is being used, as the two values of molar volume differ by about 1.3% and can affect stoichiometric calculations.

Advertisement

Choosing the right value of R

The gas constant R has the same value regardless of units, but its numerical value depends on what units you choose for pressure and volume: R = 0.08206 L·atm/(mol·K) = 8.314 J/(mol·K) = 8.314 Pa·m³/(mol·K) = 62.36 L·mmHg/(mol·K). This calculator uses 0.08206 L·atm/(mol·K), which matches pressure in atm and volume in liters. If your problem uses kPa for pressure and liters for volume, use R = 0.08314 L·kPa/(mol·K). If it uses Pascals and cubic meters, use R = 8.314 J/(mol·K). Mixing units without changing R is the most common source of large errors in ideal gas calculations.

Tips & Insights

Convert pressure to atm and temperature to K

This calculator uses R = 0.08206 L·atm/mol·K, so pressure must be in atm (1 atm = 101.325 kPa = 760 mmHg) and temperature must be in Kelvin (K = °C + 273.15).

At STP, 1 mol of gas ≈ 22.4 L

As a sanity check, one mole of an ideal gas at 0°C and 1 atm occupies 22.414 L. Use this reference point to quickly verify whether your answer is in a reasonable range.

Ideal gas fails near condensation

Real gases deviate from ideal behavior at high pressure and low temperature — especially near the boiling point. For steam, CO₂ at high pressure, or any gas above ~10 atm, consider using a real gas equation of state.

Worked Examples

One mole at STP

pressure_atm: 1volume_L: 22.414temperature_K: 273.15

n = 1.000 mol — confirms that 22.414 L of gas at STP contains exactly one mole.

High-pressure gas sample

pressure_atm: 5volume_L: 10temperature_K: 298

n = 2.044 mol — 10 L of gas at 5 atm and 25°C contains approximately 2 moles.

Advertisement

Frequently Asked Questions

What is the value of R in different unit systems?

R = 0.08206 L·atm/(mol·K) in lab units, 8.314 J/(mol·K) in SI units, and 62.36 L·mmHg/(mol·K) in older units. Always match R to the units of pressure and volume in your problem.

What is STP?

Standard Temperature and Pressure: 0°C (273.15 K) and 1 atm by the older definition, or 0°C and 100 kPa by the current IUPAC definition. At STP (1 atm, 0°C), one mole of ideal gas occupies 22.414 liters.

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

Yes, using Dalton's Law of Partial Pressures. Each component behaves as though it alone occupies the total volume, and the total pressure is the sum of partial pressures. You can apply PV = nRT to each gas individually.

What makes a gas non-ideal?

Non-ideal behavior arises from intermolecular attractions (which reduce pressure below ideal) and finite molecular volume (which increases pressure above ideal). The van der Waals equation adds correction terms for both effects.

How does the ideal gas law relate to density?

Since n = PV/(RT) and n = m/M (mass divided by molar mass), density ρ = m/V = PM/(RT). A heavier gas at the same pressure and temperature is denser than a lighter gas — which is why helium balloons float.

Advertisement

Related Calculators