A calculation of relative humidity with a change of temperature using JavaScript. Also calculates the dew point and the vapor pressure.

Enter the first temperature and relative humidity, along with the second temperature, below. Press the calculate button, and the relative humidity at the second temperature is displayed. The absolute humidity (measured in mm Hg) is also displayed, along with the dew point (the temperature at which the relative humidity is 100%).

Temperature 1
Relative Humidity 1
Temperature 2

Relative Humidity 2
Dew Point
Vapor Pressure
mm Hg

The calculation is performed using a form of the Clausius-Clapeyron equation:

P = Po e -H / R T

where P is the saturated water vapor pressure, Po is a pre-exponential factor (7.51 x 108 mm Hg, equivalent to the vapor pressure of water at infinite temperature), H is the enthalpy of evaporation (42.3 kJ/mol), R is the gas constant (8.314 J/Kmol) and T is the absolute temperature (in K). Po and H were chosen so that the equation fits two data points exactly; 17.535 mm Hg at 20 C and 760 mm Hg at 100 C.

Knowing the saturated water vapor pressure, which is only dependent upon temperature, the absolute water vapor pressure is calculated directly using the relative humidity. To calculate the relative humidity at a second temperature, the saturated water vapor pressure is again calculated, and the original absolute vapor is divided by this number. To calculate the dewpoint, the Clausius-Clapeyron equation is solved for temperature, and the absolute humidity is used as the independent variable.

For a calculation whose calibration is based on 25 C and 30 C, see this page.

And no, those guys up there are not Clausius and Clapeyron.

Debut: 3 Jan 97. Revision No. 6. Monday, January 2, 2006. Visitors:

Other Pages by the Author. Please send comments on this page to: Jeffrey Clymer