Science & Engineering
Molar Mass Calculator
Calculate the molar mass (molecular weight) of any chemical formula — including brackets and hydrates like CuSO4·5H2O — with the mass percentage of each element.
How to use
- 1Type a formula with correct capitalization: H2SO4, Ca(OH)2, CuSO4·5H2O.
- 2See the molar mass, element counts and percent composition.
How it's calculated
Molar mass = Σ (atoms of each element × its standard atomic weight), using IUPAC standard atomic weights.
Frequently asked questions
Why does capitalization matter?
Co is cobalt but CO is carbon monoxide. Each element symbol starts with a capital letter.
How do I enter a hydrate?
Use a dot or asterisk before the water: CuSO4·5H2O or CuSO4*5H2O.
How do I convert grams to moles?
Divide the mass by the molar mass: 98 g of H₂SO₄ (98.08 g/mol) is about 1 mol.
Sources
Why the answer isn't a round number
H₂SO₄ comes out to 98.072 g/mol, not a tidy 98 — because atomic weights themselves aren't whole numbers. Sulfur's standard atomic weight, 32.06, is a weighted average of its naturally occurring isotopes (mostly ³²S, with small amounts of ³³S, ³⁴S and ³⁶S mixed in), and the same averaging applies to every element in the formula. Add 2 × 1.008 (H) + 32.06 (S) + 4 × 15.999 (O) and the decimals compound rather than cancel, which is why molar masses almost always land on a number like 98.072 instead of 98.
Why Ca(OH)₂ needs the brackets respected
The parentheses in Ca(OH)₂ multiply everything inside by the subscript outside, so the formula is really Ca, 2 O and 2 H — not Ca, 1 O and 1 H with a stray 2 floating around. Parsing this correctly (40.078 + 2×15.999 + 2×1.008 = 74.092 g/mol) is exactly why formula parsers have to track bracket depth rather than just reading left to right; a parser that ignored the parentheses would undercount both oxygen and hydrogen by half.
What the dot means in CuSO₄·5H₂O
The raised dot (or asterisk) before 5H₂O denotes a hydrate — water molecules trapped in the crystal lattice in a fixed ratio, not chemically bonded to the copper sulfate the way the sulfate oxygens are. Those five waters still count fully toward the molar mass: CuSO₄ alone is about 159.6 g/mol, but the hydrate is 249.68 g/mol because 5 × 18.015 g/mol of water (≈90 g) is part of the crystal's formula weight. Heating the solid to drive off that water (as in a classic gravimetric experiment) is a direct way to confirm this difference in a lab.
A mass in grams is optional, and the table is the check
The formula box starts as H2SO4, and if I leave the grams box empty I only get the molar mass and the atom count, 98.072 grams per mole and 7 atoms. The moment I type a mass greater than zero, a moles line appears, mass divided by that molar mass. The composition table is always there: element, name, atom count, atomic mass, and mass percent to three decimals. That percent column is how I catch a parse error. For Ca(OH)2 the oxygen and hydrogen percents only make sense if the brackets doubled both atoms. For a hydrate written with a middle dot or an asterisk, the water's mass percent is large, which is the clue that those waters were included rather than ignored.
The grams box is ignored unless it is greater than zero
A blank mass, or zero, leaves the moles line off, which is what I want when I only need the formula weight. A positive mass divides by the molar mass and shows five decimal places of moles, labeled with the gram amount I typed. The atom count is the sum of every element in the parsed formula, including the hydrogens and oxygens inside brackets and the waters after a hydrate dot. Percentages in the table are each element's contribution over the total, to three decimals, and they should add to about 100. If they do not, the formula was misread. I still have to capitalize element symbols myself.
Related tools
- Hemocytometer Cell Count Calculator
Calculate cell concentration and viability from hemocytometer counts: cells per mL, total cells, and the volume needed to seed a target number of cells.
- Molarity & Dilution Calculator
Calculate molarity, moles, mass or volume of a solution, or solve a dilution with C₁V₁ = C₂V₂.
- Density, Mass & Volume Calculator
Solve density = mass ÷ volume for any of the three, with a list of common material densities for reference.
- Force, Weight & Energy Calculator
Calculate force from mass and acceleration (F = ma), weight on Earth and other planets, kinetic energy and gravitational potential energy.
- Baby Formula Amount Calculator
Estimate how much formula a baby needs per day and per feed from their weight and age — using the common 2.5 oz per pound guideline.
- Percent Error Calculator
Calculate percent error between an experimental (measured) value and the theoretical (accepted) value — with absolute and relative error and the working shown.