Molar Mass Calculator

Type a formula like Ca(OH)2 or CuSO4.5H2O and get grams per mole with a full percent composition breakdown.

Case-sensitive: Co is cobalt, CO is carbon monoxide. Parentheses and hydrate dots are supported.

Standard atomic weights (IUPAC 2021) to four decimal places. They are natural-abundance averages, which is why they are not whole numbers.

How the calculator reads a chemical formula

Molar mass is nothing more than a weighted sum: count how many atoms of each element the formula contains, multiply each count by that element's standard atomic weight, and add everything up. The result carries units of grams per mole, so 18.015 g/mol means one mole of the substance weighs 18.015 grams on the balance. The only difficulty is counting atoms correctly, which is where parentheses and hydrate dots trip people up.

The parser here reads left to right. A capital letter starts an element symbol, any lowercase letters that follow belong to it, and digits after a symbol are its subscript. Capitalisation is not decoration: Co is cobalt at 58.9332, while CO is carbon monoxide at 28.010. If you type an unknown symbol the tool names it back to you instead of silently ignoring it, because a quietly dropped atom is a wrong answer that looks right.

Worked example: H2O

Two hydrogens at 1.0080 give 2.016. One oxygen contributes 15.999. Total: 18.015 g/mol. The composition table shows hydrogen at 11.19 percent and oxygen at 88.81 percent by mass, which surprises students who expect the element with more atoms to dominate the mass. Counting atoms and weighing mass are different questions.

Worked example: Ca(OH)2

The subscript outside the bracket multiplies everything inside it. Calcium hydroxide is one calcium plus two oxygen and two hydrogen, not one of each. Calcium contributes 40.078, oxygen 2 x 15.999 = 31.998, hydrogen 2 x 1.008 = 2.016, giving 74.092 g/mol. Miss the bracket and you get 57.085, a 23 percent error that will quietly wreck a titration. Nested brackets work the same way, so a formula such as Ca3(PO4)2 or Al2(SO4)3 needs no special handling.

Worked example: CuSO4.5H2O

Copper sulfate pentahydrate is the classic hydrate. The dot is a separator, and the number after it multiplies the whole fragment that follows: five waters at 18.015 add 90.075 g/mol on top of the anhydrous 159.602, for 249.677 g/mol in total. Water is therefore 36.1 percent of the crystal mass. This is why a recipe calling for 10 g of the pentahydrate is not satisfied by 10 g of the blue-white anhydrous powder, and why gently heated crystals lose more than a third of their weight. Both the full stop and the middle dot are accepted, so pasting a formula straight from a datasheet works.

Percent composition in real stoichiometry

Percent composition is the bridge between a formula on paper and a number on a balance. Three common uses come up in coursework and in the lab. First, purchasing and dosing: ammonium nitrate, NH4NO3 at 80.043 g/mol, is 35.00 percent nitrogen by mass, which is exactly how fertiliser grades are quoted. Second, empirical formula work: take a combustion analysis result in percent, divide each percent by that element's atomic weight, and the smallest whole-number ratio of those quotients is the empirical formula. Third, checking your own arithmetic — if your calculated percentages do not sum to 100, an atom went missing somewhere.

A one-minute mole refresher

A mole is 6.02214076 x 10^23 particles, a count rather than a mass, in the same way that a dozen is twelve of anything. The point of the mole is that reactions happen in whole-number particle ratios while balances read grams, and molar mass is the exchange rate between the two. Two conversions cover nearly everything: moles = grams divided by molar mass, and grams = moles multiplied by molar mass. To prepare 250 mL of 0.100 M sodium chloride you need 0.0250 mol, and at 58.440 g/mol that is 1.461 g weighed out and made up to the mark.

Limitations worth knowing

The values here are standard atomic weights, meaning natural-abundance averages. If you are working with isotopically enriched or depleted material, deuterated solvents or heavy water, the average is wrong for your sample and you should use isotopic masses instead. Elements with no stable isotope, such as technetium or the superheavy elements, are listed at the mass number of their most stable isotope, which is a convention rather than a measurement. Finally, molar mass says nothing about purity: a reagent bottle labelled 98 percent needs its own correction factor before the weight you calculate here means what you think it means.

Sources & further reading

Frequently asked questions

What is the difference between molar mass, molecular weight and formula weight?

Numerically they are the same figure for a given formula. Molecular weight is a relative mass with no units and applies to molecules; formula weight does the same job for ionic compounds such as NaCl, which have no discrete molecules. Molar mass is that number given units of grams per mole, and it is what you actually weigh out in the lab.

Why are atomic weights not whole numbers?

Almost every element occurs as a mixture of isotopes, and the standard atomic weight is the abundance-weighted average of them. Chlorine sits at 35.45 because natural chlorine is roughly 76 percent chlorine-35 and 24 percent chlorine-37. Only single-isotope elements land near whole numbers, and even carbon is 12.011 rather than 12 because of the carbon-13 present in nature.

How do I convert grams to moles with this result?

Divide the mass you have by the molar mass: moles = grams / (g/mol). If you weigh 25 g of NaCl and the calculator returns 58.440 g/mol, that is 25 / 58.440 = 0.428 mol. To go the other way, multiply: 0.25 mol of glucose at 180.156 g/mol needs 45.04 g on the balance.

How do I enter hydrates like copper sulfate pentahydrate?

Write the dot as a full stop or a middle dot: CuSO4.5H2O and CuSO4·5H2O both work. The number after the dot multiplies everything that follows it, so the five waters contribute 5 x 18.015 = 90.075 g/mol of the 249.677 g/mol total. Leave the dot out and you get the anhydrous salt instead, which is a common source of weighing errors.