Complete guide
Molecular weight and molar mass calculator from a chemical formula
Enter a formula such as H2O, Ca(OH)2 or CuSO4·5H2O. Calculator24 parses element counts, sums molar mass, reports mass percentages and converts the optional sample mass to moles and entities.
Relative molecular mass and molar mass
Relative molecular mass is dimensionless. For a defined composition, the same numerical value expressed in g/mol gives its molar mass.
How the formula is parsed
Capital letters begin element symbols, lowercase letters complete them, whole numbers multiply the preceding element or parenthesized group, and a hydrate coefficient multiplies its dot-separated component.
Mass-sum formula
The engine multiplies each element count by its stored representative relative atomic mass and adds the contributions.
M=ΣNᵢAᵣ,ᵢWorked glucose example
C6H12O6 contains 6 carbon, 12 hydrogen and 6 oxygen atoms. Their contributions sum to approximately 180.156 g/mol.
From grams to amount
Dividing sample mass by molar mass gives moles. Multiplying moles by the exact Avogadro constant gives the number of specified formula entities.
Isotopes and material limits
Atomic weights can be intervals because natural isotopic composition varies. This general calculator uses representative values and does not model isotopic labels, mixtures, charges, polymers or non-stoichiometric solids.
Formula notation examples
| Formula | Parsed composition |
|---|---|
| H2O | H₂O |
| Ca(OH)2 | CaO₂H₂ |
| Al2(SO4)3 | Al₂S₃O₁₂ |
| CuSO4·5H2O | CuS O₉ H₁₀ |
Frequently asked questions
Is molecular weight the same as molar mass?
They share a numerical value for a defined composition, but relative molecular mass is dimensionless and molar mass has units.
Can I use parentheses?
Yes, including nested groups within the supported length.
Can I enter hydrates?
Yes, separate components with a middle dot or period.
Are isotopically labeled formulas supported?
No.
Why can published values differ slightly?
Atomic-weight conventions and isotopic composition can differ.
How are sample moles calculated?
Sample mass in grams divided by molar mass in g/mol.
What to keep in mind
Uses conventional representative relative atomic-mass values for natural terrestrial composition. Isotopic enrichment, uncertain radioactive-element mass numbers, charges, polymers and non-stoichiometric materials require a composition-specific method.
Results display up to 8 decimal places; exported numbers preserve calculation precision. This is a calculation summary, not an official certificate.