# How to calculate relative humidity from temperature, dew point, and pressure?

Is there a formula given the temperature, dew point, and pressure to find relative humidity?

I have seen several calculators like this one, but I would like to know how to calculate this myself.

I am aware that there are several formulas that can calculate this with just the temperature and dew point, but since I'm writing a program, I would like to be able to use the pressure data that I have for greater accuracy.

• Having dealt with this in the past, - the long dim past. I'm not aware of a formula that incorporates all your variables. The matter is a bit complex for that. There are a number of formulae the require the calculation of saturated vapor pressure @ dry & wet bulb temperatures. moisture content of saturated , etc. If you can get a hold of the book, Environmental Engineering in South African Mines, The Mine Ventilation Society of South Africa, 1989, pp 451-455, the formulae & process involved is described there. – Fred Mar 25 at 16:44
• @Fred I don't know if we should be so light handed tagging duplicates. In this case the formula in the other answer is not what the OP is looking for, and to find the values in the formula the answer points to an online calculator, which is exactly what the OP wants to avoid. Also it doesn't tackle the rol of pressure, which is one of the concerns of the OP. – Camilo Rada Mar 26 at 2:17

You can refer to this question for more detail on the origin of this formula (based on the Magnus approximation), but if you do some algebra to the expression there for dew point ($$TD$$) as function of temperature ($$T$$) and relative humidity ($$RH$$), you get

$$RH=100 \, e^{\Large \left(\frac{c\, b (TD-T)}{(c+T) (c+TD)}\right)}$$

With $$b=17.625$$ and $$c=243.04$$.

In this case, where $$TD$$ is one of your input variables, there is no need to consider the pressure, pressure have no effect in $$RH$$, or more accurately, the pressure dependence is already considered through $$TD$$. The pressure would come into play if you are computing $$TD$$ from water vapour pressure, because water vapour pressure is what have a small dependence in atmospheric pressure.

The Magnus approximation above is considered valid for:

$$0^oC < T < 60^oC$$
$$1\% < RH < 100\%$$
$$0^oC < TD < 50^oC$$

There are also other equivalent formulas that extends their validity range by changing the constants, like this one

$$RH=100\, 10^{\Large m\left( \frac{TD}{TD+T_n}+\frac{T}{T+T_n}\right)}$$

Where values for the constants $$m$$ and $$T_n$$ depend on temperature and are tabulated:

See this document for more details.

There are also very simple approximations to these formulas, like

$$RH \approx 100 - 5 (T-TD)$$

You can find a discussion on the accuracy of this approximation here.

• Can you give a formula where pressure is not neglected? – User that is not a user Mar 25 at 11:03
• @Userthatisnotauser Thinking it more toughly, it is TD what depends on pressure, therefore if you are measuring TD, there is no need to consider pressure. The pressure would come into play if you are computing TD from water vapour pressure and saturation vapor pressure. Because is saturation vapor pressure what depends on atmospheric pressure. – Camilo Rada Mar 25 at 16:44