Molar Mass Calculator
Molar mass is the mass of one mole of a substance, expressed in g/mol. If you can write a chemical formula, you can convert between grams and moles, check solution prep calculations, and verify percent composition for empirical or molecular formulas.
This calculator parses formulas the same way you read them in chemistry: it understands parentheses multipliers like Ca(OH)2 and hydrate dot notation like CuSO4·5H2O (you may also type a period as a fallback, CuSO4.5H2O). For broader course tools, you can also explore the Chemistry Calculator or jump to calculate the theoretical percentage of water for the following hydrates when you specifically need water-of-crystallization calculations.
Looking for more lab-focused utilities? Browse the Scientific Calculators hub for related science tools.
Calculator
How it works
The calculator expands your formula into element counts and then applies the molar mass formula: M = Σ(nᵢ × Aᵢ). Here, M is molar mass (g/mol), nᵢ is the number of atoms of element i in the formula, and Aᵢ is the atomic weight (g/mol). Parentheses multiply everything inside the group (including nested groups).
Hydrates use dot notation to indicate “addition” of a bound group—most commonly water. For example, CuSO4·5H2O means the total mass is the base compound CuSO4 plus 5 × (H2O). Ionic charges (like SO4^2−) do not change molar mass, because molar mass depends on atom counts, not charge.
Common mistakes
- Typing co when you mean CO (cobalt vs carbon+oxygen).
- Forgetting the multiplier after parentheses, e.g., reading (OH)2 as only one O and one H.
- Using commas or other invalid characters (stick to letters, numbers, parentheses, and dot notation).
- Mistyping the hydrate separator—use · if available; . is accepted as a fallback.
- Entering decimal subscripts (not allowed). Subscripts must be integers like H2, not H2.5.
Quick tips
- Copy-paste formulas without spaces; the tool ignores whitespace automatically.
- Use the middle dot · for hydrates; the period . also works if your keyboard lacks ·.
- Double-check capitalization: NaCl is different from Nacl.
- Start with a known example like H2O to confirm your input style.
- Increase decimal places for closer agreement with textbook values when needed.
Trust & Notes
- Accuracy & method: The computation runs locally in your browser using embedded atomic weights and deterministic formula parsing.
- Rounding & precision: Internal precision is kept during math; only displayed values are rounded to your selected decimal places.
- Privacy-first: No data is sent anywhere. The widget does not fetch, track, or store your formulas.
- Last Updated: January 21, 2026
- Sources & references: Standard atomic weights (periodic table reference values) and conventional formula parsing rules used in general chemistry.
Use cases
- Preparing solutions (grams ↔ moles): Convert a weighed mass into moles to prepare molar solutions and dilutions accurately.
- Stoichiometry & limiting reagents: Use molar masses to translate balanced reaction coefficients into real mass relationships.
- Interpreting hydrate formulas: Separate base salt and waters of crystallization to understand what you are weighing and why.
- Percent composition checks: Compute mass % by element to compare with lab data or to validate empirical/molecular formulas.
- Manufacturing & QC conversions: Convert between mass-based specs and amount-of-substance calculations for batching and quality control.
Examples
Counts: H = 2, O = 1
- H: 2 × 1.008 = 2.016
- O: 1 × 15.999 = 15.999
- Total: 2.016 + 15.999 = 18.015 g/mol
Expand parentheses: (OH)2 means O = 2 and H = 2; plus Ca = 1
- Ca: 1 × 40.078 = 40.078
- O: 2 × 15.999 = 31.998
- H: 2 × 1.008 = 2.016
- Total: 40.078 + 31.998 + 2.016 = 74.092 g/mol
Hydrate split: total = mass(CuSO4) + 5 × mass(H2O)
- Base part, CuSO4:
- Cu: 1 × 63.546 = 63.546
- S: 1 × 32.065 = 32.065
- O: 4 × 15.999 = 63.996
- CuSO4 subtotal: 63.546 + 32.065 + 63.996 = 159.607 g/mol
- Hydrate part, 5H2O:
- H2O = 18.015 g/mol (from Example 1)
- 5 × 18.015 = 90.075 g/mol
- Total: 159.607 + 90.075 = 249.682 g/mol