Ideal Gas Law Calculator

Solve PV = nRT for pressure, volume, moles or temperature, with the conditions under which the ideal assumption breaks down.

Pa
L
mol
°C
Temperature in Kelvin 273.15 K
Moles of gas 1.000001 mol
PV = nRT, with R = 8.314462618 J/(mol·K)
Pressure from the other three 101,325 Pa
PV = nRT, with R = 8.314462618 J/(mol·K)
Volume from the other three 22.414 L
Molar volume at these conditions 22.414 L/mol
Particles per litre 2.686780e22

Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.

What the Ideal Gas Law Calculator does

Use this ideal gas law calculator to solve PV = nRT for pressure, volume, moles or temperature, with the conditions under which the ideal assumption breaks down. Fill in all 4 fields and the result updates as you type — there is no Calculate button to press and no page reload. It is most often used for working out how many moles of gas a container holds. There are more free online tools on FreeToolStation.org.

How to use it

  1. Enter pressure in pascals and volume in litres.
  2. Enter the temperature in Celsius — the tool converts to Kelvin.
  3. Leave moles at zero to derive it, or enter it to solve for pressure or volume instead.

How it works

The gas constant R is exactly 8.314462618 J per mole per kelvin, a value fixed by the 2019 SI redefinition rather than measured. Temperature must be absolute: using Celsius in this equation is the single most common error in gas problems, and at room temperature it produces an answer out by a factor of roughly fourteen.

The ideal gas law treats molecules as point particles with no volume and no attraction to each other. That is a good approximation at low pressure and high temperature, and a poor one near condensation. Real gases deviate measurably above about 10 atmospheres and badly near their boiling points, where the van der Waals equation or a compressibility factor is needed instead.

Standard conditions are not standard. STP under the current IUPAC definition is 0 °C and 100 kPa, giving a molar volume of 22.711 L. The older definition used 101.325 kPa and gives 22.414 L, which is the figure most textbooks still quote. NTP and SATP are different again.

When to use it

  • Working out how many moles of gas a container holds.
  • Finding the volume a quantity of gas occupies at given conditions.
  • Checking a chemistry problem or lab calculation.
  • Estimating pressure change with temperature in a sealed vessel.

Common mistakes to avoid

  • Using Celsius instead of Kelvin.
  • Mixing pressure units — R in joules requires pascals and cubic metres.
  • Applying the ideal law near condensation or at high pressure, where real gases deviate substantially.

Frequently asked questions

What is the value of R?

Exactly 8.314462618 J/(mol·K) in SI units. In other unit systems it appears as 0.082057 L·atm/(mol·K) or 1.9872 cal/(mol·K) — same constant, different units.

What is the molar volume of a gas at STP?

22.711 L/mol under the current IUPAC definition of 0 °C and 100 kPa. Under the older 101.325 kPa definition it is 22.414 L/mol, which is the number most textbooks use.

When does the ideal gas law fail?

At high pressure, where molecular volume stops being negligible, and near condensation, where intermolecular attraction matters. Deviations become significant above roughly 10 atmospheres and near the boiling point.

Related tools

See all science & engineering →