Calculator of Alexandria

Ideal gas law calculator (PV = nRT)

Solve the ideal gas law for pressure, volume, moles or temperature, with unit conversion for atm, kPa, mmHg, °C and °F.

Solve for

Must be above absolute zero. The calculator converts °C and °F to kelvin.

Formula

PV=nRTPV = nRT
How it's derived

The formula

PV=nRTPV = nRT

PP is pressure, VV volume, nn the amount of gas in moles, TT the absolute temperature in kelvin, and R=8.314 J/(mol⋅K)R = 8.314\ \text{J/(mol·K)} is the molar gas constant.

Where it comes from

The ideal gas law stitches together three older experimental laws, each found by holding two quantities fixed and varying the others.

Boyle’s law (1662). At fixed temperature and amount, squeezing a gas raises its pressure in inverse proportion:

P∝1VP \propto \frac{1}{V}

Charles’s law (1787). At fixed pressure, volume grows in proportion to absolute temperature:

V∝TV \propto T

Avogadro’s law (1811). At fixed temperature and pressure, equal volumes hold equal numbers of molecules, so

V∝nV \propto n

If VV is proportional to each of 1/P1/P, TT and nn separately, it is proportional to their product:

V∝nTP⇒V=R nTPV \propto \frac{nT}{P} \quad\Rightarrow\quad V = R\,\frac{nT}{P}

The constant of proportionality is RR. Multiplying both sides by PP gives PV=nRTPV = nRT.

The same result also falls out of kinetic theory: treat a gas as tiny particles bouncing elastically off the walls, add up the momentum they transfer per second, and the pressure comes out as PV=13Nmv2‾PV = \tfrac{1}{3}Nm\overline{v^2}. Since the average kinetic energy of a particle is proportional to temperature, that again becomes PV=nRTPV = nRT.

Worked example

The volume of one mole of gas at 0 °C and 1 atm:

V=nRTP=1×8.314×273.15101,325 Pa=0.02241 m3=22.4 LV = \frac{nRT}{P} = \frac{1 \times 8.314 \times 273.15}{101{,}325\ \text{Pa}} = 0.02241\ \text{m}^3 = 22.4\ \text{L}

Watch out for

  • Temperature must be absolute. Using 25 instead of 298.15 K is the most common mistake; the calculator converts for you.
  • Real gases deviate at high pressure and low temperature, where molecules take up space and attract each other. Below about 10 atm and well above the boiling point, the ideal law is usually within a few percent.

Sources

Last checked