Use this molecular weight calculator to get molar mass, formula mass, percent composition, and element-by-element breakdown from a chemical formula.
Last updated
Formula to molar-mass worksheet Enter a chemical formula to calculate molecular weight, inspect the element-by-element mass contribution, and pull practical reference masses for common mole amounts.
Quick examples
Supported notation This worksheet supports the full current periodic table plus grouped parentheses, square brackets, curly braces, and hydrate dots such as CuSO4·5H2O.
Result
H2O contains 3 atoms across 2 elements for a molar mass of 18.015 g/mol.
18.02 g/mol
Normalized formula: H2O
Molar mass
18.02
Formula mass
18.02 u
Total atoms
3
Unique elements
2
Average atomic mass per atom
6.01
Reduced formula
No reduction
Chemistry interpretation
Oxygen contributes 88.8093% of the total mass, the largest share in this formula.
Molecular weight calculator for molar mass, formula mass, and elemental composition
Use this molecular weight calculator to turn a chemical formula into molar mass, formula mass, and an element-by-element composition breakdown. It works as a practical molar mass calculator for homework, lab prep, stoichiometry checks, and any workflow where you need to move from a formula such as H2O, Ca(OH)2, or CuSO4·5H2O to a trustworthy grams-per-mole value.
How molecular weight is calculated
The molecular weight, formula mass, or molar mass of a compound starts with the same core step: count how many atoms of each element appear in the formula, then multiply each count by that element's standard atomic weight. The total is the formula's mass per mole in g/mol, and the same number can also be expressed as formula mass in unified atomic mass units.
A molecular weight calculator therefore has two jobs. First, it must parse the notation correctly. Second, it must use reliable atomic-weight reference values for the listed elements. If either step is wrong, every downstream mole conversion, solution-prep calculation, or percent-composition estimate will also be wrong.
M = Σ(nᵢ × Aᵢ)
Multiply each element count nᵢ by its standard atomic weight Aᵢ, then sum the contributions to get total molar mass.
What this molar mass calculator supports
The worksheet accepts ordinary formulas such as H2O and NaCl, grouped formulas such as Ca(OH)2, bracketed coordination-style notation such as K4[Fe(CN)6], and hydrate notation such as CuSO4·5H2O. That matters because students and lab users often need more than a simple organic formula parser; they need a calculator that can follow the notation they actually see in class problems, solution-preparation sheets, and reagent labels.
Once the formula is parsed, the page shows more than a single answer. It also breaks out each element's contribution, the total atom count, mass percent, atom percent, and small reference masses for common mole amounts such as 1 mmol and 0.100 mol. Those extra views make the result easier to interpret in stoichiometry and preparation work.
Worked example: calcium hydroxide
For calcium hydroxide, Ca(OH)2, begin with one calcium atom. The parentheses mean the OH group appears twice, so the formula contains 1 calcium, 2 oxygen, and 2 hydrogen atoms. Using standard atomic weights, the contributions are about 40.08 for Ca, 31.998 for the two oxygen atoms, and 2.016 for the two hydrogen atoms.
Adding those parts gives roughly 74.094 g/mol. That is why a 1 mmol portion of calcium hydroxide weighs about 74.094 mg, while a 0.100 mol portion weighs about 7.4094 g. The page's reference-mass rows are meant to turn the molar-mass result into those immediate planning values.
Worked example: copper sulfate pentahydrate
Hydrate notation is a common source of mistakes, because the water molecules must be counted explicitly. In CuSO4·5H2O, the copper sulfate part contributes 1 copper, 1 sulfur, and 4 oxygen atoms. The five water molecules add 10 hydrogen and 5 more oxygen atoms, so the full hydrate contains 1 Cu, 1 S, 9 O, and 10 H.
Using the calculator as a hydrate-aware molar mass calculator prevents the classic error of forgetting the water of crystallization. With the full count included, copper sulfate pentahydrate comes out to about 249.691 g/mol. That is the value you would use for mole conversions or for weighing a hydrate rather than the anhydrous salt.
How to read percent composition and reduced formulas
The elemental-composition table is not just decoration. Mass percent tells you which element contributes the largest share of the total molar mass, while atom percent tells you how the atom count is distributed. Those two percentages are often very different. In water, oxygen contributes a far larger mass share than hydrogen even though there are fewer oxygen atoms than hydrogen atoms.
The reduced or empirical formula view is also useful when the molecular formula can be simplified to a lower whole-number ratio. For example, glucose is C6H12O6, but its reduced formula is CH2O. The molecular weight calculator does not determine an empirical formula from lab measurements; it simply reduces the known atom counts already present in the entered formula.
Molecular weight, molar mass, and formula mass
In everyday chemistry teaching and calculator use, people often say molecular weight, molecular mass, formula mass, and molar mass interchangeably. Strictly speaking, the language can be more nuanced. Molar mass is the mass per mole of substance, usually reported in g/mol. Formula mass or molecular mass is often discussed on the particle scale, using atomic mass units or daltons for a single formula unit or molecule.
For normal calculator work, the important point is numerical equivalence: the same formula that weighs about 18.015 u per water molecule also has a molar mass of about 18.015 g/mol per mole of water molecules. This page reports the chemistry value in a way that is useful for mole, mass, and composition work without pretending those terminology debates do not exist.
Where this tool helps and where it does not
This tool is well suited to chemistry classes, bench calculations, reagent planning, stoichiometry setup, and quick checks before moving into grams-to-moles, moles-to-grams, or molarity work. It is especially helpful when you already know the formula and need a reliable molar-mass number plus a composition table you can sanity-check.
It does not replace isotope-specific mass calculations, mass spectrometry work, structural chemistry, polymer-average molecular-weight methods, or non-stoichiometric solid-state analysis. It also does not infer oxidation state, balance equations, or tell you whether a formula is chemically realistic. It parses the notation you enter and calculates the mass implied by that notation.
Further reading
Grams to moles converter — Move from a known sample mass into moles once you already have the molar mass.
Molarity calculator — Use the molar mass in solution-preparation work when concentration and final volume matter.
Frequently asked questions
What is the difference between molecular weight and molar mass?
For most calculator use, the values are numerically the same, but the framing differs. Molar mass is the mass per mole of substance, usually expressed in g/mol. Molecular or formula mass is often described on the particle scale in atomic mass units. This page is designed so the number is immediately usable for chemistry calculations even if different textbooks prefer slightly different wording.
How do I use a molar mass calculator from a chemical formula?
Enter the formula exactly as you would write it in chemistry notation, including subscripts, parentheses, or hydrate dots where needed. The calculator counts each element, multiplies the count by the standard atomic weight of that element, and adds the contributions to give the total molar mass. The detailed table then shows you where the final number came from.
Can this molecular weight calculator handle parentheses?
Yes. Formulas such as Ca(OH)2, Mg(NO3)2, and Al2(SO4)3 depend on grouped notation, and the page expands those groups before summing the element counts. That keeps the result aligned with the formula you would use in a chemistry class or laboratory worksheet.
Does it support hydrate notation like CuSO4·5H2O?
Yes. Hydrate notation is treated as multiple connected formula segments, so the water molecules are added into the total atom count before the final molar mass is calculated. This matters because omitting the water of crystallization can materially understate the mass you need to weigh.
Can it handle bracketed formulas such as K4[Fe(CN)6]?
Yes. The parser supports bracketed groups and expands them before calculating the final mass. That makes the page more useful for common complex-ion and coordination-style formulas than a basic calculator that only accepts parentheses.
What is percent composition and why is it useful?
Percent composition tells you how much of the total molar mass comes from each element. It is useful in analytical chemistry, empirical-formula reasoning, reagent purity discussion, and simple sanity-checking. A composition table also shows whether the heaviest element or the most numerous element is dominating the total mass, which are not always the same thing.
Why does 1 mmol have the same number in mg as g/mol?
Because 1 mmol is one-thousandth of a mole and 1 mg is one-thousandth of a gram. If a compound has a molar mass of 180.156 g/mol, then 1 mmol weighs 180.156 mg. This is one of the quickest practical uses of a molecular weight calculator in bench chemistry.
What if my formula reduces to a simpler empirical formula?
The calculator can show the reduced whole-number atom ratio when the molecular formula contains a common divisor. For example, C6H12O6 reduces to CH2O. That does not mean the molecular formula becomes wrong; it just shows the simplest atom ratio implied by the entered counts.
Does this page use isotope-specific masses?
No. It uses standard atomic weights, which are the normal chemistry reference values for general calculations. If you need monoisotopic mass, exact isotopic composition, or mass-spectrometry-grade precision, you need a different tool and a different reference set.
When should I use a different chemistry calculator?
Use a grams-to-moles or moles-to-grams calculator when the formula has already been converted into a known molar mass and the real task is a mass conversion. Use a molarity calculator when solution concentration and volume are part of the problem. Use a stoichiometry or equation-balancing workflow when reaction ratios, not just one formula's mass, are the core question.