## 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/m^{3}, gm/cm^{3})

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 ^{0}C

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/m ^{3}**

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.

## Tools for air density calculation

- For quick calculations, use this air density calculator to get a quick estimate based on temperature and pressure.
- For a more accurate calculation of air density, you would also need to use the correct molecular weight based on air composition and compressibility factor which you can estimate from this table.
- Refer to this sample calculation of air compressibility factor as a quick-start guide.

## 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/m ^{3}**

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