Molar Mass of Molecules

Calculate the molar mass of a molecule:

The notation for the chemical formula is a little funky: you put the element symbol and then the number of atoms separated by a colon; each element/number of atoms pair are separated by commas, so sodium chloride (NaCl) would be “Na:1,Cl:1“.

This will have to do until I can write something to parse the regular chemical formula notation.

On the plus side, you can link to a specific molecular mass calculation by adding the formula to the url. So magnesium chloride (MgCl2) can be found with this url:

https://soriki.com/js/chem/chem_db/molecular_mass.html?formula=Mg:1,Cl:2