# What is a formula to approximate the change in relative humidity cause by a change in temp?

The moisture-carrying ability of air goes up as the temperature rises. So if I take a volume of air and heat it or cool it (allowing it to expand/contract so the pressure remains constant) how can I calculate the (approximate) relative humidity of the warmer/cooler air that contains the same amount of water vapor?

Say I blow 30°c air at 20% relative humidity over a cool object (but not cool enough to condense water out of the air.) The air is cooled to 20°. What would the relative humidity of the cooled air be if it contained the same amount of water vapor? How do I calculate that?

I am building an Arduino-based control for a warm air dryer for ski boots and bike gear. I will measure the temperature/humidity of the heated air as it comes out of the dryer, and then measure it again as it escapes the gear that I am drying. While the gear is still damp, the waste air should pick up additional moisture, and so its relative humidity should be higher that it would be if I simply cooled it down. When my gear is completely dry, the cooler waste air should contain the same amount of water vapor that it started with, so the relative humidity should be the amount calculated for the measured change in temperature.

I want a "good enough" solution, not one that's mathematically pure. If it gets me answers that are within a percent but involves less computation, that's better than an ideal solution that involves lots of time-consuming calculations. The Arduino microcontroller is fairly slow and cannot do high speed/high precision floating point calculations.

(Would this question be better on an engineering forum? I could see arguments either way.)

I think you can solve this problem by going from relative humidity to absolute moisture content and back; the only property that we want to change is the temperature. However, we have to make a choice about whether to keep the pressure or the volume constant; you can't have both, due to the ideal gas law $$PV=nRT$$; when you change temperature, either the volume, the pressure, or the amount of gas needs to change. Since we're not working in a sealed box, I'll assume the gas is free to expand and so the volume increases while the pressure stays the same.

First let's go from the current relative humidity, which we will call $$RH_1$$, to moisture content by volume, which we will call $$M_1$$.

From this website I found the following equation that takes temperature in Celsius and goes to moisture content in g/m3:

$$M_1 = 6.112 \times \exp((17.67 \times T_1)/(T_1+243.5)) \times RH_1 \times 18.02 / ((273.15+T_1) \times 100 \times 0.08314)$$

now we need to compensate for the change in volume in order to keep the pressure the same while changing the temperature.

The ideal gas law is $$PV=nRT$$. Since we know $$T$$ will change and we want to know the resulting change in $$V$$, we can rearrange this to $$V=TnR/P$$. Since we already determined $$nR/P$$ to be a constant, we know that $$V_2/T_2=V_1/T_1$$, or when rearranged: $$V_2=V_1 \times T_2/T_1$$. As $$V_1=1$$ by definition (we are looking at a single cubic meter), we get $$V_2=T_2/T_1$$. Note however that these $$T_1$$ and $$T_2$$ are in Kelvin! We still need to convert from Celsius. If we do that and compensate $$M_1$$ for the change in air density we get the following moisture content of the air after heating/cooling:

$$M_2 = M_1 / ((T_2+273.15)/(T_1+273.15))$$

Now all that's left to do is to invert the equation for $$M_1$$ to go back to relative humidity using the new temperature (I just threw this in WolframAlpha):

$$RH_2 = M_2 \times \exp(-(17.67 \times T_2)/(T_2+243.5))\times(0.075487 \times T_2 + 20.6193)$$

For your example input of $$T_1=30°C$$, $$RH_1=20\%$$ and $$T_2=20°C$$ we get $$M_1=6.07g/m^3$$, $$M_2=6.28g/m^3$$ and $$RH_2=36.3\%$$

• After thinking about it I think what I should really do is convert relative humidity to dew point. Unless I'm mistaken, dew varies with absolute moisture content of the air (assuming barometric pressure is constant. Feb 2, 2022 at 13:41
• @DuncanC sure, that would also work. If you calculate the dew point of the incoming and outgoing air, assuming the same air pressure on both sides, it should be equal if no moisture was added or removed. You can check with a dew point calculator that both $RH_1$ at $T_1$ and $RH_2$ at $T_2$ produce the same result (4.6°C for your example).
– rem
Feb 2, 2022 at 14:27
• Here's copy-pastable into SpeQ: M2(input_M1, T1, T2)=input_M1/((T2 + 273.15)/(T1 + 273.15)), M1(T1, RH1)=6.112 * Exp((17.67 * T1)/(T1 + 243.5)) * RH1 * 18.02 / ((273.15 + T1) * 100 * 0.08314), RH2(input_M2, T2) = input_M2 * Exp(-(17.67 * T2) / (T2 + 243.5)) * (0.075487 * T2 + 20.6193), CRH(RH1, T1, T2)=RH2(M2(M1(T1, RH1), T1, T2), T2), CRH(48, 20.1, 22.2), Ans = 42.19, Nice ;) Jul 25, 2023 at 16:20

The formula for relative humidity is the saturation vapor pressure at the dew point divided by the saturation vapor pressure at the ambient temperature. The formula for saturation vapor pressure is:

=610.78e(t/(t + 238.3 ) * 17.2694)/100

I don't remember where I found this formula, but I use it in an Excel spreadsheet to calculate water loss in my pond. Since I'm already using the formula, I also calculate relative and absolute humidity. The formulas seem to be reasonably accurate. Of course the temperature is in degrees Celsius.

I have the spreadsheet on my Dropbox account and can post the URL if you're interested.

I found the link for the paper where I found the formula; it's here.

You need to know the vapor pressure of water at different temperature. No simple formula to calculate this exists, however you can hunt down a table - like the one on wikipedia - and then use the Clausius-Clapeyron equation. I've learned to use this form: $$ln\frac{P_1}{P_2}=-\frac{L}{R}(\frac{1}{T_1}-\frac{1}{T_2})$$ With latent heat $$L$$ and gas cosntand $$R$$. Use thge closest known value pair auf T and P from your table to calculate the desired values.