Ideal Gas Law Calculator Formula

Understand the math behind the ideal gas law calculator. Each variable explained with a worked example.

Formulas Used

Pressure (P)

pressure = (n * 0.08206 * temp) / volume

Pressure

pressure_kpa = ((n * 0.08206 * temp) / volume) * 101.325

Variables

VariableDescriptionDefault
nAmount of Gas (n)(mol)1
tempTemperature (T)(K)273.15
volumeVolume (V)(L)22.414

How It Works

Ideal Gas Law

Formula

PV = nRT

Solving for P: P = nRT / V

Where:

  • P = pressure (atm)
  • V = volume (L)
  • n = moles of gas
  • R = gas constant = 0.08206 L·atm/(mol·K)
  • T = temperature (K)
  • The ideal gas law assumes no intermolecular forces and negligible molecular volume.

    Worked Example

    1 mole of gas at 273.15 K (0°C) in 22.414 L.

    n = 1temp = 273.15volume = 22.414
    1. 01P = nRT / V
    2. 02P = (1)(0.08206)(273.15) / 22.414
    3. 03P = 22.414 / 22.414
    4. 04P = 1.000 atm

    Ready to run the numbers?

    Open Ideal Gas Law Calculator