My Calculator

Molar Mass / Molecular Weight Calculator

Type any chemical formula to instantly get its molar mass (molecular weight), full percent composition by element, and a step-by-step breakdown of the calculation.

⚛ Chemical formula

Type a formula like H2O or Ca(OH)2, or search a compound by name — e.g. "sulfuric acid".

Try an example
⚛ Molar mass result

Water — Molar mass

18.015g/mol

Formula parsed: H2O

Σ

3

Total atoms in formula

2

Distinct elements

g

18.015 g

Mass of 1 mole

u

2.991e-23 g

Mass of 1 molecule

Quick check: 1 mole of H2O weighs 18.015 g, so 18.015 g of H2O is exactly 1 mole (6.022 × 10²³ formula units).

Percent Composition by Mass

How much each element contributes to the total mass of H2O.

Live calculation
O
H
Oxygen×1
88.81%
Hydrogen×2
11.19%

Total molar mass: 18.015 g/mol across 3 atoms

Step-by-Step Molar Mass Calculation

Here's exactly how this answer was calculated, one step at a time.

Given: Formula: H2O

  1. Step 1: Read the formula and list each element with its subscript

    Every element symbol in a chemical formula is followed by a subscript that shows how many atoms of that element are in one unit of the compound. A missing subscript means 1 atom.

    O: 1, H: 2
  2. Step 2: Look up the atomic mass of Oxygen (O) and multiply by its atom count

    15.999 × 1 = 15.999 g/mol
  3. Step 3: Look up the atomic mass of Hydrogen (H) and multiply by its atom count

    1.008 × 2 = 2.016 g/mol
  4. Step 4: Add up every element's contribution

    The molar mass of the whole compound is simply the sum of the mass contributed by every atom in the formula.

    15.999 + 2.016 = 18.015 g/mol

Molar mass:

18.015 g/mol

Molar Mass Calculator: Find Molecular Weight Instantly

This molar mass calculator finds the molecular weight of any chemical formula in seconds. Just type a formula such as H2O, C6H12O6, or Ca(OH)2 and the tool reads every element and subscript, looks up each atomic mass, and adds everything together. It also breaks the compound down by percent composition, so you can see exactly how much of the total mass comes from each element.

This tool is built for chemistry students, lab workers, teachers, pharmacy students, and anyone who needs a quick, reliable molecular weight without pulling out a periodic table and a calculator every time. It supports parentheses, nested groups, and hydrate formulas written with a dot, such as CuSO4·5H2O, so you can check almost any compound you come across in class or in the lab.

What Is Molar Mass?

Molar mass is the mass of one mole of a substance. One mole is a fixed number of particles — 6.022 × 10²³ of them, known as Avogadro's number. So the molar mass tells you how many grams one mole of a compound weighs. It is written in grams per mole, or g/mol.

Every element already has its own atomic mass listed on the periodic table. Carbon is about 12.011, oxygen is about 15.999, and hydrogen is about 1.008. To get the molar mass of a whole compound, you simply add up the atomic masses of every atom in its formula. Water, H2O, has two hydrogen atoms and one oxygen atom, so its molar mass is about 18.015 g/mol.

Molar Mass vs Molecular Weight vs Atomic Mass

People often use molar mass and molecular weight to mean the same thing, and in everyday chemistry that is fine. Molecular weight is technically a ratio with no units, while molar mass is expressed in g/mol, but the number is the same either way. This calculator shows the value with g/mol so it is ready to use directly in real calculations.

Atomic mass is different — it refers to a single atom, not a whole compound. When a compound is made of ions rather than true molecules, like table salt, chemists sometimes prefer the term formula mass. Again, the math is identical: add up the atomic mass of every atom shown in the formula.

How the Molar Mass Formula Works

The rule behind every molar mass calculation is simple: molar mass equals the sum of (atomic mass × number of atoms) for every element in the formula. There is no shortcut around this step — you have to know how many atoms of each element are present, then multiply and add.

For glucose, C6H12O6, there are 6 carbon atoms, 12 hydrogen atoms, and 6 oxygen atoms. The calculation is (6 × 12.011) + (12 × 1.008) + (6 × 15.999), which adds up to about 180.156 g/mol. This calculator performs that exact process automatically and shows every line of working underneath the result.

How to Calculate Molar Mass Step by Step

Start by writing out the formula clearly and listing every element with its subscript. A subscript is the small number written after an element symbol; if there is no number, it means there is exactly one atom of that element in the formula.

Next, look up the atomic mass of each element from a periodic table. Multiply each atomic mass by its subscript to find how much mass that element contributes. Finally, add every element's contribution together to get the total molar mass. This calculator lays out each of these steps separately, so you can follow along or check your own homework line by line.

