# How to calculate relative humidity r2 in a room at temperature t2, if given a previous pair of temperature t1 and rel. humidity r1?

Consider this scenario: Two sensors are placed in a room to track temperature (in degrees Celsius) and relative humidity over time. The room's temperature varies throughout the day and so does the relative humidity (in general).

Given an earlier measurement of temperature $$t_1$$, the corresponding relative humidity $$r_1$$, and a current temperature $$t_2$$, I would like to calculate (or at least approximate) the corresponding relative humidity $$\hat{r}_2$$ that would be measured, if nothing but the temperature changed (i.e. the absolute humidity and the atmospheric pressure are constant). With $$\hat{r}_2$$ at hand, I would compare it to $$r_2$$ to draw some conclusions (e.g. the absolute humidity or pressure must have changed if $$\hat{r}_2 \neq r_2$$).

If it is necessary, or at least meaningful to also include values for atmospheric pressure $$p_1, p_2$$, that would be OK for me.

To summarize: Is there a (closed form) function of $$t_1, t_2$$ and $$r_1$$, to calculate/approximate $$r_2$$? Alternatively, is there a function of $$t_1, t_2, p_1, p_2$$ and $$r_1$$ to calculate/approximate $$r_2$$? I would assume yes, as psychrometric charts seem to be almost the solution to my problem.

1. Compute saturated vapor pressure, $$e_{sat}$$, at $$t_1$$ and $$t_2$$. There are many approximations; personally, I learned this one (where $$e_{sat}$$ is in kPa and $$T$$ is in Celsius): $$e_{sat}=0.611\exp\left(\frac{17.27T}{237.3+T}\right)$$
2. Vapor pressure $$e = e_{sat}(t_1)\cdot r_1$$
3. Expected relative humidity at $$t_2$$, $$\hat{r}_2 = \frac{e}{e_{sat}(t_2)} = r_1\frac{e_{sat}(t_1)}{e_{sat}(t_2)}$$