Note: This calculation is very complex and requires a knowledge of algebra.

From the user, an air temperature , a wet-bulb temperature , and a station pressure are given. The temperature values must be converted to units of degrees Celsius .

Also, the station pressure must be converted to units of millibar or hectoPascal .

To see how to convert temperatures and pressures, see the links below:

Then, an actual vapor pressure needs to be calculated. To accomplish the calculation, a vapor pressure related to wet-bulb temperature and a saturated vapor pressure must be calculated first using the equations below:

where is the number .

Then, an actual vapor pressure can be calculated using the equation below:

Finally, a relative humidity and a dewpoint temperature can be calculated using the equations below:

where is the actual vapor pressure.