# How do you find density in the ideal gas law?

The original ideal gas law uses the formula PV = nRT, the density version of the ideal gas law is PM = dRT, where P is pressure measured in atmospheres (atm), T is temperature measured in kelvin (K), R is the ideal gas law constant 0.0821 $\frac{a t m \left(L\right)}{m o l \left(K\right)}$ just as in the original formula, but M is now the molar mass ($\frac{g}{m o l}$) and d is the density ($\frac{g}{L}$).
By rearranging the formula to $\frac{P M}{R T} = d$ the units of atm, mol and K will cancel and the value will be left with the $\frac{g}{L}$ units for density.