you would have to divide the mass by the molecular weight of the gas molecules to get the number of moles. Then multiply this by 22.4 Liters / mole to get the volume. For example, if you have 96 g of O2, then you can divide by the molecular weight of O2, which is 32 g/mol, to get 3 moles.