Formulas are case-sensitive: Co is cobalt, CO is carbon monoxide. Use parentheses for groups and a dot or * for hydrates.

How the calculation works

Molar mass is the mass of one mole of a substance. The calculator counts each element in your formula, multiplies by its standard atomic weight, and adds the results. Percent composition is each element’s share of that total.

Example: water, H2O, has two hydrogens (2 × 1.008) and one oxygen (15.999), so its molar mass is 18.015 g/mol. Atomic weights are rounded standard values, which is what most textbooks and lab courses use.

Worked example: calcium hydroxide, Ca(OH)₂

Ca(OH)₂ has 1 Ca, 2 O and 2 H, because the subscript 2 outside the parentheses multiplies everything inside. Using standard atomic weights: Ca 40.078 + O 2 × 15.999 + H 2 × 1.008 = 40.078 + 31.998 + 2.016 = 74.092 g/mol.

Percent composition by mass: calcium is 40.078 ÷ 74.092 × 100 = 54.09%. To convert 10.0 g to moles, divide by the molar mass: 10.0 g ÷ 74.092 g/mol = 0.135 mol.

Frequently asked questions

Is molar mass the same as molecular weight?

They are the same number with different units. Molar mass is in grams per mole (g/mol); molecular or formula weight is in atomic mass units (amu or Da). Water is 18.015 g/mol and 18.015 amu.

How do I enter a hydrate like CuSO₄·5H₂O?

Type it with a dot or an asterisk, like CuSO4·5H2O or CuSO4*5H2O. The 5 multiplies the whole water molecule, giving 159.60 + 5 × 18.015 = 249.68 g/mol.

Why is my answer slightly different from my textbook?

Books round atomic weights differently (Cl is 35.45 or 35.453, for example), which changes the last decimal place. Use the values your course uses for graded work, and keep extra digits until the final step.

Does capitalization matter?

Yes. Co is cobalt and CO is carbon monoxide. Each element symbol starts with a capital letter, and a second letter, if any, is lowercase.