Molar Mass Calculator
About This Tool
What is Molar Mass and Why Does It Matter?
Molar mass is the mass, in grams, of exactly one mole (6.022 × 10²³ particles) of a substance. It is numerically equal to the substance's molecular weight expressed in unified atomic mass units (u), but its unit is g/mol. Whether you are a student balancing stoichiometry equations, a chemist preparing reagent solutions, or an engineer calculating reaction yields, the molar mass calculator is an indispensable everyday tool.
This free online molar mass calculator uses IUPAC 2021 Standard Atomic Weights for all 118 elements and supports complex formulas including hydrates, nested parentheses, square brackets, and ionic charge annotations — all parsed in real time directly in your browser.
How to Read a Chemical Formula
A chemical formula is a compact notation that tells you which elements are present and how many atoms of each appear in one formula unit. The rules are simple but must be followed precisely because the parser is case-sensitive, just like the periodic table:
- Element symbols always start with an uppercase letter, optionally followed by one lowercase letter:
H,Ca,Fe,Zn. - Subscripts are plain digits written immediately after an element symbol or a closing bracket:
H2O,C6H12O6. - Groups enclosed in parentheses or square brackets can carry an outer multiplier:
Ca(OH)2,K4[Fe(CN)6]. - Hydrates are represented by a mid-dot (·) or period followed by a multiplier and a formula:
CuSO4·5H2O. - Ionic charges such as
+,2-, or3+at the end of the formula are automatically stripped, because electrons have negligible mass.
How the Molar Mass Calculation Works
Under the hood, the calculator uses a recursive-descent parser that processes the formula character-by-character:
- Each element symbol is matched and its atom count (subscript, defaulting to 1) is recorded.
- Parenthesised or bracketed groups are parsed recursively; the result is multiplied by the outer subscript and merged into the running element count.
- Hydrate separators (·) reset the sequence into a new sub-formula that is multiplied by the hydrate coefficient.
- Once every element's total atom count is known, each count is multiplied by its IUPAC standard atomic weight and the products are summed to give the total molar mass.
Practical Examples
Water (H₂O)
2 × 1.008 (H) + 15.999 (O) = 18.015 g/mol. One of the most important values in chemistry — used in every mass-to-mole conversion involving aqueous solutions.
Glucose (C₆H₁₂O₆)
6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 180.156 g/mol. Knowing this molar mass lets biochemists convert between grams and millimoles of glucose in metabolic calculations.
Potassium Ferrocyanide Trihydrate (K₄[Fe(CN)₆]·3H₂O)
A complex salt with nested brackets and a hydrate component. K(4) + Fe(1) + C(6) + N(6) + 3×[H(2) + O(1)] = K = 156.392, Fe = 55.845, C = 72.066, N = 84.042, H₂O×3 = 54.045 → 422.390 g/mol.
Tips and Common Mistakes
co is not carbon + oxygen — it would be an invalid symbol, because cobalt is Co. Always capitalise the first letter of each element symbol.- Hydrate dots: Use · (U+00B7) or a plain period. Do not use × or *.
- Balanced brackets: Every
(must have a matching), and every[a matching]. The calculator reports exactly which bracket is unbalanced. - Subscript zero: A subscript of 0 is chemically meaningless and will trigger an error.
- Spaces: Spaces in the formula are treated as errors. Write
NaCl, notNa Cl.
Related Calculations
Molar mass is the gateway to many related calculations. Once you know the molar mass M of a substance, you can:
- Compute molarity (c = n/V) by converting grams to moles: n = mass / M.
- Apply the Ideal Gas Law (PV = nRT) to determine the volume occupied by a known mass of a gas.
- Work out percent composition to verify the purity of a compound or identify an unknown substance.
- Determine the empirical formula from mass data by dividing element masses by their atomic weights and finding the simplest integer ratio.
Use the related tools — Molarity Calculator and Ideal Gas Law Calculator — alongside this tool to complete your stoichiometry workflow without leaving MonoCalc.
Frequently Asked Questions
Yes, Molar Mass Calculator is totally free :)
Yes, you can install the webapp as PWA.
Yes, any data related to Molar Mass Calculator only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.
Molar mass is the mass (in grams) of one mole of a substance, numerically equal to its atomic or molecular weight in atomic mass units (u). It is a fundamental conversion factor in stoichiometry, allowing chemists to relate measurable masses of substances to the number of atoms or molecules involved in a reaction.
Molecular mass (also called molecular weight) is the sum of the atomic masses of all atoms in a single molecule, expressed in unified atomic mass units (u or Da). Molar mass expresses the same quantity per mole of substance, with units of g/mol. Numerically they are equal — for example, H₂O has a molecular mass of 18.015 u and a molar mass of 18.015 g/mol.
No. The charge of an ion comes from gaining or losing electrons, which have a negligible mass (~0.00055 u each). For all practical purposes the molar mass of an ion is identical to that of its neutral atom or molecule, and this calculator correctly ignores charge annotations such as NH₄⁺ or SO₄²⁻.
Yes. This calculator supports hydrates (e.g., CuSO₄·5H₂O), nested parentheses (e.g., Al₂(SO₄)₃), and square brackets (e.g., K₄[Fe(CN)₆]). Enter the formula exactly as written, using · or . as the hydrate separator, and the parser handles the rest automatically.
The calculator uses IUPAC 2021 Standard Atomic Weights, which are the internationally recommended values for naturally occurring elements. These are weighted averages over the natural isotopic abundances, so they apply to real-world samples. For radioactive elements with no stable isotopes, the mass number of the most stable known isotope is given instead.
Standard molar mass calculations always use natural-abundance average atomic weights. If you need isotope-specific masses (e.g., for deuterium D₂O), you would need to calculate manually — for example, deuterium has an atomic mass of 2.014 u, giving D₂O a molar mass of 20.027 g/mol. Isotope symbols are not standard element symbols and cannot be entered directly into this calculator.