So this problem has been bugging me for a long time. According to Wikipedia the compressibility factor $Z$ is defined as the ratio of the volume occupied by a real gas divided by the volume occupied by an ideal gas at the same temperature and pressure.

$$Z = \frac{V_\text{real}}{V_\text{ideal}}$$

Now the ideal gas equation is

$$P_\text{ideal} V_\text{ideal} = nRT$$

Now from here we can substitute the value of $V_\text{ideal}$ into the $Z$ expression to get $$Z = \frac{P V_\pu{m}}{RT}$$

Where $V_\pu{m}$ is the molar volume of the gas and $P$ is the value of $P_\pu{ideal}$ that was in the ideal gas equation.

OK so far so good.

Deriving the compressibility factor value from the van der Waals' gas equation:

We know for real gases the pressure exerted by them is always less than the pressure exerted by an ideal gas so we correct the pressure by the term $an^2/V^2$

$$P_{\text{ideal}}= P_{\text{real}} + \frac{an^2}{V^2}$$

And the volume occupied by the gas molecules can be written as $$ V_{\text{ideal}} = V_{\text{real}} - nb$$

On substituting the above values of $P_\text{ideal}$ and $V_\text{ideal}$ in the ideal gas equation, we get our van der Waals' Gas equation

$$\left(P+\frac{an^2}{V^2}\right)(V-nb) = nRT$$

Please note that in the above equation $P$ is $P_\text{real}$ and not $P_\text{ideal}$. Now I'm going a step further to calculate the value of $Z$ from this equation by shifting the terms and I got this $$Z = \frac{P V_\pu{m}}{RT} = \frac{V_\pu{m}}{V_\pu{m} - b} - \frac{a}{RTV_\pu{m}}$$

Now here's the problem that I'm facing: In the above expression the value of $P$ is not the $P_\text{ideal}$ but it is the value of $P_\pu{real}$ that we had in the van der Waals' gas equation. Doesn't that contradict the whole definition of Compressibility factor that we had learned in the first place? How this expression for $Z$ can be correct? Thanks for reading.

  • 1
    $\begingroup$ A better definition of the compressibility factor is $$Z=\frac{PV}{nRT}$$This removes any ambiguity. $\endgroup$ Jan 30, 2018 at 12:13
  • $\begingroup$ I actually have a query here. "same temperature and pressure" So a is defined only when pressures are same so cant we just put preal=pideal? $\endgroup$ Sep 23, 2020 at 7:13

2 Answers 2


$$Z = \frac{V^{\mathrm{r}}_{\mathrm{m}}}{V^{\circ}_{\mathrm{m}}}\tag{1}\label{1}$$

$V^{\mathrm{r}}_{\mathrm{m}} = \text{Volume of 1 mol real gas.}$

$V^{\circ}_{\mathrm{m}} = \text{Volume of 1 mol perfect gas.}$

The van der Waals equation is $$ \left( P^{\text{r}} + \frac{an^2}{(V^{\text{r}})^2}\right) (V^{\text{r}} - nb ) = nRT \tag2\label{2}$$

Now, consider you have a container containing a $1~\mathrm{mol}$ real gas. You know its pressure $P^{\text{r}}$, volume $V^{\text{r}}$ and temperature $T$ and you wish to find the compressibility factor of this gas.

So, for calculating $Z$, we know the real volume of the gas, i.e $V^{\mathrm{r}}$ and now we need to calculate $V^{\circ}$ which is the volume it should have occupied if it behaved like a perfect gas, i.e. it obeyed the perfect gas law.

Thus, $$V^{\circ} = \frac{RT}{P^{\text{r}}}$$

Therefore, substituting this value of $V^{\circ}$ in $\eqref{1}$ $$Z = \frac{V^{\mathrm{r}} P^{\text{r}}}{RT}\tag3\label{3}$$

From $\eqref{2}$, by rearranging the terms, we get $$P^{\text{r}} = \frac{RT}{(V^{\text{r}} - b)} - \frac{a}{(V^{\text{r}})^2} \tag4\label{4}$$

Substituting this value of $P^{\text{r}}$ in $\eqref{3}$, we get $$Z = \frac{V^{\text{r}}}{(V^{\text{r}} - b)} - \frac{a}{V^{\text{r}}(RT)} \tag5\label{5}$$

  • $\begingroup$ OK! Please reply me if I'm right- We knew Vr already and for calculating the value of V(ideal) we simply used the ideal gas equation. Right? $\endgroup$
    – Serotonin
    Jan 30, 2018 at 12:40
  • 1
    $\begingroup$ @Serotonin Exactly. $\endgroup$ Jan 30, 2018 at 12:45
  • 1
    $\begingroup$ Thanks dude! Yours was a perfect explanation. I wonder why this is not elaborated in any of the books. $\endgroup$
    – Serotonin
    Jan 30, 2018 at 12:47
  • $\begingroup$ Two good physical chemistry books are Elements of Physical Chemistry and Chemical Principles. Both are authored by Peter Atkins. $\endgroup$ Jan 30, 2018 at 12:52
  • $\begingroup$ Actually I checked that book before asking this question. $\endgroup$
    – Serotonin
    Jan 30, 2018 at 12:53

From van der Waals' equation: $$(p + \frac{an^2}{V^2})(V - nb) = nRT\\ \color{brown}{p} = \frac{nRT}{V - nb} - \frac{an^2}{V^ 2}$$

Compressibility factor is the ratio of volume of real gas to ideal gas: $$Z= \frac{V}{V_{\text{ideal}}} = \frac{\color{brown}{p}V}{nRT} = \frac{V}{V - nb} - \frac{an}{VRT}$$


Not the answer you're looking for? Browse other questions tagged or ask your own question.