How molar mass is worked out
Count the atoms of each element in the formula, multiply each count by that element’s standard atomic weight, and add them up. For water, H2O, that is 2 × 1.008 + 15.999 = 18.015 g/mol. A number after a bracket multiplies everything inside it, so Ca(OH)2 has two oxygens and two hydrogens.
Hydrates and ions
A hydrate like copper sulfate pentahydrate, CuSO4·5H2O, includes the water locked in its crystals: the 5 multiplies the whole H2O. For an ion, the charge changes the mass by the mass of the electrons gained or lost, which is tiny but included. Elements with no stable isotopes use the mass number of their longest-lived isotope, so the result is marked as approximate.
Percent composition and moles
The share column is the mass percent of each element, the figure used to find empirical formulas from lab results. Type grams to get moles, or moles to get grams; moles are grams divided by the molar mass. Everything is worked out in your browser.