Molar Mass Calculator
Calculate the molar mass of any chemical compound from its molecular formula.
Enter Chemical Formula
Use standard chemical notation (e.g., H2O, NaCl, Ca(OH)2)
Molar Mass
Element Breakdown
Quick Conversions
What Is Molar Mass?
Molar mass is the mass of one mole of a substance, expressed in grams per mole (g/mol). It is numerically equal to the molecular weight or formula weight of the compound, but expressed in different units. One mole of any substance contains exactly 6.022 × 10²³ entities (atoms, molecules, or formula units) — Avogadro's number. Molar mass bridges the gap between the atomic scale (where we count atoms) and the laboratory scale (where we measure grams).
To calculate the molar mass of a compound, you sum the atomic masses of all atoms in its chemical formula. Each element's atomic mass is found on the periodic table and represents the weighted average of its naturally occurring isotopes. For example, water (H₂O) has a molar mass of 2(1.008) + 15.999 = 18.015 g/mol, meaning one mole of water molecules weighs 18.015 grams.
This calculator parses any valid chemical formula — including those with parentheses like Ca(OH)₂ — and provides a complete element-by-element breakdown showing each atom's contribution to the total molar mass. It also displays the percentage composition by mass for each element, which is useful for empirical formula determination and quality control in manufacturing.
The Molar Mass Formula
The molar mass of a compound is the sum of the atomic masses of all atoms in the formula, each multiplied by the number of times that atom appears.
Molar Mass Calculation
Where:
- M= Molar mass of the compound (g/mol)
- atomic mass= Standard atomic weight from the periodic table (g/mol)
- number of atoms= Count of each element in the chemical formula
How to Use This Calculator
This calculator provides instant molar mass results from any chemical formula:
- Enter Chemical Formula: Type the molecular formula using standard notation — capital letters for elements, lowercase for second letters (e.g., NaCl, Ca(OH)₂, C₆H₁₂O₆).
- Or Select a Common Compound: Click any preset button (H₂O, NaCl, glucose, etc.) to auto-fill the formula.
- View Results: The calculator displays the total molar mass, element-by-element breakdown with mass contributions and percentages, and quick conversion factors.
The element breakdown table shows each element's atomic mass, the number of atoms, the total mass contribution, and the percentage by mass. The progress bars provide a visual representation of each element's contribution.
Understanding the Results
The results panel provides several useful pieces of information beyond just the molar mass:
Element Breakdown: Each element is listed with its atomic mass, count, total mass contribution, and percentage. Elements are sorted by contribution, with the heaviest contributors at the top. This breakdown is essential for quality control and for verifying that your formula is correct.
Quick Conversions: The calculator shows that 1 mole equals the molar mass in grams, and 1 gram equals 1/molar mass moles. These conversions are the basis for all stoichiometric calculations. It also notes that 1 mole contains 6.022 × 10²³ molecules and, for gases at STP, occupies 22.4 liters.
Error Detection: If the formula contains an unrecognized element symbol, the calculator reports an error. This helps catch typos like lowercase/uppercase errors (e.g., "co" instead of "Co" for cobalt).
Real-World Applications
Molar mass calculations are the foundation of stoichiometry, which is the quantitative relationship between reactants and products in chemical reactions. Every laboratory preparation, from making a simple salt solution to synthesizing a complex pharmaceutical, begins with calculating how much of each reagent is needed — and that requires molar mass.
In pharmaceutical manufacturing, molar mass determines drug dosing, formulation ratios, and quality specifications. Active pharmaceutical ingredients are weighed by mass, but their biological activity is determined by the number of molecules, which is calculated from molar mass.
In environmental monitoring, pollutant concentrations are often converted between mass-based and mole-based units using molar mass. In food science, nutritional calculations use molar mass to convert between grams of nutrients and molecules. Even in forensics, molar mass helps identify unknown substances by comparing measured molecular weights to known compounds.
Worked Examples
Water (H₂O)
Problem:
Calculate the molar mass of water.
Solution Steps:
- 1Identify atoms: 2 hydrogen atoms and 1 oxygen atom
- 2Hydrogen contribution: 2 × 1.008 = 2.016 g/mol
- 3Oxygen contribution: 1 × 15.999 = 15.999 g/mol
- 4Total molar mass = 2.016 + 15.999 = 18.015 g/mol
Result:
Molar mass of H₂O = 18.015 g/mol (11.19% H, 88.81% O)
Glucose (C₆H₁₂O₆)
Problem:
Calculate the molar mass of glucose.
Solution Steps:
- 1Carbon: 6 × 12.011 = 72.066 g/mol
- 2Hydrogen: 12 × 1.008 = 12.096 g/mol
- 3Oxygen: 6 × 15.999 = 95.994 g/mol
- 4Total = 72.066 + 12.096 + 95.994 = 180.156 g/mol
Result:
Molar mass of C₆H₁₂O₆ = 180.156 g/mol (40.00% C, 6.71% H, 53.28% O)
Calcium Hydroxide (Ca(OH)₂)
Problem:
Calculate the molar mass of calcium hydroxide with parentheses.
Solution Steps:
- 1Parse parentheses: (OH)₂ means 2 oxygen and 2 hydrogen atoms
- 2Calcium: 1 × 40.078 = 40.078 g/mol
- 3Oxygen: 2 × 15.999 = 31.998 g/mol
- 4Hydrogen: 2 × 1.008 = 2.016 g/mol
- 5Total = 40.078 + 31.998 + 2.016 = 74.092 g/mol
Result:
Molar mass of Ca(OH)₂ = 74.092 g/mol
Tips & Best Practices
- ✓Always use correct capitalization: 'Na' is sodium, 'NA' is not a valid symbol.
- ✓For formulas with parentheses like Ca(OH)₂, multiply all atoms inside by the subscript outside.
- ✓Molar mass is essential for converting between mass and moles: n = mass / M.
- ✓The percentage composition can help verify your formula is correct.
- ✓Common mistakes: confusing atomic mass (per atom) with molar mass (per mole). They have the same numerical value but different units.
- ✓Use the molar mass as a conversion factor: 1 mol = M grams.
Frequently Asked Questions
Sources & References
Last updated: 2026-06-06
Help us improve!
How would you rate the Molar Mass Calculator?
Editorial Note
MyCalcBuddy Editorial Team
This page is maintained as an educational calculator reference.
Formula Source: Chemistry: The Central Science
by Brown, LeMay, Bursten