If you know the air temperature and the wet bulb temperature, you first want to calculate the actual mixing ratio of the air(W) using the following formula.
(12) W=[(Tc-Twb)(Cp)-Lv(Eswb/P)]/[-(Tc-Twb)(Cpv)-Lv]
W=actual mixing ratio of air
Cp=specific heat of dry air at constant pressure(J/g)~1.005 J/g
Cpv= specific heat of water vapor at constant pressure(J/g)~4.186 J/g
Lv=Latent heat of vaporization(J/g)~2500 J/g
Tc=air temperature in degrees Celsius
Twb=wet bulb temperature in degrees Celsius
Eswb=saturation vapor pressure at the wet bulb temperature(mb)
P=atmospheric pressure at surface~1013 mb at sea-level
Once you have the actual vapor pressure, you can use the following formula to calculate the saturation mixing ratio for the air.
(13) Ws=Es/P
Once you have the actual mixing ratio and the saturation mixing ratio, you can use the following formula to calculate relative humidity.
(14) Relative Humidity(RH) in percent=(W/Ws)*100
Note: The latent heat of vaporization(Lv) varies slightly with temperature. The value given above is an approximate value for the standard atmosphere at 0 degrees Celsius.
Note: Due to the large numbers of approximations using these formulas, your final answer may vary by as much as 10 percent.