How Wet Bulb Temperature Works and Why Your API Response Probably Doesn’t Include It

Most weather APIs return dry bulb temperature, humidity, and maybe a heat index figure. Wet bulb temperature — the one that actually determines how close ambient conditions are to the survivability ceiling for a human body — usually isn’t there. It’s not a data gap so much as a derivation problem: wet bulb isn’t measured directly at most stations, it’s calculated. And there are at least three different formulas in common use, which is why different tools give different numbers for the same conditions.

If you’re building anything related to outdoor worker safety, athletics heat protocols, HVAC efficiency, or cooling-center dispatch logic, you probably need wet bulb or wet bulb globe temperature, and you’re going to have to derive it yourself. Here’s how.

Why Wet Bulb Temperature Matters More Than Heat Index

Heat index — what most people mean when they say “feels like” — is an empirical regression developed by Steadman in 1979 and later refined by the National Weather Service. It’s a decent approximation for shade, at low wind speeds, for an average-sized adult at rest. It breaks down below about 27°C dry bulb and gets unreliable above roughly 50% relative humidity at the top end, and it doesn’t scale for physical exertion at all.

Wet bulb temperature is a thermodynamic quantity. It represents the lowest temperature achievable by evaporative cooling in ambient air — essentially, how well sweat can cool you. At 35°C wet bulb, the human body cannot shed heat to the environment even at rest, regardless of wind. The IPCC and heat physiology researchers use that 35°C figure as the theoretical survivability ceiling for a healthy adult in shade — Sherwood & Huber’s 2010 paper is the landmark citation. Real people hit serious heat stress well before that: somewhere around 28–30°C wet bulb under sustained exertion.

Heat index blurs those distinctions. Wet bulb preserves the actual physics.

The Formulas and Their Trade-offs

Three approximations worth knowing:

Stull (2011) — simplest, good enough for most apps

Published in the Journal of Applied Meteorology and Climatology, Stull’s formula takes dry bulb temperature (T, in °C) and relative humidity (RH, in %) and returns wet bulb temperature (Tw) directly:

Tw = T * atan(0.151977 * (RH + 8.313659)^0.5)
     + atan(T + RH)
     - atan(RH - 1.676331)
     + 0.00391838 * RH^1.5 * atan(0.023101 * RH)
     - 4.686035

Accuracy is roughly ±1°C across 5–99% RH and -20°C to 50°C dry bulb. For most alerting logic that’s fine. For precision energy calculations, know the error band before you ship.

August–Roche–Magnus approximation — requires dew point

If you have dew point (Td) rather than relative humidity, you can use the psychrometric relationship directly. The Magnus formula gets you saturation vapor pressure; from there you iterate toward wet bulb using the psychrometric equation:

e_s(T) = 6.1078 * exp(17.27 * T / (T + 237.3))  # saturation vapor pressure, hPa
e_a = e_s(Td)                                      # actual vapor pressure
# Psychrometric equation: e_a = e_s(Tw) - A * P * (T - Tw)
# A = 6.6e-4 (psychrometric constant for ventilated wet bulb)
# P = station pressure in hPa
# Solve iteratively for Tw

WeatherAPI’s current conditions endpoint returns dewpoint_c and pressure_mb, so you have everything you need. The iteration converges fast — three or four Newton steps from a seed of Tw = T - 5 is enough.

Davies-Jones (2008) — most accurate, more complex

If you need sub-0.1°C accuracy across the full meteorological range, Davies-Jones is the reference implementation and what NOAA’s own tools lean on. It’s also a page of algebra. For a heat safety app sending push notifications, Stull is almost certainly sufficient. For a data product licensed to industrial safety teams who will compare your outputs against their own sensors, Davies-Jones is worth the overhead.

What WeatherAPI Returns and What to Do With It

A /current.json response gives you temp_c, humidity (integer RH percentage), dewpoint_c, and pressure_mb. That’s enough for any of the three formulas above. For forecast use cases, /forecast.json returns the same fields per hour inside the forecastday[].hour[] array.

A minimal Python implementation using Stull:

import math
import requests

def wet_bulb_stull(T, RH):
    """Stull (2011) wet bulb approximation. T in °C, RH in %."""
    Tw = (T * math.atan(0.151977 * (RH + 8.313659) ** 0.5)
          + math.atan(T + RH)
          - math.atan(RH - 1.676331)
          + 0.00391838 * RH ** 1.5 * math.atan(0.023101 * RH)
          - 4.686035)
    return round(Tw, 2)

def get_heat_conditions(location, api_key):
    url = "https://api.weatherapi.com/v1/current.json"
    r = requests.get(url, params={"key": api_key, "q": location})
    r.raise_for_status()
    data = r.json()["current"]
    T = data["temp_c"]
    RH = data["humidity"]
    Tw = wet_bulb_stull(T, RH)
    return {
        "temp_c": T,
        "humidity_pct": RH,
        "feels_like_c": data["feelslike_c"],
        "wet_bulb_c": Tw,
        "wet_bulb_warning": Tw >= 28
    }

The wet_bulb_warning flag at 28°C aligns roughly with OSHA guidance on heat-acclimatised workers under moderate exertion. At 32°C wet bulb you’re in a different category entirely.

A Note on Wet Bulb Globe Temperature (WBGT)

Sports medicine and military heat protocols often use WBGT rather than plain wet bulb because it incorporates radiant heat load — solar radiation — in addition to evaporative cooling capacity. The simplified outdoor formula (ISO 7243) is approximately:

WBGT ≈ 0.7 * Tw + 0.2 * Tg + 0.1 * T

Tg is globe temperature, a proxy for solar radiation. No weather API returns it directly — it’s not a standard observation anywhere. You can approximate it from uv, cloud, and hour of day using published regression models from NIOSH or the US Army Research Institute of Environmental Medicine, but that approximation introduces its own error. If you’re surfacing WBGT to end users in a safety context, document the estimation method clearly.

For most app developers, plain wet bulb via Stull is the right output to show. WBGT is more defensible in institutional safety contexts, but the globe temperature estimation is uncertain enough that labelling matters more than formula choice.

Edge Cases Worth Knowing

Stull’s formula breaks down at very low humidity — below about 5% RH the error climbs past 2°C. That’s mostly relevant for desert locations and matters if you’re surfacing wet bulb to users in Phoenix or Riyadh in summer. In those cases, the psychrometric iteration method is more reliable.

Wet bulb also assumes still air. A meaningful wind speed substantially increases actual cooling capacity, which is a real discrepancy if you’re trying to model exertion in a breezier environment. For most alerting use cases this is probably over-engineering it — erring on the conservative side is the safe call anyway.

If you’re calculating wet bulb over a forecast array rather than current conditions: humidity forecasts carry more uncertainty than temperature forecasts. A 72-hour RH forecast from GFS is meaningfully less reliable than a 72-hour temperature forecast. Any wet bulb value derived from forecast data beyond roughly 24 hours should be treated as a directional estimate.

Before you start alerting anyone off this calculation, test your output against a sling psychrometer or a WBGT meter in actual field conditions. The math is correct; the question is always whether the API input is representative of the specific location and exposure.

Scroll to Top