Home › Weather & Environment › Relative Humidity Calculator
Relative Humidity Calculator
Computes relative humidity from air temperature and dew point as the ratio of Magnus-formula vapour pressures, and the absolute humidity (grams of water vapour per cubic metre) from the ideal-gas law for water vapour.
When to use
A weather report gives temperature and dew point and you need the relative humidity, or you need the water-vapour content of air in g/m³ (e.g. for drying, greenhouses or HVAC).
Do not use when: You have relative humidity and need the dew point (use dew-point), or you need humidity ratio in g/kg of dry air, which also requires the air pressure.
Formula
es(T) = 6.1094·exp(17.625·T/(243.04 + T)) hPa (T in °C); RH = 100·es(Td)/es(T); absolute humidity = 100·es(Td) / (461.5 · (T + 273.15)) kg/m³ × 1000
Magnus formula with Alduchov & Eskridge (1996) coefficients; water vapour treated as an ideal gas with Rv = 461.5 J/(kg·K). Accurate to about 0.5 % RH for −40 to +50 °C.
Inputs
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
temperature | number | yes | Air (dry-bulb) temperature in temperature_unit. Range: ≥ -60, ≤ 140 | |
dew_point | number | yes | Dew point temperature in temperature_unit; cannot exceed the air temperature. Range: ≥ -80, ≤ 140 | |
temperature_unit | enum: c | f | default c | Unit of the temperature input(s). |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
relative_humidity_percent | number | % | RH = 100 × es(Td) / es(T). |
absolute_humidity_g_m3 | number | g/m³ | Mass of water vapour per cubic metre of air, e / (Rv × T_K). |
vapor_pressure_hpa | number | hPa | Partial pressure of water vapour, es(Td). |
saturation_vapor_pressure_hpa | number | hPa | es(T) at the air temperature. |
saturation_absolute_humidity_g_m3 | number | g/m³ | Water vapour content the air could hold at 100 % RH and this temperature. |
dew_point_depression_c | number | °C | T − Td in Celsius. |
comfort | string | NWS dew-point comfort band. |
Example
25 °C, dew point 19.15 °C: {"temperature":25,"dew_point":19.15,"temperature_unit":"c"} → {"relative_humidity_percent":70,"absolute_humidity_g_m3":16.09,"vapor_pressure_hpa":22.13,"saturation_vapor_pressure_hpa":31.62,"dew_point_depression_c":5.9}
30 °C, dew point 10 °C: {"temperature":30,"dew_point":10,"temperature_unit":"c"} → {"relative_humidity_percent":28.9,"absolute_humidity_g_m3":8.76,"saturation_absolute_humidity_g_m3":30.28}
GET https://tttkmbb.com/api/v1/calculate/relative-humidity?temperature=25&dew_point=19.15&temperature_unit=c
Machine access
- API:
GET https://tttkmbb.com/api/v1/calculate/relative-humidity(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/relative-humidity · Markdown: https://tttkmbb.com/weather/relative-humidity.md · JSON definition: https://tttkmbb.com/weather/relative-humidity.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="relative-humidity" - OpenAPI operationId:
calculate_relative_humidity - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
FAQ
Can relative humidity exceed 100 %?
Not in this calculator: a dew point above the air temperature is physically impossible for saturated equilibrium and returns an error.
What is the difference between absolute humidity and humidity ratio?
Absolute humidity is grams of vapour per cubic metre of moist air; the humidity ratio (mixing ratio) is grams of vapour per kilogram of dry air and needs the total air pressure.
Related calculators
- Dew Point Calculator — Inverse: dew point from temperature and relative humidity.
- Air Density Calculator — Density of moist air from temperature, pressure and humidity.
- Heat Index Calculator — Apparent temperature from temperature and humidity.