This molar mass calculator gives the molecular weight in g/mol of any chemical formula you type. It reads nested brackets such as Ca(OH)2 and K4[Fe(CN)6], and hydrates written with a dot, star or period such as CuSO4·5H2O, then shows how many atoms of each element there are, the mass each contributes and the percent composition by mass. It uses IUPAC standard atomic weights for all elements up to lawrencium. Students checking homework and lab staff preparing reagents can paste or drop a list of formulas and every one is calculated at once, ready to download as CSV. It is free, runs entirely in your browser, and nothing you type is sent to a server. Element symbols are case-sensitive, so Co is cobalt while CO is carbon monoxide.
| Compound | Formula | g/mol |
|---|---|---|
| Sodium chloride | NaCl | 58.44 |
| Potassium chloride | KCl | 74.55 |
| Sodium hydroxide | NaOH | 40.00 |
| Glucose | C6H12O6 | 180.16 |
| Calcium chloride dihydrate | CaCl2·2H2O | 147.01 |
| Magnesium sulfate heptahydrate | MgSO4·7H2O | 246.47 |
| Copper sulfate pentahydrate | CuSO4·5H2O | 249.68 |
| Sulfuric acid | H2SO4 | 98.07 |
Multiply each element's atomic weight by how many atoms of it are in the formula, then add them up. Water is 2 × 1.008 + 15.999 = 18.015 g/mol.
Use a dot, star or period before the water, such as CuSO4·5H2O, CuSO4*5H2O or CuSO4.5H2O.
Numerically yes: molar mass in g/mol equals the molecular (formula) weight in daltons.
Element symbols start with a capital letter. CO is carbon and oxygen; Co is cobalt.
No. All calculations run in your browser.
The formula is parsed left to right into element symbols (a capital letter and an optional lowercase letter) with optional counts. Groups in (), [] or {} can be nested and multiplied by the number after the closing bracket. Hydrates and adducts are split on ·, * or a period, and each part can start with a coefficient, so CuSO4·5H2O adds five waters. Each element's count is multiplied by its IUPAC standard atomic weight (abridged values, with the longest-lived isotope's mass number for elements that have no stable isotope) and summed for the molar mass in g/mol. Mass percent composition is each element's share of that total.