Defaults are nitrogen N2 (d ~ 370 pm, M_g = 28 g/mol) at room conditions. Boltzmann constant k = 1.380649e-23 J/K and Avogadro's number N_A = 6.02214076e23 are used.
Blue circles = gas molecules (hard spheres) / arrows = velocity vectors / yellow circle = highlighted molecule / yellow dashed line = expected free path lambda (in box scale) / molecule count grows with number density n
X = pressure P (kPa, 0.01 to 1000, log) / Y = mean free path lambda (m, log) / yellow dot = current (P, lambda) / lambda is proportional to 1/P, slope -1 in log-log
The kinetic theory of gases models molecules as hard spheres and uses the Maxwell-Boltzmann velocity distribution to derive the mean speed, the collision frequency, and the mean free path. Combined with the ideal gas equation of state, these closed-form expressions follow.
Mean free path (hard-sphere model with the sqrt 2 relative-velocity correction):
$$\lambda = \frac{k\,T}{\sqrt{2}\,\pi\,d^2\,P}$$Maxwell-Boltzmann mean speed:
$$\langle v\rangle = \sqrt{\frac{8\,k\,T}{\pi\,m}}$$Collision frequency and number density:
$$\nu = \frac{\langle v\rangle}{\lambda},\qquad n = \frac{P}{k\,T}$$Here $k = 1.380649\times10^{-23}$ J/K is the Boltzmann constant, $d$ is the molecular diameter [m], $P$ the pressure [Pa], $T$ the temperature [K], $m = M_g \times 10^{-3} / N_A$ the mass of one molecule [kg], with $M_g$ the molar mass [g/mol] and $N_A = 6.02214076\times10^{23}$ Avogadro's number.