This calculator works out the mixing ratio of air—the mass of water vapor per unit mass of dry air—from temperature, relative humidity, and barometric pressure. Enter those three values and you get the mixing ratio in grams of water vapor per kilogram of dry air, plus the dew point and vapor pressure. The mixing ratio is a fundamental humidity parameter used in meteorology, HVAC design, and drying processes.
Formula
The mixing ratio r is defined as the mass of water vapor divided by the mass of dry air in a given volume. It is calculated from the vapor pressure e and the total atmospheric pressure p:
r = 0.622 × e / (p − e)
where e is the actual vapor pressure in hPa, p is the total barometric pressure in hPa, and the factor 0.622 is the ratio of the molar mass of water (18.015 g/mol) to the molar mass of dry air (28.97 g/mol). The vapor pressure e is obtained from the relative humidity (RH) and the saturation vapor pressure es at the air temperature T (°C). Using the widely accepted Magnus formula:
es = 6.112 × exp(17.67 × T / (T + 243.5))
Then e = RH/100 × es. The mixing ratio is often expressed in grams per kilogram (g/kg), so the result is multiplied by 1000. The dew point is also derived from e using the inverse Magnus formula.
Worked Example
Using the default values: temperature = 25 °C, relative humidity = 50%, pressure = 1013 hPa.
- Compute the saturation vapor pressure: es = 6.112 × exp(17.67 × 25 / (25 + 243.5)) = 6.112 × exp(441.75 / 268.5) = 6.112 × exp(1.645) ≈ 6.112 × 5.181 ≈ 31.67 hPa.
- Actual vapor pressure: e = 0.50 × 31.67 = 15.83 hPa.
- Mixing ratio: r = 0.622 × 15.83 / (1013 − 15.83) = 9.846 / 997.17 ≈ 0.009874 kg/kg = 9.87 g/kg.
- Dew point: Td = (243.5 × ln(0.50 × 5.181)) / (17.67 − ln(0.50 × 5.181)) = (243.5 × ln(2.5905)) / (17.67 − ln(2.5905)) = (243.5 × 0.952) / (17.67 − 0.952) = 231.8 / 16.72 ≈ 13.9 °C.
The calculator gives a mixing ratio of 9.87 g/kg, a dew point of 13.9 °C, and a vapor pressure of 15.83 hPa, matching the hand calculation.
Why Mixing Ratio Matters
Unlike relative humidity, the mixing ratio does not change when air is warmed or cooled without adding or removing water vapor. That makes it a conserved quantity in many atmospheric processes. Meteorologists use it to track moisture in air masses, forecast cloud formation, and calculate precipitable water. In HVAC design, the mixing ratio helps determine the amount of ventilation needed to control indoor humidity and the load on dehumidifiers or air conditioners. In drying operations (wood, food, textiles), the mixing ratio of the surrounding air dictates how fast moisture evaporates from the material.
How to Use the Calculator
Enter the air temperature in °C (range −40 to 60 °C), the relative humidity in percent (0–100), and the barometric pressure in hPa (500–1100 hPa, which covers altitudes from sea level to about 5,500 m). The calculator returns:
- Mixing ratio (g/kg) – the main answer.
- Dew point (°C) – the temperature at which condensation begins.
- Vapor pressure (hPa) – the partial pressure of water vapor.
For pressures in other units, convert first: 1 atm = 1013.25 hPa = 101.325 kPa = 29.92 inHg. If you only know the altitude, use a standard atmosphere table to estimate pressure (e.g., at 1,500 m, pressure is about 845 hPa).
Common Mistakes and Limitations
- Unit mix-ups: Pressure must be in hPa, not kPa or mmHg. If you enter 101.3 instead of 1013, the mixing ratio will be roughly ten times too high.
- Confusing mixing ratio with specific humidity: Specific humidity is mass of water vapor per total mass of moist air. The mixing ratio uses dry air mass. The difference is small (about 1–2%) but becomes significant at high humidity.
- Magnus formula limits: The formula is accurate to about ±0.3% for temperatures between −40 °C and +50 °C, but it deviates at very low temperatures (below −40 °C) where ice saturation should be used instead.
- Pressure dependence: At higher altitudes, lower pressure increases the mixing ratio for the same relative humidity and temperature. This is why mountain air feels “dry” even when RH is high.
Practical Applications
In weather forecasting, a mixing ratio of 8–10 g/kg is typical for warm, humid air in summer; values above 15 g/kg are rare and often precede heavy rain. In buildings, ASHRAE recommends keeping indoor humidity between 30% and 60% RH, which corresponds to a mixing ratio of about 5–12 g/kg at typical indoor temperatures (20–25 °C). For industrial drying, a lower mixing ratio means faster evaporation; for example, in a kiln at 60 °C and 10% RH, the mixing ratio is only about 12 g/kg, which pulls moisture out of wood rapidly.
Frequently Asked Questions
What is the difference between mixing ratio and relative humidity? Relative humidity is the ratio of actual vapor pressure to saturation vapor pressure, expressed as a percentage. It changes with temperature. Mixing ratio is the actual mass of water vapor per kilogram of dry air, so it stays constant when temperature changes without adding or removing moisture. For example, air at 25 °C and 50% RH has a mixing ratio of 9.87 g/kg; if you warm it to 35 °C without adding moisture, the RH drops to about 28% but the mixing ratio remains 9.87 g/kg.
How do I convert mixing ratio to specific humidity? Specific humidity (q) is related to mixing ratio (r) by q = r / (1 + r), where both are in kg/kg. For r = 0.00987 kg/kg, q = 0.00987 / 1.00987 ≈ 0.00977 kg/kg = 9.77 g/kg. The difference is small but matters in precise calculations.
Why does the calculator ask for barometric pressure? The mixing ratio depends on total pressure because the same amount of water vapor occupies a larger fraction of the air when total pressure is lower. At higher altitudes, pressure decreases, so the mixing ratio increases for the same RH and temperature. Without pressure, you cannot compute an accurate mixing ratio.
Can I use this for air at very high temperatures (above 100 °C)? The Magnus formula is only valid up to about 60 °C. Above that, steam tables are needed. For most practical applications (weather, HVAC, drying), the range −40 to 60 °C is sufficient.
What is the saturation mixing ratio? The saturation mixing ratio is the mixing ratio when RH = 100%. It is calculated by plugging es into the formula instead of e. For example, at 25 °C and 1013 hPa, the saturation mixing ratio is 0.622 × 31.67 / (1013 − 31.67) ≈ 20.1 g/kg. This is the maximum moisture the air can hold at that temperature and pressure.
Related
Formula used
in t | Air temperature | °C | 25 | -40 | 60 in rh | Relative humidity | % | 50 | 0 | 100 in p | Barometric pressure | hPa | 1013 | 500 | 1100 out mr | Mixing ratio | g/kg | (0.622 * (rh/100 * 6.112 * exp(17.67 * t / (t + 243.5))) / (p - (rh/100 * 6.112 * exp(17.67 * t / (t + 243.5))))) * 1000 | 2 out tdp | Dew point | °C | (243.5 * log(rh/100 * exp(17.67 * t / (t + 243.5)))) / (17.67 - log(rh/100 * exp(17.67 * t / (t + 243.5)))) | 1 out vp | Vapor pressure | hPa | rh/100 * 6.112 * exp(17.67 * t / (t + 243.5)) | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
- Three Phase to Single Phase Conversion Calculator6.24 kW
- Symbolic Algebra Calculator: How It Works
- Terrarium Glass Area Calculator18.00 ft²
- Sweater Size Calculator: How to Find Your Fit36
- Specific Speed Pump Turbine Calculator50.00
- Species Extinction Rate Calculator