calc-hub logocalc-hub.net

Molecular Weight Calculator

Get the molar mass of a chemical formula in g/mol, with brackets and hydrates, for the 84 elements that have a standard atomic weight. It adds the atomic weight of every atom, so Ca(OH)2 counts two oxygens and two hydrogens, and it shows the mass each element adds and its percent of the total, which is the percent composition by mass.

Takes the 84 elements with a standard atomic weight, hydrogen to uranium. Tc, Pm, Po to Ac and every element past U have none and get a message.

How to use the Molecular Weight Calculator

  1. Type the formula in the Chemical Formula field with the capitals the symbols need, such as H2O or NaCl. Capitals matter: CO is carbon and oxygen, Co is cobalt.
  2. Put a group in round or square brackets and write its multiplier after the closing bracket, as in Al2(SO4)3 or K4[Fe(CN)6]. Brackets can sit inside brackets.
  3. For a hydrate, add a dot and the water part, as in CuSO4·5H2O. An asterisk works as the dot, and so does a period between a compound and water, so CuSO4.5H2O and CuSO4*5H2O read the same.
  4. Press the Calculate button. To try another formula, change the field and press the button again.
  5. Read the molecular weight in g/mol. Under it, each element is listed with its atom count, the mass it adds and its percent of the total.

The molecular weight calculation

Molar mass = sum of (atomic weight × number of atoms) over every element in the formula · · · Percent of an element = its mass in the formula ÷ molar mass × 100

The calculator counts the atoms of each element first. A multiplier after a bracket applies to everything inside it, so Al2(SO4)3 holds 2 Al, 3 S and 12 O. A number after a hydrate dot multiplies the whole part that follows, so CuSO4·5H2O holds 1 Cu, 1 S, 9 O and 10 H. Then it multiplies each count by the atomic weight in its table and adds the products. Counts are whole numbers, so a decimal count such as H2.5O gets a message. The calculator rounds the result to three decimals. Its table holds the values of the Abridged Standard Atomic Weights 2024 of CIAAW, the IUPAC Commission on Isotopic Abundances and Atomic Weights, read on November 3, 2026.

Worked example

Type Ca(OH)2 and press Calculate. The calculator shows 74.092 g/mol. Element Breakdown reads Ca × 1 with 40.078 g/mol, O × 2 with 31.998 g/mol and H × 2 with 2.016 g/mol. For the hydrate CuSO4·5H2O it shows 249.677 g/mol, made of Cu × 1 with 63.546 g/mol, S × 1 with 32.060 g/mol, O × 9 with 143.991 g/mol and H × 10 with 10.080 g/mol. The formula the field starts with, H2O, gives 18.015 g/mol. Percent composition: in Ca(OH)2, calcium is 40.078 ÷ 74.092 × 100 = 54.092%, oxygen 43.187% and hydrogen 2.721%. Water is 11.191% hydrogen and 88.809% oxygen by mass.

Molar mass of eleven formulas, brackets and hydrates included

Each row is what the calculator prints for that formula.

Molecular weight examples
FormulaAtoms countedMolecular weight
H2O2 H, 1 O18.015 g/mol
C6H12O66 C, 12 H, 6 O180.156 g/mol
H2SO42 H, 1 S, 4 O98.072 g/mol
Ca(OH)21 Ca, 2 O, 2 H74.092 g/mol
Al2(SO4)32 Al, 3 S, 12 O342.132 g/mol
Mg3(PO4)23 Mg, 2 P, 8 O262.855 g/mol
(NH4)2SO42 N, 8 H, 1 S, 4 O132.134 g/mol
K4[Fe(CN)6]4 K, 1 Fe, 6 C, 6 N368.345 g/mol
Fe4[Fe(CN)6]37 Fe, 18 C, 18 N859.239 g/mol
CuSO4·5H2O1 Cu, 1 S, 9 O, 10 H249.677 g/mol
Na2CO3·10H2O2 Na, 1 C, 13 O, 20 H286.138 g/mol

Frequently asked questions

How do I find the percent composition of a compound?

Type the formula and press Calculate. The breakdown gives each element's percent of the molar mass: the mass it adds, divided by the total, times 100. For CuSO4·5H2O that reads Cu 25.451%, S 12.841%, O 57.671% and H 4.037%. This is percent by mass, from standard atomic weights. It is not an isotope percentage, which this page does not show. Each figure is rounded on its own, so the column can add up to a little over or under 100%.

How do I enter a formula with brackets, such as Ca(OH)2?

Type it as written, brackets included. The number after the closing bracket multiplies everything inside, so for Ca(OH)2 the calculator counts 1 Ca, 2 O and 2 H and shows 74.092 g/mol. Square brackets and brackets inside brackets work the same way: K4[Fe(CN)6] gives 368.345 g/mol.

Can the molecular weight calculator handle hydrates such as CuSO4·5H2O?

Yes. Type the dot as · or as an asterisk, then the water part. The number after the dot multiplies the whole part, so CuSO4·5H2O counts 1 Cu, 1 S, 9 O and 10 H and comes to 249.677 g/mol. A period also works when water follows a compound, as in CuSO4.5H2O, and the result shows the formula with the dot it read. Anything else gets a message, because H2.5O, C1.5H2O and CaSO4·1.5H2O hold a decimal count and the calculator has none.

Which elements does the molecular weight calculator know?

The 84 elements with a value in the CIAAW table, from hydrogen to uranium. CIAAW gives no standard atomic weight for Tc, Pm, Po, At, Rn, Fr, Ra, Ac or any element past uranium, so a formula with one of those gets a message instead of a result. The total never leaves an element out.

Why does the calculator reject my formula?

It refuses a formula it cannot read in full and never adds up only the part it understands. A letter gets a message when it is lowercase where a symbol should start, as in h2o, when the symbol is not an element, or when the element has no standard atomic weight. Brackets get one when they are empty, left open, closed without being opened or closed with the other kind. A number gets one at the start of the formula, as in 2H2O, right after an opening bracket, when a count is 0 or starts with 0, or when a count is above 1,000,000. A hydrate dot needs a formula on both sides and cannot sit inside brackets. The calculator also refuses a space and any other character, such as the + of a charge. The message under the button names the problem.

How precise is the result?

The calculator adds the atomic weights in its table without rounding along the way and rounds the total to three decimals. The table holds the values of the Abridged Standard Atomic Weights 2024 of CIAAW, the IUPAC Commission on Isotopic Abundances and Atomic Weights, read on November 3, 2026. The CIAAW table states an uncertainty for each value, for example 32.06 ± 0.02 for sulfur and 207.2 ± 1.1 for lead. Read the third decimal of a result as arithmetic on the table and not as a measurement.

How do I convert grams to moles with the molar mass?

Divide the mass in grams by the molar mass in g/mol. Water comes to 18.015 g/mol in this calculator, so 36.03 g of water is 36.03 ÷ 18.015 = 2 mol. To go from moles to grams, multiply instead. The calculator gives the molar mass and leaves that division to you.

We use cookies

We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.

By clicking "Accept", you agree to our use of cookies.
Learn more.