Molar Mass Calculator
Molar mass is the mass of one mole of a substance, in grams per mole, found by summing the standard atomic weight of every atom in the formula. Type a formula such as CaCO3, Ca(OH)2, or CuSO4.5H2O into the calculator above and it adds each element's contribution automatically, including bracketed groups and hydrate water.
Molar Mass vs. Atomic Mass
Atomic mass is a per-atom value read straight off the periodic table, expressed in atomic mass units (amu). It describes the mass of a single atom of one element, averaged over that element's naturally occurring isotopes. Molar mass describes something different: the mass of one mole (6.022 x 10^23 particles) of a substance, expressed in grams per mole (g/mol).
For a single element, the two numbers look identical because one mole of atoms weighs, in grams, the same number as one atom weighs in amu. Carbon's atomic mass is 12.011 amu, and the molar mass of carbon is 12.011 g/mol. The moment you move to a compound, molar mass becomes a genuinely summed quantity: it adds up the atomic weight of every atom listed in the formula, counted according to its subscript. Calcium carbonate has no single "atomic mass" of its own; it has a molar mass built from the atomic weights of calcium, carbon, and oxygen added together in the right proportions.
How to Calculate Molar Mass, Step by Step
Every molar mass calculation follows the same short procedure, whether done by hand or by the calculator above.
- Identify every distinct element symbol in the formula and note the subscript count attached to it (no subscript means a count of 1).
- Look up each element's standard atomic weight in g/mol from a periodic table.
- Multiply each atomic weight by that element's subscript count.
- Add all the individual contributions together. The total is the molar mass of the compound.
The only complications are formulas that use brackets or a hydrate dot, both covered below, since each one changes how the subscripts get expanded before you start adding.
Reading Brackets and Subscripts Correctly
A subscript written directly after an element symbol multiplies that element only, for example the 3 in CO3 multiplies oxygen only. A subscript written after a closing bracket multiplies everything inside that bracket. In Ca(OH)2, the group (OH) contains one oxygen and one hydrogen, and the 2 outside the bracket means that entire group appears twice: two oxygens and two hydrogens, not one of each. Getting this expansion right before you add anything is the single most common source of hand-calculation errors, and it is exactly what the calculator's bracket parser is built to handle automatically, including brackets nested inside other brackets.
Handling Hydrates: the Dot Notation
A hydrate is a compound with water molecules locked into its crystal structure, written with a raised or plain dot followed by a number and H2O, as in CuSO4.5H2O. The dot does not mean multiplication of the whole formula; it means addition. You calculate the molar mass of the anhydrous compound (CuSO4) on its own, calculate the molar mass of water multiplied by the hydrate number (5 x H2O), and add the two totals together. The water is a separate mass contribution stacked on top of the base compound, not folded into its subscripts.
Three Worked Examples with Full Arithmetic
Example 1: Calcium carbonate, CaCO3. Ca = 40.08, C = 12.011, O3 = 3 x 15.999 = 47.997. Sum: 40.08 + 12.011 + 47.997 = 100.09 g/mol.
Example 2: Calcium hydroxide, Ca(OH)2. The bracketed group (OH) is multiplied by the subscript 2 outside it, giving O2H2: (15.999 + 1.008) x 2 = 16.007 x 2 = 34.014. Add calcium: 40.08 + 34.014 = 74.09 g/mol.
Example 3: Copper(II) sulfate pentahydrate, CuSO4.5H2O. First the anhydrous part: Cu = 63.546, S = 32.06, O4 = 4 x 15.999 = 63.996, giving 63.546 + 32.06 + 63.996 = 159.60. Then the hydrate water: 5 x H2O = 5 x 18.015 = 90.08. Add the two: 159.60 + 90.08 = 249.68 g/mol.
Why Capitalization Matters When You Type a Formula
Element symbols are case-sensitive, and the calculator's parser relies on that to tell elements apart. "Co" (capital C, lowercase o) is cobalt, a single atom. "CO" (capital C, capital O) is carbon monoxide, one carbon plus one oxygen. Typing "co(oh)2" or "CO(OH)2" instead of "Co(OH)2" will parse as an entirely different, likely invalid, combination of elements rather than cobalt hydroxide. The same rule applies to symbols like Ni (nickel) versus NI, or Sn (tin) versus SN. When a result looks wrong or the field will not resolve to a mass, check capitalization first, then check that every bracket you opened has a matching close.
Quick-Reference Table: Common Lab Compounds
| Compound | Formula | Molar mass (g/mol) |
|---|---|---|
| Sodium chloride | NaCl | 58.44 |
| Sodium hydroxide | NaOH | 40.00 |
| Sulfuric acid | H2SO4 | 98.08 |
| Glucose | C6H12O6 | 180.16 |
| Ethanol | C2H5OH | 46.07 |
| Calcium carbonate | CaCO3 | 100.09 |
| Calcium hydroxide | Ca(OH)2 | 74.09 |
| Copper(II) sulfate pentahydrate | CuSO4.5H2O | 249.68 |
Where Molar Mass Fits Into the Rest of a Yield Calculation
Molar mass rarely stands alone. Once you have it for a reactant or product, the next step in most lab problems is converting the mass you weighed out into moles, which is exactly what the grams to moles converter does using the value produced here. Moles then feed into a balanced equation's coefficients to find the mole ratio between reactants and products, which in turn determines the theoretical yield a reaction can produce. All of these steps are pieces of the broader stoichiometry workflow, and if you want to see how molar mass connects all the way through to a final percent yield result, the percent yield calculator on the home page walks through that full chain.
Frequently asked questions
What is molar mass?
Molar mass is the mass of one mole of a substance, expressed in grams per mole (g/mol). It is calculated by summing the standard atomic weight of every atom in a chemical formula, counted according to each element's subscript. A mole is a fixed count of particles (6.022 x 10^23), so molar mass is the bridge between a count of particles and a mass you can weigh on a balance.
What is the difference between molar mass and atomic mass?
Atomic mass is the mass of one single atom of an element, read from the periodic table in atomic mass units. Molar mass is the mass of one mole of a substance, in grams per mole. For a single element the numbers match numerically, but for a compound molar mass is a summed total across every atom in the formula, while atomic mass only ever describes one element at a time.
How do you calculate the molar mass of a compound?
List every element in the formula with its subscript count, look up each element's standard atomic weight, multiply each weight by its count, then add every contribution together. For CaCO3 that is Ca (40.08) plus C (12.011) plus O3 (3 x 15.999 = 47.997), summing to 100.09 g/mol. Bracketed groups and hydrate dots must be expanded first, before adding.
How do brackets work in a chemical formula for molar mass?
A subscript outside a closing bracket multiplies every element inside that bracket, not just one of them. In Ca(OH)2, the group (OH) contains one oxygen and one hydrogen, and the 2 outside means two oxygens and two hydrogens total: (15.999 + 1.008) x 2 = 34.014, added to calcium's 40.08 for 74.09 g/mol.
How do you handle a hydrate like CuSO4 times 5H2O?
Calculate the anhydrous compound's molar mass and the water's molar mass separately, then add them, because the hydrate dot represents addition rather than multiplying the whole formula. CuSO4 comes to 159.60 g/mol, and 5H2O comes to 5 x 18.015 = 90.08 g/mol. Added together, copper(II) sulfate pentahydrate is 249.68 g/mol.
Why did my formula not parse correctly?
The most common cause is incorrect capitalization, since element symbols are case-sensitive: "Co" is cobalt while "CO" is carbon monoxide, and typing the wrong case turns the formula into a different set of elements entirely. Also check that every opening bracket has a matching close, and that hydrate numbers are written as a plain number before H2O following the dot.
What are the units of molar mass?
Molar mass is expressed in grams per mole, written g/mol or, less commonly, g mol^-1. This unit directly tells you how many grams one mole of the substance weighs, which is why molar mass is the conversion factor used to move between a measured mass on a balance and a mole count for a reaction calculation.
Is molar mass the same as molecular weight?
In practice, yes: molecular weight and molar mass refer to the same summed value for a molecular compound, differing mainly in the unit convention used historically (molecular weight is technically dimensionless, molar mass is expressed in g/mol). For ionic compounds without discrete molecules, the equivalent term is formula mass, but the calculation and the resulting number are the same.
How many decimal places should molar mass be reported to?
Two decimal places (for example, 100.09 g/mol) is standard for general lab and coursework use, matching the precision of most published standard atomic weight tables. Analytical work that needs tighter tolerances may carry three or more decimal places, but for typical stoichiometry problems, two decimal places is precise enough to keep downstream mole and yield calculations accurate.
Where do the atomic weight values come from?
The atomic weights used in this calculator are the standard atomic weights published by IUPAC (the International Union of Pure and Applied Chemistry), the same values printed on a standard periodic table. These are conventional averages that account for the natural isotopic abundance of each element, which is why they carry decimal values rather than whole numbers.