Relative humidity from temperature and dew point
Relative humidity is the ratio of the saturation vapor pressure at the dew point to the saturation vapor pressure at the air temperature. The calculator uses the Magnus formula with the coefficients 17.625 and 243.04 and reports humidity in percent, the spread in degrees Celsius and the vapor pressure in hectopascals. A spread of zero gives 100 percent, and at 20 C a spread of 8 degrees gives about 60 percent.
Key points
- Relative humidity depends on both numbers of the T/Td group, not on the dew point alone.
- The tool computes 100 times e(Td) divided by e(T), where e is the Magnus saturation vapor pressure.
- Spread and humidity are linked but not by a fixed ratio: the same spread gives lower humidity in warmer air.
- METAR temperatures are whole degrees, so a computed humidity is an estimate with a margin of several points.
- The vapor pressure shown is the saturation pressure at the dew point, in hPa.

What the calculator does
A METAR gives the air temperature and the dew point, but never the relative humidity. The calculator turns the pair into the figure most people know. Two inputs are needed, both in degrees Celsius: the temperature and the dew point. Three lines come out:
- the relative humidity in percent, rounded to a whole number;
- the spread, which is the temperature minus the dew point, to one decimal in degrees Celsius;
- the vapor pressure, which is the saturation vapor pressure at the dew point, in hectopascals, to one decimal.
All of it runs in the browser. The default values are 20 for the temperature and 12 for the dew point, which give 60 percent, a spread of 8.0 degrees and a vapor pressure of 14.0 hPa.
Three definitions
The FAA Aviation Weather Handbook defines relative humidity as the ratio, usually expressed as a percentage, of the water vapor actually in the air to the amount the air could hold at a particular temperature and pressure. It adds that this figure does not give the actual water vapor content, but how close the air is to saturation. A parcel at 100 percent is saturated.
The dew point is the temperature to which a parcel must be cooled, at constant pressure and constant water vapor content, for saturation to occur. The Federal Meteorological Handbook No. 1 gives the same definition. The Aviation Weather Handbook adds that below 0 C the dew point is sometimes called the frost point.
The spread, also called the dew point depression, is the difference between the two. The Handbook states that as the spread decreases, relative humidity increases, and that when the spread reaches zero, humidity is 100 percent and the parcel is saturated.
The formula used
The page applies the Magnus formula for the saturation vapor pressure of water, in hPa, with the temperature t in degrees Celsius:
e(t) = 6.1094 x exp(17.625 t / (t + 243.04))
The relative humidity is then:
RH = 100 x e(Td) / e(T)
The numerator is the vapor pressure of the air, because by definition the air is saturated at its dew point. The denominator is the vapor pressure the air would have at saturation at its own temperature. The code also contains the inverse, which gives a dew point from a temperature and a humidity: with g = ln(RH / 100) + 17.625 T / (243.04 + T), the dew point is 243.04 g / (17.625 - g). The page itself only uses the first direction.
The coefficients 17.625 and 243.04 are the ones usually attributed to Alduchov and Eskridge (1996). The sources opened for this page do not state them, and the original paper was available only as a scan without text. They are treated here as the choice of the calculator, not as a figure from the handbooks.
Water at all temperatures
The formula is applied to liquid water, including below freezing. This matches the Federal Meteorological Handbook No. 1, which says that dew point is determined with respect to water at all temperatures (section 10.4.3) and calculated with respect to water at all temperatures when reported (section 10.5.1). The UK CAP 746 requires, in paragraph 7.57, that the dew point and not the frost point be displayed for temperatures below zero. Relative humidity over ice at the same temperature would be higher than the value shown here, so the figure for a frosty morning is a humidity with respect to water.
Spread and humidity
The spread alone does not fix the humidity, because the saturation curve is not a straight line. The table was computed with the formula of the page.
| Spread (C) | RH at T = 20 C | RH at T = 5 C |
|---|---|---|
| 0 | 100 % | 100 % |
| 2 | 88 % | 87 % |
| 4 | 78 % | 75 % |
| 6 | 68 % | 65 % |
| 8 | 60 % | 56 % |
| 10 | 52 % | 48 % |
The difference between the two columns is a few points. What matters in practice is the direction: every degree the spread closes, the humidity rises, and fog and low cloud become more likely. CAP 746 notes that in fog, with visibility under 1,000 m, the humidity is at or near 100 percent, and that when humidity is under 95 percent the difference between dry bulb and dew point is usually greater than 1 C. The FAA Handbook says the spread is important in anticipating fog but has little bearing on precipitation. The same spread also feeds the cloud base estimate on the cloud base calculator.
Why humidity changes when the air cools
The Handbook illustrates the point with an air parcel at 30 C holding 8 g of water vapor, with a capacity of 27 g: humidity is 30 percent. Cooled to 20 C, the capacity falls to 15 g and humidity rises to 53 percent. At 10 C the capacity equals 8 g and the parcel is saturated. The water content stayed constant. Only the temperature changed. The dew point is the measure of the water content, and the humidity is the measure of how far the temperature is from it.
The same arithmetic applies to a METAR. With the formula of the page and a dew point fixed at 10 C, humidity is 52 percent at a temperature of 20 C and about 94 percent at 11 C. The dew point in a report describes the moisture of the air mass, while the relative humidity follows the daily temperature cycle.
The rounding problem
METAR temperature and dew point are reported to the nearest whole degree Celsius. The Federal Meteorological Handbook No. 1, CAP 746 and WMO-No. 782 agree. WMO-No. 782 adds that a value of 0.5 is rounded up, and gives the example of 9.5 C and 3.3 C reported as 10/03. A reported pair therefore stands for a range of half a degree on each side.
For a report of 18/13, the temperature can be anywhere from 17.5 to 18.5 and the dew point from 12.5 to 13.5. With the formula of the page, the lowest humidity in that box, at 18.5 and 12.5, is 68 percent and the highest, at 17.5 and 13.5, is 77 percent. The calculator returns 73 percent for 18/13. A careful reading is "about 70 to 75 percent". A report with a T-group in the remarks gives temperature and dew point in tenths and narrows the range. The T-group is explained on the T-group page.
At small spreads the effect is large in relative terms. A report of 10/10 gives exactly 100 percent, but the true values can be 10.5 and 9.5, which give about 93 percent.
Reading a METAR
The temperature and dew point group is covered in detail on the temperature and dew point page: two digits for each value, separated by a solidus, with M for negative values. When the dew point is missing, the temperature is coded followed by a solidus and nothing else, such as 02/, and the calculator has nothing to work with. Humidity also enters the choice between mist and haze: the mist page and the haze page explain the rules. Humidity also matters for aircraft performance, because water vapor enters the density altitude computation on the density altitude calculator.
A schematic report
METAR LXXX 190750Z 24005KT 9999 FEW040 18/13 Q1016
The temperature is 18 C and the dew point 13 C. Typed into the calculator, the result is:
- relative humidity 73 percent;
- spread 5.0 C;
- vapor pressure about 15 hPa (14.95 before rounding).
The spread of 5 C is also what the cloud base method uses. The air is far from saturation, and the humidity of 73 percent would be anywhere in the range of 68 to 77 percent once rounding is taken into account. A second example at low temperature: 05/02 gives 81 percent and a spread of 3.0 C.
In real reports
In real reports the spread is small in fog, low stratus and after rain, and large in dry continental air and in desert climates. Reports with equal temperature and dew point are common in fog. The tool gives 100 percent for such a pair, and the true value lies close to it. No spread threshold for a given weather phenomenon was found in the sources opened for this page, so none is given here, apart from the CAP 746 guide mentioned above.
Method and limits
The definitions of relative humidity, dew point and spread come from the FAA Aviation Weather Handbook (chapter 6) and the Federal Meteorological Handbook No. 1 (chapter 10). The rounding rules come from FMH-1, CAP 746 and WMO-No. 782. The Magnus formula and its coefficients are the ones coded in the calculator. They were not confirmed in a text opened for this page, and other coefficient sets exist that give slightly different values. The formula is applied to liquid water at every temperature, including below zero, and does not include the small effect of pressure on the saturation vapor pressure. The vapor pressure line is the saturation value at the dew point, which equals the actual vapor pressure of the air. The LXXX report is schematic. The photograph shows dew on grass and is not linked to a specific report. The page is a learning aid and is not for operational use.
Source code of this tool (MIT)
// Tafrob calculators - pure functions, MIT licence (c) Tafrob.
// Every formula is documented on the tool page with its source.
const rad = (d: number) => (d * Math.PI) / 180;
/** Wind components on a runway. dir/heading in degrees (same reference: both true or both magnetic). */
export function windComponents(windDir: number, speed: number, runwayHeading: number) {
const angle = ((windDir - runwayHeading + 540) % 360) - 180; // -180..180, + = from the right
const cross = speed * Math.sin(rad(angle));
const head = speed * Math.cos(rad(angle));
return { angle, cross, head }; // cross > 0: from the right; head < 0: tailwind
}
/** Saturation vapour pressure (hPa), Magnus formula with Alduchov & Eskridge (1996) coefficients. */
export const satVap = (tC: number) => 6.1094 * Math.exp((17.625 * tC) / (tC + 243.04));
/** Relative humidity (%) from temperature and dew point (deg C). */
export const relHumidity = (tC: number, tdC: number) => (100 * satVap(tdC)) / satVap(tC);
/** Dew point (deg C) from temperature (deg C) and relative humidity (%). */
export function dewPoint(tC: number, rh: number) {
const g = Math.log(rh / 100) + (17.625 * tC) / (243.04 + tC);
return (243.04 * g) / (17.625 - g);
}
/** Convective cloud base estimate above ground (ft) from the temperature/dew point spread (deg C). */
export const cloudBaseFt = (tC: number, tdC: number) => ((tC - tdC) / 2.5) * 1000;
/** Pressure altitude (ft) from field elevation (ft) and altimeter setting (inHg). FAA rule: 1,000 ft per inHg. */
export const pressureAltitude = (elevFt: number, altInHg: number) => elevFt + (29.92 - altInHg) * 1000;
/** ISA temperature (deg C) at a pressure altitude (ft). */
export const isaTemp = (paFt: number) => 15 - (1.98 * paFt) / 1000;
/** Station pressure (inHg) from altimeter setting (inHg) and elevation (m), NWS formula. */
export const stationPressure = (altInHg: number, elevM: number) => altInHg * Math.pow((288 - 0.0065 * elevM) / 288, 5.2561);
/**
* Density altitude (ft), NWS method (WFO El Paso): station pressure and virtual temperature (humidity included).
* e = 6.11 * 10^(7.5 * Td / (237.3 + Td)) hPa; DA = 145366 * (1 - (17.326 * P / Tv)^0.235), P in inHg, Tv in degrees Rankine.
* Same constants as the NWS page, so results can be checked against it (a dry ISA sea level case gives about 18 ft, not 0).
*/
export function densityAltitude(elevFt: number, altInHg: number, tC: number, tdC?: number) {
const p = stationPressure(altInHg, elevFt * 0.3048); // inHg
const pHpa = p * 33.8639;
const e = tdC === undefined ? 0 : 6.11 * Math.pow(10, (7.5 * tdC) / (237.3 + tdC)); // NWS vapour pressure
const tK = tC + 273.15;
const tvK = tK / (1 - (e / pHpa) * (1 - 0.622));
const tvR = tvK * 1.8;
const da = 145366 * (1 - Math.pow((17.326 * p) / tvR, 0.235));
const pa = pressureAltitude(elevFt, altInHg);
const thumb = pa + 120 * (tC - isaTemp(pa)); // rule of thumb: 120 ft per deg C above ISA
return { da, pa, thumb, isa: isaTemp(pa), stationInHg: p };
}
/** Pressure conversions. */
export const HPA_PER_INHG = 33.8639;
export const HPA_PER_MMHG = 1.333224;
export const hpaToInhg = (h: number) => h / HPA_PER_INHG;
export const inhgToHpa = (i: number) => i * HPA_PER_INHG;
/** METAR A group: hundredths of inHg rounded down (FMH-1 11.5.1); the epsilon absorbs float error (29.92 -> 2991.9999...). */
export const aGroup = (hpa: number) => 'A' + String(Math.floor(hpaToInhg(hpa) * 100 + 1e-6)).padStart(4, '0');
/** Pressure altitude offset (ft) from 1013.25 hPa with the AIM rule of 1,000 ft per inHg (about 29.5 ft per hPa). */
export const pressureOffsetFt = (hpa: number) => ((1013.25 - hpa) / HPA_PER_INHG) * 1000;
export type Category = 'VFR' | 'MVFR' | 'IFR' | 'LIFR';
/** US flight category (NWS / Aviation Weather Center definitions). ceiling in ft AGL (Infinity if none), visibility in statute miles. */
export function flightCategory(ceilingFt: number, visSm: number): { cat: Category; byCeiling: Category; byVis: Category } {
const c: Category = ceilingFt < 500 ? 'LIFR' : ceilingFt < 1000 ? 'IFR' : ceilingFt <= 3000 ? 'MVFR' : 'VFR';
const v: Category = visSm < 1 ? 'LIFR' : visSm < 3 ? 'IFR' : visSm <= 5 ? 'MVFR' : 'VFR';
const rank: Category[] = ['LIFR', 'IFR', 'MVFR', 'VFR'];
const cat = rank[Math.min(rank.indexOf(c), rank.indexOf(v))];
return { cat, byCeiling: c, byVis: v };
}
/** Speed conversions (from knots). */
export const KT = { mps: 0.514444, kmh: 1.852, mph: 1.150779 };
/** Interpret a METAR/TAF day-time group DDHHMMZ relative to a reference date (UTC). */
export function dayTimeGroup(group: string, ref = new Date()) {
const m = group.trim().toUpperCase().match(/^(\d{2})(\d{2})(\d{2})Z?$/);
if (!m) return null;
const [d, h, mi] = [Number(m[1]), Number(m[2]), Number(m[3])];
if (d < 1 || d > 31 || h > 23 || mi > 59) return null;
// Choose the month that puts the date closest to the reference date.
let best: Date | null = null;
for (const off of [-1, 0, 1]) {
const c = new Date(Date.UTC(ref.getUTCFullYear(), ref.getUTCMonth() + off, d, h, mi));
if (c.getUTCDate() !== d) continue;
if (!best || Math.abs(+c - +ref) < Math.abs(+best - +ref)) best = c;
}
return best;
}
Training and reference only. For flight planning, always use official briefing sources (your national weather service, AIS or approved provider).
Frequently asked questions
How is relative humidity computed from a METAR?
The calculator takes the temperature and dew point in degrees Celsius, computes the Magnus saturation vapor pressure at each, and divides the value at the dew point by the value at the temperature. The result, multiplied by 100, is the relative humidity in percent. A report of 20/12 gives 60 percent.
Does a smaller spread always mean higher humidity?
Yes, for a given temperature. The FAA Aviation Weather Handbook states that as the spread decreases, relative humidity increases, and that at a spread of zero humidity is 100 percent. The same spread, however, corresponds to a slightly different humidity in warm air than in cold air.
How accurate is the result for a real METAR?
It is an estimate. METAR temperature and dew point are rounded to whole degrees, so each can be off by up to half a degree. A report of 18/13 can correspond to a humidity anywhere from about 68 to 77 percent. Remarks groups with tenths narrow the range.
Which formula and coefficients does the page use?
It uses the Magnus form of the saturation vapor pressure, 6.1094 times exp of 17.625 T over T plus 243.04, with T in degrees Celsius and the result in hPa. Those are the coefficients usually credited to Alduchov and Eskridge, 1996. This page could not check them in an open text.
Sources
- Federal Aviation Administration (2024). Aviation Weather Handbook (FAA-H-8083-28A)
- Office of the Federal Coordinator for Meteorology (2019). Federal Meteorological Handbook No. 1 (FCM-H1-2019)
- UK Civil Aviation Authority (2023). CAP 746, Requirements for Meteorological Observations at Aerodromes
- World Meteorological Organization (2025). Aerodrome Reports and Forecasts, A Users' Handbook to the Codes (WMO-No. 782)