| THEORY & FORMULAE |
The molar mass (M) is the number of grams in one mole of a substance.
It is easy to calculate the molar mass of a substance if you know its formula – you simply add up the atomic masses of all of its component atoms. But if the substance is unknown you have no formula to work with, so you perform some measurements. Thus if the volume and weight of gas are measured at any given pressure and temperature, it is possible to estimate the molar mass and density, via the ideal gas law. Starting from the ideal gas law equation:
     PV = nRT
the following relations can be derived:
     M = wRT/PV
     d = MP/RT
where
     P = gas pressure
     V = gas volume
     R = universal gas constant [=0.0821 L.atm.K-1.mol-1]
     n = number of moles of gas
     T = temperature [° K]
     w = mass of gas
     M = molar mass of gas at STP
     d = gas density at STP [air density = 3.21 gm/litre]
◊ Use link
EXAMPLE Of Input/Output
to demo data entry expectations and results; you may edit & use it as starting point