# Calculation of humidity ratio by vapor partial pressure

I've been looking around for a way to calculate the humidity ratio by the partial vapor pressure and the atmospheric pressure of the environment.

I found a procedure for such calculation on engineering toolbox (https://www.engineeringtoolbox.com/humidity-ratio-air-d_686.html). There, it is explained that:

Based on the Ideal Gas Law, the humidity ratio can be expressed as:

x = 0.62198 pw / (pa - pw)

where

pw = partial pressure of water vapor in moist air (Pa, psi)

pa = atmospheric pressure of moist air (Pa, psi)

However, it is very unclear to me where they got the value 0.62198 from. I couldn't find any explanation as to why this value is used and how is it obtained.