Reading a Chemical Formula: Subscripts, Brackets and Hydrates

A subscript after an element, like the 2 in H2O, tells you how many atoms of that element are in the formula. Brackets, such as the parentheses in Ca(OH)2, mean everything inside is repeated by the number right after the closing bracket — so Ca(OH)2 has one calcium, two oxygens, and two hydrogens.

Many salts absorb water into their crystal structure, forming what chemists call a hydrate. This is shown with a dot and a number before H2O, for example CuSO4·5H2O, which means five water molecules are attached to every unit of copper sulfate. This calculator understands the dot, the middle dot (·), and the asterisk (*) as hydrate separators, so you can type the formula the way it usually appears in a textbook.

Molar Mass of Common Compounds

Some compounds come up again and again in chemistry class and in the lab, so it helps to know their molar mass by heart. Water, H2O, is about 18.015 g/mol. Carbon dioxide, CO2, is about 44.009 g/mol. Table salt, NaCl, is about 58.44 g/mol. Sulfuric acid, H2SO4, is about 98.079 g/mol, and glucose, C6H12O6, is about 180.156 g/mol.

Calcium carbonate, the main mineral in limestone and chalk, comes out to about 100.09 g/mol, while ammonia, NH3, is about 17.031 g/mol. You do not need to memorise these numbers — this calculator gives them instantly, along with the working, for any formula you type in.

Why Molar Mass Matters in Real Chemistry

Molar mass is the bridge between the world you can measure — grams on a balance — and the world chemists actually think in, which is moles and particles. Without molar mass, you cannot convert grams to moles, and without moles, you cannot balance chemical reactions or predict how much product a reaction will make.

In real laboratories, molar mass is used to weigh out the correct amount of a reagent, prepare solutions of a known concentration, calculate drug dosages in pharmacy, and work out yields in industrial chemical processes. Anywhere a recipe calls for a certain number of moles of a substance, molar mass is the number that turns that requirement into something you can actually weigh.

Percent Composition by Mass: What It Tells You

Percent composition shows what fraction of a compound's total mass comes from each individual element. To find it, divide the mass contributed by one element by the total molar mass, then multiply by 100. This calculator does this automatically and displays it as a colour-coded bar with a percentage next to each element.

Percent composition is useful for checking the purity of a sample, working out an empirical formula from lab data, and understanding fertiliser labels, food labels, and mineral compositions. For example, knowing that water is about 11.19% hydrogen and 88.81% oxygen by mass explains why oxygen dominates water's weight even though there are twice as many hydrogen atoms.

Common Mistakes When Calculating Molar Mass

The most common mistake is forgetting that a subscript applies only to the element or bracketed group directly before it, not to the whole formula. Another frequent error is misreading capitalisation — chemical symbols always start with one capital letter, so CO means carbon monoxide, while Co means the element cobalt. Typing them the wrong way completely changes the compound.

People also forget to multiply the numbers inside brackets by the number outside the brackets, and they sometimes forget the extra water molecules in a hydrate formula entirely. This calculator flags unrecognised element symbols and shows the parsed formula clearly, so these small mistakes are easy to catch before they affect a bigger calculation.

Molar Mass Calculator FAQ and Quick Reference

To find molar mass by hand, list every element in the formula, multiply each atomic mass by its subscript, and add the results together. The unit is always grams per mole, g/mol. For hydrates, remember to add the mass of the attached water molecules using the number before H2O.

This free online molar mass calculator is meant for learning, homework checking, and everyday lab planning. For regulated, clinical, or safety-critical work, always confirm the compound's identity, purity, and exact molar mass using a certified reference or the reagent's certificate of analysis before you rely on it for a real procedure.

Frequently Asked Questions

What is the formula for molar mass?

Molar mass equals the sum of each element's atomic mass multiplied by how many atoms of that element appear in the formula.

Is molar mass the same as molecular weight?

In practice, yes — both give the same number in g/mol. Molecular weight is technically unit-less, while molar mass is expressed in grams per mole.

What is the molar mass of water?

Water, H2O, has a molar mass of about 18.015 g/mol (2 hydrogen atoms at 1.008 plus 1 oxygen atom at 15.999).

How do I calculate the molar mass of a hydrate like CuSO4·5H2O?

Add the molar mass of the base compound to five times the molar mass of water — the dot means the water molecules are simply added on.

How is percent composition calculated from molar mass?

Divide the mass contributed by one element by the compound's total molar mass, then multiply by 100 to get a percentage.