Solution (source code)

= Solution

\b[Observe each gas volume, temperature, pressure and moisture condition, and reduce both volumes to the same temperature, pressure and dry-gas basis.] Equal scale readings alone do not establish equal amounts of <gas>.

Read the calibrated <volume> of each <gas> in a graduated tube or <eudiometer>, with the eye at the <meniscus> to avoid <parallax>. Allow the <gas> and the surrounding bath to reach <thermal equilibrium>, then read a <thermometer> close to the <gas>. Heating expands a fixed amount of <gas>, so a larger reading could reflect a higher <temperature> rather than more <gas>. The <temperature> used in a <gas law> must be an <thermodynamic temperature>.

Read the atmospheric <pressure> with a <barometer>. If a <gas> is confined over a <liquid>, also observe the difference between the inside and outside <liquid> levels. With $h$ the internal surface height above the external surface, the total internal <pressure> is
$$
p_g=p_{\mathrm{atm}}-\rho_\ell gh.
$$
Here $\rho_\ell$ is the confining <density> of the <liquid> and $g$ the <gravitational acceleration>; the sign reverses automatically when $h$ is negative. Equalizing the levels before taking the <volume> reading removes this <hydrostatic pressure> correction. A <mercury barometer> can itself require <temperature> and calibration corrections for accurate work.

If the <gas> is saturated with <water vapor>, subtract the <vapor pressure> of <water> at its measured <temperature>:
$$
p_{\mathrm{dry}}=p_g-p_{\mathrm{H_2O}}(T).
$$
The observed <pressure> includes both the test <gas> and <water vapor>; counting it all as test <gas> overestimates the amount. The saturation assumption needs time for equilibration. For a dry <gas>, no <water vapor> subtraction is made; another collecting <liquid> may require its own <vapor pressure> correction. A collecting <liquid> must also be chosen so that it neither appreciably dissolves nor reacts with the <gas>: <water>, for instance, is unsuitable for preserving the whole amount of freely soluble <Ammonia>.

For dilute <gases> obeying the <ideal gas law>, the <volume> $V_0$ at a common chosen $T_0,p_0$ is
$$
\boxed{V_0=V\frac{p_{\mathrm{dry}}}{p_0}\frac{T_0}{T}.}
$$
Consequently the corrected comparison is
$$
\boxed{\frac{V_{1,0}}{V_{2,0}}=\frac{V_1}{V_2}\frac{p_{1,\mathrm{dry}}}{p_{2,\mathrm{dry}}}\frac{T_2}{T_1}.}
$$
This is also the ratio of <amounts of substance> in the <ideal gas> approximation. Check for leaks, trapped <air>, changing composition and incomplete transfer. At high <pressure> or near <condensation>, <real gas> behaviour may require <compressibility factors>; with $pV=ZnRT$, the inferred amount ratio contains the further factor $Z_2/Z_1$.