Skip to content
K Knidox Search…
Chemistry · Gases

Ideal Gas Law Calculator

Solve PV = nRT for pressure, volume, moles, or temperature.

L
mol
K
Common conditions — tap to load
Pressure (P)
1.0006atm

R = 0.082057 L·atm·mol⁻¹·K⁻¹ · temperature must be in kelvin

Pressure vs volume at constant n and T (isotherm)
Isotherm — pressure falls as volume rises at constant amount and temperature, following P = nRT ÷ V.P 3.34 atmP 0.5 atmV 6.72 LV 44.8 L

The ideal gas law is PV = nRT, with R = 0.0821 L·atm·mol⁻¹·K⁻¹. For 2.0 mol of gas in a 10.0 L container at 300 K, solve for pressure: P = nRT ÷ V = (2.0 × 0.0821 × 300) ÷ 10.0 = 4.93 atm. Temperature must be in kelvin.

PV = nRT

The ideal gas law links the pressure, volume, amount, and temperature of a gas through the universal gas constant R. It is an excellent approximation for real gases at moderate pressures and temperatures well above their boiling points. Enter any three quantities and the fourth follows.

PV = nRT

R = 0.0821 L·atm·mol⁻¹·K⁻¹ when P is in atm, V in L, n in mol, T in K

Worked example

Find the pressure of 2.0 mol of gas in a 10.0 L container at 300 K. Solve PV = nRT for P.

  1. 1
    Rearrange for pressure. P = nRT ÷ V — divide both sides by the volume V.
  2. 2
    Substitute with R = 0.0821. P = (2.0 mol × 0.0821 × 300 K) ÷ 10.0 L = 49.26 ÷ 10.0.
  3. 3
    Compute the result. P = 4.93 atm. Check the units cancel to leave atm: mol × (L·atm·mol⁻¹·K⁻¹) × K ÷ L = atm.

Gas constant R in common units

Pick the value of R that matches your pressure unit; this tool uses the L·atm form.

R valueUnitsUse when
0.0821L·atm·mol⁻¹·K⁻¹Pressure in atm, volume in L
8.314J·mol⁻¹·K⁻¹SI units (Pa, m³)
62.36L·mmHg·mol⁻¹·K⁻¹Pressure in mmHg (torr)
8.314L·kPa·mol⁻¹·K⁻¹Pressure in kPa, volume in L

Assumptions and common mistakes

Temperature must be absolute. The law uses kelvin: K = °C + 273.15. Plugging in Celsius is the single most common error and gives nonsense answers.

Match R to your units. Using R = 0.0821 means pressure must be atm and volume liters. Switching to kPa or mmHg without changing R breaks the calculation.

It models an ideal gas. Real gases deviate at very high pressure or low temperature, where molecular volume and intermolecular attractions matter. Near those conditions, use the van der Waals equation instead.

Why must temperature be in kelvin?
The law is based on absolute temperature. Using °C would make the math wrong — and zero or negative values meaningless. Convert with K = °C + 273.15.
What is standard temperature and pressure?
STP is 0 °C (273.15 K) and 1 atm, where one mole of an ideal gas occupies about 22.4 L.
When does the ideal gas law fail?
At very high pressures or low temperatures, where intermolecular forces and molecular volume become significant. Real-gas corrections (van der Waals) are then needed.
Which value of R should I use?
Match R to your pressure unit. This tool uses 0.0821 L·atm·mol⁻¹·K⁻¹; use 8.314 J·mol⁻¹·K⁻¹ for SI units.
How do I find the moles of gas?
Rearrange to n = PV ÷ RT. With P, V, and T known, the moles follow directly — then multiply by molar mass for grams.
How do I convert pressure or volume units before solving?
Since this tool uses R = 0.0821, enter pressure in atm and volume in litres. Convert first if needed — for example divide a pressure in kPa by 101.325 to get atm, or mmHg by 760.