Air Density Explained: Calculating ρ from Temperature, Pressure and Humidity
Air density is the mass of air per unit volume, in kg/m³, and three numbers determine it: temperature, pressure, and relative humidity. This guide unpacks the ideal-gas mixture formula behind the calculator, walks through a worked example you can verify by hand, and shows how each input pushes the result up or down so you can sanity-check the answer before you trust it.
What air density actually is
Air density is the mass of air contained in a given volume, reported in kilograms per cubic metre (kg/m³). At sea level on an average day it is around 1.2 kg/m³ — a number small enough that air feels weightless to us, but large enough that an empty 1 m³ box at sea level holds roughly the same mass of air as a litre of water weighs in grams. The air density calculator on this page returns that value for any combination of temperature, pressure and humidity, along with the dry-air and water-vapour contributions separately.
Density matters because almost every aerodynamic, thermodynamic and ventilation problem starts with it. Lift on a wing is proportional to ρ. Drag is proportional to ρ. The mass-flow of air through a duct or a carburettor is proportional to ρ. The cooling power of a fan, the buoyancy of a hot-air balloon, the sound speed in a room — all of them depend on how much mass the surrounding air carries per unit volume. Get ρ wrong by a few per cent and every downstream calculation inherits the error.
Three numbers determine air density: the absolute temperature, the total atmospheric pressure, and the amount of water vapour mixed in. The first two come from a thermometer and a barometer. The third is usually reported as relative humidity, a percentage of the saturation value at that temperature, and is what makes the calculation slightly more interesting than plugging numbers into PV = nRT.
The formula in plain English
Moist air is treated as a mixture of two ideal gases — dry air and water vapour — that happen to share the same volume. Each gas pushes on the walls with its own partial pressure, and the two partial pressures add up to the total pressure you measure with a barometer. That is Dalton's law of partial pressures, and it lets us write the density as a simple sum:
ρ = p_d / (R_d · T) + p_v / (R_v · T)
Here p_d is the partial pressure of dry air, p_v is the partial pressure of water vapour, T is the absolute temperature in kelvin, and R_d = 287.058 J/(kg·K) and R_v = 461.495 J/(kg·K) are the specific gas constants for dry air and water vapour respectively. The values come from the CIPM-2007 standard and the NIST CRC Handbook; they are not adjustable parameters.
The only piece left is the vapour partial pressure. Relative humidity is defined as the ratio of the actual vapour pressure to the saturation vapour pressure at the same temperature:
p_v = (RH / 100) · p_sat(T)
and the saturation vapour pressure over liquid water follows the Tetens / Magnus form, accurate to better than 0.1 % between 0 °C and 60 °C:
p_sat = 610.78 · exp(17.27 · T_c / (T_c + 237.3)) [Pa]
Once you know p_v, the dry-air partial pressure is whatever is left over: p_d = P − p_v, where P is the total pressure. Plug the three terms into the mixture formula and you have ρ. The air density calculator does exactly this arithmetic, but the steps are simple enough to verify on paper.
Worked example you can verify by hand
Take a comfortable room: 20 °C, 1013.25 hPa, 50 % relative humidity. Convert the temperature to kelvin first — T = 20 + 273.15 = 293.15 K — and the pressure to pascal, P = 101 325 Pa.
Saturation vapour pressure at 20 °C:
p_sat = 610.78 · exp(17.27 · 20 / (20 + 237.3)) ≈ 2 338.5 Pa
Actual vapour pressure at 50 % RH:
p_v = 0.50 · 2 338.5 ≈ 1 169.3 Pa
Dry-air partial pressure:
p_d = 101 325 − 1 169.3 ≈ 100 155.7 Pa
Now the two density terms:
ρ_d = 100 155.7 / (287.058 · 293.15) ≈ 1.1902 kg/m³ ρ_v = 1 169.3 / (461.495 · 293.15) ≈ 0.0086 kg/m³
Adding them gives ρ ≈ 1.1988 kg/m³ — the value tabulated in the Engineering Toolbox and the ASHRAE Handbook of Fundamentals to four decimal places. As a second check, drop the humidity to 0 % at 15 °C and 101 325 Pa and the calculator returns ρ = 1.2250 kg/m³, the ICAO standard-atmosphere sea-level density used in every aerodynamics textbook. If the air density calculator gives you a number wildly different from these benchmarks at similar inputs, the most likely culprit is unit confusion in the pressure field — see the common mistakes section below.
Factors that affect air density
Temperature
Temperature is the most important everyday driver. Air density is inversely proportional to absolute temperature: warming air from 273 K to 313 K (0 °C to 40 °C) — a fairly extreme outdoor range — cuts density by about 13 %. The effect compounds in engineering systems because a hot engine bay or a sun-exposed roof void can sit 20 K above ambient, putting the local air density well below the design value. If you only have one thermometer reading, use the local air temperature, not the wall or surface temperature. Convert °F or K to °C with the temperature converter before entering it into the calculator.
Pressure
Density scales linearly with total pressure, so a 1 % rise in pressure produces a 1 % rise in density at fixed temperature. The two dominant sources of pressure variation are weather (synoptic-scale highs and lows shift sea-level pressure by roughly ±30 hPa, ±3 %) and altitude (pressure falls about half for every 5.5 km of altitude). For ground-level work the weather component is what catches you out — a deep low at 980 hPa drops sea-level density by about 3 % relative to the long-term average, and an aircraft on the runway in a tropical low can be missing 5 % of its design air mass. Always enter the local station pressure rather than 1013 hPa unless you genuinely want the standard-atmosphere value. The pressure converter will move you between Pa, kPa, hPa, mbar, atm, psi and inHg, and the bar to psi converter handles the common gauge units used in compressed-air work.
Humidity
The humidity effect is small but it has a sign that surprises people. Each water molecule is lighter than the average air molecule, so adding water vapour at fixed temperature and pressure makes the air less dense, not more. At 30 °C and 100 % RH the density is about 1.5 % lower than dry air at the same T and P — small but enough to matter for fuel-air ratios in engines and for lift calculations on hot tropical days. The related dew point calculator converts between RH and dew point if you only have the dew point reported in a weather observation, and the heat index calculator gives you the apparent-temperature equivalent for comfort work. To understand why the molecular mass argument works, try the molecular weight calculator on H₂O (18 g/mol) and on N₂ and O₂ (28 and 32 g/mol respectively) — the lightness of water vapour drops out immediately.
Altitude
Altitude is not an independent variable in the formula — it enters through pressure and, to a lesser extent, temperature. But it is worth treating as a factor because the combined effect is large and counter-intuitive. At 1 000 m elevation the ambient pressure is roughly 900 hPa and the average temperature is about 8 K cooler than at sea level; together they drop density to around 1.11 kg/m³, a 9 % reduction. At 3 000 m (Mexico City, La Paz airport, Andean roads) density is roughly 0.95 kg/m³, a 22 % reduction, which is why naturally aspirated cars and aircraft lose so much power at altitude. Aviation collapses pressure and temperature into one number called density altitude — the altitude in the ICAO standard atmosphere at which the density matches the local value — but the underlying physics is exactly the mixture formula above.
Standard reference values worth memorising
A few benchmark numbers are useful for sanity-checking any density result. Dry air at 0 °C and 101 325 Pa is 1.2922 kg/m³. Dry air at 15 °C and 101 325 Pa is 1.2250 kg/m³ — the ICAO standard. Dry air at 20 °C and 101 325 Pa is 1.2041 kg/m³. Humid air at 25 °C, 1013 hPa and 60 % RH is about 1.177 kg/m³. Humid air at 40 °C, 1013 hPa and 80 % RH is about 1.110 kg/m³. At the top of Mount Everest (about 330 hPa, −30 °C) the density is roughly 0.47 kg/m³ — about a third of sea level, which is the proximate reason climbers need supplemental oxygen and helicopters cannot hover at the summit. The air density calculator reproduces every one of these values to four significant figures.
Common mistakes
Mixing pressure units. The single most common error is entering kPa where the field expects hPa, or vice versa. A reading of 101.325 typed into an hPa field gives a density 10 times too low; 1013 typed into a kPa field gives a density 10 times too high. Look at the magnitude of the result — anything outside 0.1 – 5 kg/m³ for ground-level air almost certainly means a unit slip.
Using sea-level pressure at altitude. METAR reports give both station pressure (QFE) and sea-level adjusted pressure (QNH). For density calculations you want the station pressure — the actual local pressure — not the sea-level adjusted figure. Using QNH at altitude over-estimates density by exactly the amount that the pressure correction adds.
Forgetting that RH is temperature-dependent. A relative humidity of 80 % at 5 °C and 80 % at 30 °C represent very different absolute amounts of water vapour, because the saturation vapour pressure rises exponentially with temperature. Always pair RH with the temperature it was measured at; do not carry an RH from a cold morning into a hot afternoon calculation. The dew point calculator is the safer pivot here, because dew point is the temperature-invariant measure.
Treating wind as a density modifier. Wind moves air but does not, by itself, change its density at a given temperature, pressure and humidity. Wind cools surfaces through convection — which is what the wind chill calculator captures — but the density of the moving air is still set by the same three thermodynamic inputs.
When the simple model stops working
The mixture formula above is excellent between 0 °C and 60 °C at near-atmospheric pressure, which covers almost all everyday engineering. Outside that envelope, three things start to matter. Below freezing, water vapour is in equilibrium with ice rather than liquid water, and the Tetens form for p_sat drifts by a few per cent — use the Goff-Gratch or Murphy-Koop formula for sub-zero work. Above about 60 °C the Tetens form under-predicts p_sat and the error grows quickly; for steam-system or boiler calculations switch to the IAPWS-IF97 formulation. At very high pressure — compressors, supersonic wind tunnels, deep-mine ventilation shafts — air stops behaving ideally and you need a real-gas equation of state with a compressibility factor Z. None of this changes the sanity-check logic: enter your numbers in the air density calculator, compare the result to the standard-atmosphere benchmark for similar conditions, and ask whether the deviation makes physical sense.
Where this number ends up downstream
Air density appears as ρ in the drag equation (F_d = ½ · ρ · v² · C_d · A), the lift equation (F_L = ½ · ρ · v² · C_L · A), the speed-of-sound expression (c = √(γ · R · T)), the mass-flow equation through a duct (ṁ = ρ · v · A) and the Reynolds number that decides whether a flow is laminar or turbulent. In each one a 5 % error in ρ produces a 5 % error in the answer — or worse, when the density appears squared (some compressor work) or under a square root (sound-speed shifts in altitude microphones). Getting the input right is the cheap part. Use the air density calculator with the actual local temperature, station pressure and humidity, not the standard-atmosphere defaults, and the rest of the calculation has at least a chance of matching reality.
Frequently asked questions
What is the density of air at sea level?
The ICAO International Standard Atmosphere defines sea-level air at 15 °C and 101 325 Pa as dry air with density 1.2250 kg/m³ exactly. Real-world humid air at 20 °C, 1013 hPa, 50 % relative humidity is slightly lower — about 1.199 kg/m³ — because water vapour is less dense than the dry-air mixture it displaces. Engineering tables often use 1.225 kg/m³ as a round-number reference, but for any specific location and time of day the value will differ by several per cent.
Why is humid air less dense than dry air?
A water molecule (H₂O, molar mass 18.0 g/mol) is lighter than the average air molecule (about 28.96 g/mol). At a fixed temperature and total pressure, every water-vapour molecule that joins the mixture displaces a heavier dry-air molecule, so the overall mass per unit volume falls. This catches a lot of people out because the everyday word "muggy" suggests thick, heavy air, but the physics goes the other way — humid air really is lighter.
Which formula does the calculator use?
The ideal-gas humid-air mixture: ρ = p_d/(R_d·T) + p_v/(R_v·T), where R_d = 287.058 J/(kg·K) is the specific gas constant for dry air and R_v = 461.495 J/(kg·K) is the specific gas constant for water vapour. The saturation vapour pressure comes from the Tetens / Magnus equation p_sat = 610.78·exp(17.27·T_c / (T_c + 237.3)) Pa. For typical meteorology and ventilation work between 0 °C and 60 °C this is accurate to about 0.1 %. For metrological work, swap in the full CIPM-2007 formula with compressibility corrections.
What units should I enter for pressure?
Hectopascals (hPa), which are numerically identical to millibar (mbar). Standard sea-level pressure is 1013.25 hPa = 1013.25 mbar = 1 atm. If your barometer reads inches of mercury, multiply by 33.8639 to get hPa; if it reads kilopascals, multiply by 10; if it reads psi, multiply by 68.9476 — or use the pressure converter on this site to do it for you.
Does altitude change air density?
Strongly, because atmospheric pressure falls roughly exponentially with height. To use the calculator at altitude, enter the local ambient pressure (from a barometer or the station-level METAR), not 1013 hPa. At 2 000 m the typical ambient pressure is about 795 hPa, which on its own drops the density by roughly 21 %. Aviation uses a derived metric called "density altitude" — the altitude in the standard atmosphere with the same density as the local air — to capture the combined effect of pressure, temperature and humidity in a single number.
How does air density affect aviation, motorsport and HVAC sizing?
Lift, drag, propeller thrust and the power output of a naturally aspirated engine all scale with air density. A hot, humid, high-altitude day can cut take-off thrust by 10–15 % and runway performance by even more. Drag-racing teams adjust jetting and gear ratios based on the same number, sometimes called the "air density grain." Building services engineers use it to size ventilation ducts, because a duct rated for 1.225 kg/m³ air will move less mass-flow on a hot summer day when the density may be only 1.13 kg/m³.
Why does the calculator return dry-air and vapour densities separately?
Because the breakdown is the easiest sanity check. The vapour contribution should be a small fraction of the total — typically 0.5 % to 1.5 % at room temperature and moderate humidity. If the vapour density comes back larger than the dry-air density, the inputs are wrong (humidity above 100 %, temperature far outside the Tetens valid range, or pressure entered in the wrong unit). Showing both terms makes it obvious when something has gone sideways.
When does the simple model stop working?
Below 0 °C the Tetens / Magnus form for water-vapour saturation drifts because the surface is now ice, not liquid water — use the Goff-Gratch or Murphy-Koop formula instead. Above about 60 °C the form starts to under-predict p_sat. At very high pressure (compressors, supersonic wind tunnels) the ideal-gas assumption itself breaks down and you need a real-gas equation of state. For most building-services, meteorology and aviation work between 0 °C and 50 °C, the assumptions hold to better than 1 %.
Informational only. Not personalised financial, legal, or tax advice.