Molecular Weight Calculator

A compound's molecular weight is the sum of the atomic masses of all its atoms — a fundamental value used in chemistry for unit conversions, solution preparation, and stoichiometry calculations. Enter a chemical formula (e.g. H2O, Ca(OH)2, C6H12O6) into the Molecular Weight Calculator to get the molecular weight in g/mol. Secondary outputs include the number of elements and total atom count in the formula.

Enter the molecular formula using standard element symbols. Use parentheses for groups, e.g. Ca(OH)2. Subscript numbers follow the element or closing parenthesis.

Results

Molecular Weight

--

Number of Elements

--

Total Atom Count

--

Results Table

More Chemistry Tools

Frequently Asked Questions

What is molecular weight and how is it calculated?

Molecular weight (also called molar mass) is the sum of the atomic weights of all atoms in a molecule, expressed in grams per mole (g/mol). To calculate it, identify each element in the formula, multiply its atomic weight by the number of times it appears, and add all the results together. For example, water (H2O) = 2×1.00794 + 1×15.9994 = 18.0153 g/mol.

How do I enter a chemical formula with parentheses?

Use standard chemical notation — type the element symbol followed by a subscript number, and wrap groups in parentheses. For example, calcium hydroxide is Ca(OH)2, and aluminum sulfate is Al2(SO4)3. The calculator expands the parenthetical groups automatically before computing the molecular weight.

What atomic weights does this calculator use?

This calculator uses standard atomic weights as recommended by IUPAC and widely published in chemistry references. Values are based on the naturally occurring isotope distribution for each element (e.g. H = 1.00794, C = 12.0107, O = 15.9994).

What is the difference between molecular weight and molar mass?

The terms are often used interchangeably in practice. Molecular weight strictly refers to the mass of a single molecule in atomic mass units (amu), while molar mass refers to the mass of one mole of a substance in g/mol. Numerically, they are equal — for example, CO2 has a molecular weight of 44.0095 amu and a molar mass of 44.0095 g/mol.

How can I use molecular weight in molarity calculations?

Molar mass is essential for converting between grams and moles. The relationship is: moles = mass (g) ÷ molar mass (g/mol). For molarity, use: molarity (mol/L) = moles of solute ÷ volume of solution (L). So if you dissolve 18 g of NaCl (MW ≈ 58.44 g/mol) in 1 L of water, the molarity is approximately 0.308 mol/L.

Does this calculator support hydrated compounds?

Yes. You can enter hydrated compounds by treating the water molecule as part of the formula. For example, copper sulfate pentahydrate (CuSO4·5H2O) can be entered as CuSO4H10O5, which combines the atoms from both components. Support for dot notation (e.g. CuSO4.5H2O) depends on the tool version.

Why do element symbols need to be capitalized correctly?

Chemical element symbols are case-sensitive by convention. The first letter is always uppercase and the second (if present) is always lowercase. For example, 'Co' is Cobalt but 'CO' would be parsed as Carbon + Oxygen. Always use proper capitalization — e.g. Na (Sodium), Fe (Iron), Mg (Magnesium) — to get correct results.

What is the mass percentage of each element in a compound?

The mass percentage of an element is its contribution to the total molecular weight, expressed as a percentage. It is calculated as: mass % = (number of atoms × atomic weight) ÷ molecular weight × 100. For example, in H2O the oxygen mass % = (1 × 15.9994) ÷ 18.0153 × 100 ≈ 88.81%. The breakdown table in this calculator shows this for each element.