How to Calculate the Mixing Ratio of Air
The mixing ratio (also called the humidity ratio) is the mass of water vapor carried by each unit mass of dry air. Meteorologists and HVAC engineers prefer it over relative humidity for many calculations because it does not change when air is heated or cooled without adding or removing moisture. This calculator derives the mixing ratio from air temperature, relative humidity, and atmospheric pressure using the standard vapor-pressure formula w = 0.622 × e / (P − e), where e is the actual (partial) vapor pressure of water in the air, P is the total atmospheric pressure, and 0.622 is the ratio of the molar mass of water (18.02 g/mol) to the molar mass of dry air (28.97 g/mol).
Deriving vapor pressure from temperature and humidity
The calculator first estimates the saturation vapor pressure e_s at your input temperature using the Magnus (Alduchov-Eskridge) approximation: e_s = 6.1094 × exp(17.625T / (T + 243.04)), with T in °C and e_s in hPa. This is the maximum vapor pressure the air could hold before water starts condensing out at that temperature. The actual vapor pressure is then e = (RH / 100) × e_s, where RH is the relative humidity you entered. Plugging e and your input pressure P into w = 0.622e / (P − e) gives the mixing ratio, typically reported in grams of water vapor per kilogram of dry air (multiply the kg/kg result by 1000). The closely related specific humidity, q = 0.622e / (P − 0.378e), expresses the same water vapor mass per kilogram of moist (total) air instead of dry air — the two values differ by less than 2% at typical atmospheric conditions.
Practical notes and typical ranges
- Pressure matters: at high altitude, lower atmospheric pressure P pushes the mixing ratio higher for the same temperature and relative humidity, because there is less total air mass to dilute the same vapor pressure.
- Sea-level standard pressure is 1013.25 hPa (1 atm); use your local station pressure for the most accurate result if you have it.
- Typical mixing ratios: cold winter air near 0°C often carries under 3 g/kg; warm, humid summer or tropical air can exceed 20 g/kg.
- Valid range: the Magnus formula used here is accurate to within about 0.1% for temperatures between roughly -40°C and 50°C — extreme temperatures outside that band are flagged as invalid.