Air density is a way of expressing the mass of air per unit of volume. The density of air at lower altitudes is higher than that at higher altitudes, and air density can also be affected by temperature and humidity. Air density is an important value to consider in applications such as aircraft design or the aerodynamics of vehicles. The following steps will explain how to calculate air density.
Use the Ideal Gas Law: P_V = n_R*T where: P = pressure V = volume n = number of moles R = gas constant T = temperature
Substitute density into the Ideal Gas Law equation: D (Density) = n/V D = P/R_T where: D = density P = pressure R = gas constant = gas constant , J/(kg_degK) = 287.05 for dry air T = temperature
Substitute the applicable numerical values into the equation and solve for density.
Here is an example from "Calculators for Density Altitude and Engine Tuning": Use the ISA standard values for conditions at sea level. P = 101325 Pa T = 15 deg C The air density is calculated to be: D = (101325) / (287.05 * (15 + 273.15)) = 1.2250 kg/m3
TL;DR (Too Long; Didn't Read)
Humidity in the air is actually a factor that would decrease the air density value.