# Tutorial: air density calculation

## Theory behind air density calculation

Physical properties of air can be represented by the real gas equation, which is the modified version of ideal gas equation.

PV = ZnRT

where, Z is the compressibility factor for air
P, V & T are: pressure, volume and temperature of the gas
n: number of moles
R: Universal gas constant

This equation can be further modified to derive an equation for air density.

Since, n = Weight / Moleculat Wt = W/M
PV = Z (Wt/MW) RT
P(MW) / ZRT = Wt/V

But Wt/V = weight / volume = mass per unit volume = ρ, i.e. density (kg/m3, gm/cm3)

So we get the equation for gas density,

Gas / Air density = ρ = P(MW) / ZRT

## Sample calculation

Let's try this equation to calculate the density of air at standard temperature and pressure conditions.

Standard T&P (STP) as per IUPAC,

Standard pressure (P) = 100 kPa
Standard temperature (T) = 0 0C
Air Molecular weight (MW) = 28.85 gm/mol
Universal gas constant (R) = 8.314 J/K·mol
Air compressibility factor (Z) = 0.8777

Refer this table to get air compressibility factor at given temperature and pressure. Alternatively, you can also use this calculator when working with natural gas.

Using the equation from above,

Air density at STP = ρ = P×MW/(Z×R×T) = 100×1000×(28.85/1000)/(0.8777×8.413×(273.16+0))
Air density at STP (ρ) = 1.4304 kg/m3

You can use this same equation to calculate the density for any real gas when you know its molecular weight and the compressibility (Z) factor.

## Standard air density

Often, you can choose to work with standard temperature and pressure conditions when performing engineering calculations which involve gas volume or volumetric flow rate.

Even for air, standard density is widely used for engineering calculations. As we saw in the sample calculation earlier in this post, standard air density at IUPAC STD conditions is - 1.4304 kg/m3

For other standard conditions, you can quickly get the standard air density values from the table over here.