Science

Molar Mass Calculator

Enter a chemical formula to calculate its molar mass. Supports elements, compounds, and formulas with parentheses like Ca(OH)2.

Quick Answer

Molar mass = sum of (atomic mass × atom count) for every element in the formula. Enter any chemical formula below and the calculator does the rest.

Calculate Molar Mass

Type a chemical formula or click a common compound below.

Molar Mass of H2O
18.015 g/mol

Element Breakdown

ElementSymbolAtomic MassCountTotal Mass% Composition
HydrogenH1.00822.01611.19%
OxygenO15.999115.99988.81%

About This Tool

The Molar Mass Calculator instantly computes the molar mass (molecular weight) of any chemical compound from its formula. Simply type a formula like H2O, NaCl, C6H12O6, or even complex compounds with parentheses like Ca(OH)2 and Al2(SO4)3, and the calculator parses each element, looks up its atomic mass, and sums the contributions to give you the total molar mass in grams per mole (g/mol).

What Is Molar Mass?

Molar mass is one of the most fundamental concepts in chemistry. It represents the mass of exactly one mole of a substance, where one mole contains Avogadro's number (6.022 × 10²³) of particles. The molar mass of an element equals its atomic mass from the periodic table, expressed in g/mol. For compounds, you add up the atomic masses of every atom in the molecular formula. This seemingly simple calculation underlies virtually all quantitative chemistry, from preparing solutions in a teaching lab to scaling industrial chemical processes.

How the Calculator Works

The calculator uses a formula parser that recognizes standard chemical notation. It identifies element symbols (one uppercase letter optionally followed by a lowercase letter), reads subscript numbers, and handles parenthesized groups with outer subscripts. For each identified element, it multiplies the atom count by the standard atomic mass (based on IUPAC 2021 values) and sums everything to produce the total molar mass. It also calculates percent composition automatically, showing you what fraction of the compound's mass each element contributes.

Practical Applications

Molar mass calculations are essential in stoichiometry, the branch of chemistry dealing with the quantitative relationships between reactants and products. When you need to measure out a specific number of moles of a reagent, you multiply the desired moles by the molar mass to get the mass in grams to weigh on a balance. For solution preparation, knowing the molar mass lets you calculate how many grams of solute to dissolve to achieve a target molarity. In analytical chemistry, molar mass connects mass spectrometry data to molecular identity.

Percent Composition and Empirical Formulas

The element breakdown table shows percent composition, which is the mass percentage each element contributes to the total compound. This information works in reverse too: if you know the percent composition from an experiment, you can determine the empirical formula of an unknown compound. Divide each element's mass percent by its atomic mass, then divide by the smallest result to get the simplest whole-number ratio. This is a standard technique in analytical and organic chemistry for identifying unknown substances.

Common Compounds and Their Molar Masses

Some molar masses are worth memorizing: water (H2O) is 18.015 g/mol, carbon dioxide (CO2) is 44.009 g/mol, glucose (C6H12O6) is 180.156 g/mol, and sodium chloride (NaCl) is 58.443 g/mol. These values appear constantly in chemistry coursework and laboratory work. The quick-select buttons above let you load these and other common compounds instantly.

Tips for Entering Formulas

Always capitalize element symbols correctly: Co is cobalt, but CO is carbon monoxide. Use parentheses for polyatomic groups: Mg(OH)2 not MgOH2. Subscript numbers go immediately after the element or closing parenthesis. The calculator supports most common elements found in general, organic, and biochemistry courses. If you get an error, double-check your element symbols against the periodic table.

Frequently Asked Questions

What is molar mass?
Molar mass is the mass of one mole (6.022 x 10^23 particles) of a substance, expressed in grams per mole (g/mol). It numerically equals the molecular weight or formula weight of a compound. For elements, the molar mass equals the atomic mass found on the periodic table. For compounds, you sum the atomic masses of all atoms in the formula. For example, water (H2O) has a molar mass of about 18.015 g/mol: two hydrogen atoms (2 x 1.008) plus one oxygen atom (15.999).
How do I calculate the molar mass of a compound?
To calculate molar mass: (1) Write the correct chemical formula. (2) Count the number of each type of atom. (3) Multiply each atom count by its atomic mass from the periodic table. (4) Add all the values together. For example, for glucose (C6H12O6): carbon contributes 6 x 12.011 = 72.066, hydrogen contributes 12 x 1.008 = 12.096, and oxygen contributes 6 x 15.999 = 95.994. Total: 180.156 g/mol.
What is the difference between molecular weight and molar mass?
Molecular weight and molar mass are numerically identical but technically different. Molecular weight (or molecular mass) refers to the mass of a single molecule in atomic mass units (amu or Da). Molar mass is the mass of one mole of molecules in grams per mole (g/mol). The numerical value is the same because of how the mole is defined. In practice, chemists often use the terms interchangeably.
Why is molar mass important in chemistry?
Molar mass is essential for converting between mass and moles, which is the foundation of stoichiometry. It allows you to: determine how much of a reactant is needed for a chemical reaction, calculate the yield of a product, prepare solutions of specific concentrations, and convert between mass measurements in the lab and the number of molecules or atoms involved. Without molar mass, quantitative chemistry would be impossible.
How do I find percent composition from molar mass?
Percent composition tells you what fraction of a compound's mass comes from each element. Divide the total mass contribution of each element by the compound's molar mass, then multiply by 100. For water (H2O, molar mass 18.015 g/mol): hydrogen = (2 x 1.008) / 18.015 x 100 = 11.19%, oxygen = 15.999 / 18.015 x 100 = 88.81%. This calculator shows percent composition automatically in the element breakdown table.
Can this calculator handle parentheses in chemical formulas?
Yes. This calculator supports parentheses notation commonly used for polyatomic ions and hydrates. For example, Ca(OH)2 (calcium hydroxide) is correctly parsed as one calcium, two oxygen, and two hydrogen atoms. The parentheses indicate that the subscript applies to all atoms within them. You can enter formulas like Mg(NO3)2, Al2(SO4)3, and similar compounds.

Was this tool helpful?