Skip to content
Calcapedia
Science

Molar Mass Calculator

Type a chemical formula to get its molar mass in grams per mole, with each element's atom count, share of the mass and mass percent.

Level: Grades 9–10

Printable worksheet

Molar Mass Calculator

Inputs

Case matters: Co is cobalt, CO is carbon monoxide. Brackets and hydrates work, for example Ca(OH)2 or CuSO4·5H2O.

Result

Molar mass of C6H12O6

180.156 g/mol

C6H12O6 has a molar mass of 180.156 g/mol.

In kilograms per mole
0.180156 kg/mol
Atoms per formula unit
24
Different elements
3

See the step-by-step solution ↓

Contribution of each element
Contribution of each element
ElementAtomsAtomic weight (g/mol)Mass (g/mol)Mass %
Carbon (C)612.01172.06640.002%
Hydrogen (H)121.00812.0966.714%
Oxygen (O)615.99995.99453.284%

Step-by-step solution

  1. Carbon (C): 6 atoms × its atomic weight

    6×12.011 g/mol=72.066 g/mol
  2. Hydrogen (H): 12 atoms × its atomic weight

    12×1.008 g/mol=12.096 g/mol
  3. Oxygen (O): 6 atoms × its atomic weight

    6×15.999 g/mol=95.994 g/mol
  4. Add up what every element contributes to get the molar mass

    72.066+12.096+95.994=180.156 g/mol

Test yourself

20 quick questions built from this calculator's formula: work out results, predict what happens when an input changes, and work backward from an answer. Every answer comes with the working.

What this calculator does

Type a chemical formula and get the weight of one mole of it, plus a breakdown by element. That weight is the molar mass, measured in grams per mole (g/mol). A mole is just a fixed count of particles, about 6.022 × 10²³, much like a dozen means 12. So the molar mass tells you how many grams of a compound hold that many molecules or formula units. A formula unit is the smallest repeating group in a solid like table salt. Molar mass is the bridge between what you weigh on a scale and how many particles take part in a reaction.

You can type a formula such as H2O, Ca(OH)2, K4[Fe(CN)6] or CuSO4·5H2O. The calculator reads it and counts every atom. Then it multiplies each count by that element's standard atomic weight and adds the results. Next to the total, a table shows how much each element contributes and what percent of the mass it makes up.

Where it's used

Why this math matters outside the classroom:

  • Water. Students add 2 × 1.008 + 16.00 to get water's molar mass of about 18.02 g/mol.
  • Weighing reagents. Lab staff need a compound's molar mass to turn a recipe written in moles into grams they can weigh.
  • Glucose. Glucose, C₆H₁₂O₆, comes to about 180.16 g/mol, the figure used when preparing glucose solutions.
  • Confirming products. Chemists check a new compound's molar mass against mass spectrometry results to confirm what they made.

How to use it

  1. Type the formula using element symbols with the right capital letters. The first letter is upper case, and the second, if there is one, is lower case.
  2. Put the number of atoms right after each symbol or closing bracket, as in Fe2(SO4)3. Leave out a count of 1.
  3. For a hydrate (a compound with water built into its crystals) or a similar combined compound, separate the parts with a dot. You can type ·, * or a full stop, as in CuSO4*5H2O.
  4. Read the molar mass. Then check the breakdown table and the steps to see where each part of the total comes from.

What the inputs mean

Chemical formula
Capital letters change the meaning: Co is cobalt, while CO is one carbon and one oxygen. You can nest round brackets, square brackets and curly braces. A number after a closing bracket multiplies everything inside it. Charges, state labels such as (aq) and numbers in front like 2H2O aren't part of a single formula unit, so the calculator turns them away.

Formula and method

M = Σ (nᵢ × Aᵣ,ᵢ) g/mol
mass % of element i = (nᵢ × Aᵣ,ᵢ) ÷ M × 100

M is the molar mass, and Σ means "add up for every element". For each element i, nᵢ is how many of its atoms are in one formula unit. Aᵣ,ᵢ is its standard atomic weight. The units line up neatly: an atom's mass in daltons (atomic mass units) equals the grams in one mole of those atoms. So carbon's atomic weight of 12.011 means one mole of carbon atoms weighs 12.011 g.

