CalcPro

Molecular Weight Calculator

Molar mass of a compound from its chemical formula.

Breaking down the formula

Molecular weight (also called molar mass) is the sum of atomic masses for all atoms in a chemical compound. When you enter a formula like H₂O or NaCl, the calculator identifies each element, counts how many atoms are present, and adds up their standard atomic weights from the periodic table.

The result is expressed in grams per mole (g/mol)—the mass of one mole (6.022 × 10²³ particles) of that substance.

The formula

Molar Mass = Σ(atomic weight × atom count) for each element

Worked example

Let's calculate the molar mass of glucose (C₆H₁₂O₆):

  1. Carbon atoms: 6 × 12.01 g/mol = 72.06 g/mol
  2. Hydrogen atoms: 12 × 1.008 g/mol = 12.10 g/mol
  3. Oxygen atoms: 6 × 16.00 g/mol = 96.00 g/mol
  4. Total: 72.06 + 12.10 + 96.00 = 180.16 g/mol

This means one mole of glucose weighs 180.16 grams. If you had a sample of glucose that weighed 90 grams, you'd have approximately 0.5 moles.

Another example: calcium carbonate (CaCO₃)

  • Calcium: 1 × 40.08 = 40.08
  • Carbon: 1 × 12.01 = 12.01
  • Oxygen: 3 × 16.00 = 48.00
  • Total: 100.09 g/mol

Entering your formula

Type the chemical formula exactly as it appears in chemistry notation:

  • Use element symbols with correct capitalization (H, not h; Ca, not CA)
  • Numbers after an element show atom count (H₂O has 2 hydrogen atoms)
  • Use parentheses for polyatomic groups: Ca(OH)₂ means one calcium, two oxygen, and two hydrogen atoms
  • Leave out the "1" for single atoms (write O₂, not O₂)

The calculator uses standard atomic weights from the IUPAC periodic table, rounded to two decimal places for practical chemistry work.

Common mistakes

Forgetting parentheses: Writing CaOH₂ instead of Ca(OH)₂ gives the wrong answer—the subscript only applies to the element immediately before it.

Mismatched capitalization: Element symbols are case-sensitive. "CO" (carbon monoxide) is different from "Co" (cobalt).

Skipping the subscript: H2O and HO are different compounds with completely different molar masses.

Typos in formula: Double-check your entry against a reliable source. One wrong atom or number changes the result significantly.

Why this matters

Molar mass is essential for converting between grams and moles—a fundamental step in stoichiometry, solution preparation, and chemical calculations. If you're mixing chemicals, determining reaction yields, or preparing a solution of known concentration, you need the accurate molar mass. It's also used to find empirical formulas and verify compound identity in labs.

This calculator provides an estimate based on standard atomic weights. For specialized work requiring isotope-specific masses or extreme precision, consult NIST or primary chemical databases.

Frequently asked questions

What's the difference between molecular weight and molar mass?

Molecular weight is the mass of a single molecule (in atomic mass units). Molar mass is the mass of one mole of that substance (in grams per mole). For practical purposes in chemistry, they're numerically identical—H₂O has a molecular weight of 18 u and a molar mass of 18 g/mol.

Can I use this for compounds with charge (ions)?

Yes. The charge doesn't affect molar mass—it's based only on the atoms present. So Ca²⁺ and CaCl₂ have the same molar mass as neutral calcium and calcium chloride. Enter the formula without the charge symbol.

How do I enter a formula with parentheses?

Use standard parentheses notation. For example, aluminum sulfate is Al₂(SO₄)₃. The subscript after the parenthesis multiplies all atoms inside: 2 aluminum, 3 sulfur, and 12 oxygen atoms total.

Why does my calculated result differ slightly from a reference source?

Different sources may use slightly different atomic weight values (standard vs. natural abundance). This calculator uses IUPAC standard atomic weights rounded to 2 decimal places, which is standard for general chemistry. Differences are usually less than 0.1%.

Can I calculate molar mass for mixtures or alloys?

No—this calculator works for pure chemical compounds with a defined formula. For mixtures, you'd calculate the molar mass of each component separately, then find a weighted average based on composition.

What if I have a complex organic formula with many atoms?

Enter it exactly as written. Formulas like C₁₂H₂₂O₁₁ (sucrose) work fine. The calculator handles any number of elements and atoms—just ensure correct capitalization and parentheses.