What is the formula for the density of gases?
If you just want to measure it, all you need is the mass of the gas
inside the container and the volume of the container
Density = mass / volume
In general, the density of a gas depends on several things: the
molecular weight of the gas, the temperature, and the pressure. For
an ideal gas, the following equation holds:
P*V = n*R*T
where P is the pressure (in atmospheres, ATM), V is the volume
(in liters, L), n is the number of moles, R is the gas constant (R
= 0.0820574587 L ATM K-1 mol-1), and T is the temperature (in
The density of a gas is the number of grams per volume (usually
in g/mL or kg/L). Taking the molar mass (MM) of a substance and
multiplying it times the number of moles gives the number of grams.
Therefore for an ideal gas, using that fact and rearranging the
equation above, we have:
Density = (n*MM)/V = (P*MM)/(R*T)
Make sure your units agree in any and all calculations!