Brackets are opened up before adding. In Fe2(SO4)3, the 3 multiplies the sulfur and the four oxygens, giving 3 sulfur and 12 oxygen atoms. In a hydrate, the number of waters multiplies the whole H2O unit. So CuSO4·5H2O carries 10 hydrogens and 5 extra oxygens.

Worked example

Find the molar mass of copper(II) sulfate pentahydrate, CuSO4·5H2O, the blue crystals often used in school labs.

  1. Count the atoms: 1 Cu, 1 S, 4 + 5 = 9 O, and 5 × 2 = 10 H.
  2. Copper: 1 × 63.546 = 63.546 g/mol. Sulfur: 1 × 32.06 = 32.06 g/mol.
  3. Oxygen: 9 × 15.999 = 143.991 g/mol. Hydrogen: 10 × 1.008 = 10.08 g/mol.
  4. Add them: 63.546 + 32.06 + 143.991 + 10.08 = 249.677 g/mol.

Result: CuSO4·5H2O has a molar mass of 249.677 g/mol, made up of 21 atoms from 4 elements.

Understanding the result

The molar mass is how many grams of the substance make one mole. To weigh out 0.1 mol of CuSO4·5H2O, you need 0.1 × 249.677 ≈ 24.97 g. To go the other way, from a weighed mass to moles, use the grams to moles calculator.

People use molecular weight, formula weight and molar mass almost as if they were the same thing. Strictly, molecular weight is a relative mass with no units, while molar mass is in g/mol. But the numbers are the same.

Assumptions and limitations

  • Atomic weights are the IUPAC abridged standard atomic weights (IUPAC is the international body that sets chemistry standards). For some elements, IUPAC gives a range, because natural mixtures of isotopes vary. These include hydrogen, carbon, oxygen, chlorine and a few others. For those, the usual single value is used, for example 1.008 for hydrogen and 35.45 for chlorine.
  • Some elements, such as technetium and plutonium, have no stable isotopes. For them, the calculator uses the mass number of their longest-lived isotope, shown in brackets in periodic tables. The result is flagged when this happens.
  • The result is for each element's natural mix of isotopes (versions with different numbers of neutrons), not one specific isotope.
  • The calculator doesn't check whether a formula describes a real or stable compound. It adds up whatever formula you enter.
  • Compounds made with specific isotopes, for example deuterated solvents (made with heavy hydrogen), need the isotope masses. Those aren't used here.
  • Ion charges and the tiny mass of electrons gained or lost are ignored. The molar mass of SO4²⁻ is taken as that of SO4.

Frequently asked questions

Why does capitalization matter in a formula?

Element symbols are either one capital letter, or a capital followed by a lower-case letter. Co is the single element cobalt, but CO is carbon followed by oxygen. Without that rule, a formula could be read two ways. So the calculator reads symbols exactly as you type them.

Is molar mass the same as molecular weight?

The number is the same, yes. Molecular weight is a relative mass with no units, and molar mass is the same number in grams per mole. Ionic solids such as NaCl don't form separate molecules. For them, people often say formula weight instead.

How do I enter a hydrate?

Write the salt, then a dot, then the number of water molecules and H2O, for example CuSO4·5H2O. If the middle dot is hard to type, an asterisk or a full stop works too: CuSO4*5H2O or CuSO4.5H2O.

Why is my answer slightly different from my textbook?

Textbooks often round atomic weights, for example using 1.01 for hydrogen or 35.5 for chlorine. This calculator uses the current IUPAC abridged values, so answers can differ in the second or third decimal place. If you need to match exactly, use the same atomic weights as your course.

How this calculator is checked

Method: Sum of atom counts times IUPAC abridged standard atomic weights (conventional values for elements with interval weights). The calculation is covered by automated tests with known reference values and edge cases. Last updated 2026-10-18. Found a problem? Tell us.

Embed this calculator

Put this Molar Mass Calculator on your own website or blog for free. Paste this code where you want it to appear: