Skip to main content

Free Molar Mass Calculator – Molar Mass and Mass Percent from Any Formula

Type any chemical formula to get its molar mass in g/mol plus a per-element table of atom counts, atomic weights and mass percent, using IUPAC 2021 atomic weights.

Written & reviewed by Helperzy Editorial Team · Updated July 2026

Molar MassMass % CompositionHydrates & BracketsMass ⇄ MolesIUPAC 2021Free

Capitalisation matters. Brackets ( ) [ ] nest, and a hydrate dot can be typed as ·, * or .

Try a Common Compound

249.677 g/mol

Molar mass of CuSO4·5H2O · the molecular weight is the same number in u

4

Distinct Elements

21

Atoms per Formula Unit

0.04005

Moles in Your Sample

Per-Element Breakdown

ElementAtomsAtomic MassSubtotalMass %
O Oxygen915.9990143.99157.67%
Cu Copper163.546063.54625.45%
S Sulfur132.060032.06012.84%
H Hydrogen101.008010.0804.04%
Total21249.677100.00%

Each mass percent is rounded independently for display, so the column can read 99.99% or 100.01%. The unrounded figures sum to exactly 100%.

The Working, With Your Numbers

  1. 1. Atom counts: Cu 1, H 10, O 9, S 1
  2. 2. M = Σ (count × atomic weight) = 1 × 63.5460 + 10 × 1.0080 + 9 × 15.9990 + 1 × 32.0600
  3. 3. M = 249.677 g/mol
  4. 4. n = m ÷ M = 10 ÷ 249.677 = 0.040052 mol
  5. 5. N = n × Nᴀ = 0.040052 × 6.02214076e23 = 2.4120e+22 formula units

Why Capitalisation Decides the Answer

Co is cobalt at 58.933 g/mol. CO is carbon monoxide at 28.010 g/mol. That is a 31 g/mol difference from one keystroke, so this parser reads an uppercase letter as the start of a symbol and lowercase letters as its continuation, exactly as chemical notation requires. An unrecognised symbol produces an error naming the offending token rather than a quiet guess. The same rule separates No (nobelium) from NO (nitric oxide) and Sn (tin) from SN (sulfur + nitrogen).

Source of the Atomic Weights

Every atomic weight here is the conventional standard atomic weight from the IUPAC 2021 Table of Standard Atomic Weights (IUPAC Technical Report), covering all 118 elements. The Avogadro constant used for the particle count is 6.02214076 × 10²³ mol⁻¹, exact by definition since the 2019 SI redefinition. Another calculator may show a few thousandths more or less if it still uses the older NIST-sourced table — sulfur was revised from 32.065 to 32.06, which shifts Fe₂(SO₄)₃ by about 0.02 g/mol. Standard atomic weights are terrestrial isotopic averages, so they do not apply to an enriched or depleted sample such as heavy water or ¹³C-labelled glucose.

100% Private

The periodic table is bundled with the page and every formula is parsed in your browser. Nothing you type is uploaded.

How to Use Molar Mass Calculator

1

Type the Chemical Formula

Enter the formula exactly as it is written in chemical notation, using a capital letter to start each element symbol. Nested brackets and hydrate dots are both supported, so Fe2(SO4)3 and CuSO4·5H2O parse correctly without any rewriting.

2

Read the Total and the Per-Element Table

The headline figure is the molar mass in g/mol, and the table below it lists every element with its atom count, atomic weight, subtotal and mass percent. Use the mass percent column for percentage-composition questions rather than recalculating by hand.

3

Add a Sample Mass to Get Moles

Type the mass you actually weighed into the optional sample field and the tool divides it by the molar mass to give moles, then multiplies by the Avogadro constant for the particle count. The working panel shows each substitution so you can copy it into a report.

What Molar Mass Is and How the Composition Table Is Built

Molar mass is the mass of one mole of a substance, written in grams per mole. It is the number you need before any weighing-out step, because a balance reads grams while a reaction equation counts moles, and molar mass is the bridge between the two. Type a formula such as CuSO₄·5H₂O and this tool returns 249.677 g/mol together with a per-element table showing exactly how much of that total each element contributes. Students reach for it during stoichiometry homework, lab technicians use it when preparing a standard solution, and percentage-composition questions need the same breakdown. Molecular weight is the identical figure expressed in unified atomic mass units, so 249.677 u and 249.677 g/mol describe the same compound. The arithmetic is a weighted sum, M = Σ (nᵢ × Aᵢ). Here M is the molar mass in g/mol, nᵢ is the count of atoms of element i in one formula unit, and Aᵢ is that element's standard atomic weight in g/mol from the IUPAC 2021 table. Mass percent for each element is (nᵢ × Aᵢ) ÷ M × 100, and the unrounded column sums to exactly 100. Moles follow from n = m ÷ M with m in grams, and the particle count is n × Nᴀ, where Nᴀ is 6.02214076 × 10²³ mol⁻¹, exact by definition since the 2019 redefinition of the mole. A recursive-descent parser reads the formula, handling nested brackets, hydrate dots, multi-digit subscripts and leading coefficients. Because an uppercase letter starts a symbol and lowercase letters continue it, an unrecognised token raises a named error instead of a silent guess. Follow copper(II) sulfate pentahydrate through. The formula CuSO₄·5H₂O contains one copper, one sulfur, nine oxygens and ten hydrogens once the five water molecules are counted in. Copper contributes 63.546, sulfur 32.060, oxygen 9 × 15.999 = 143.991 and hydrogen 10 × 1.008 = 10.080, summing to 249.677 g/mol. Divide each subtotal by that total and the composition reads oxygen 57.671%, copper 25.451%, sulfur 12.841% and hydrogen 4.037%. Weigh out 10 g of the crystals and you have 10 ÷ 249.677 = 0.040052 mol, which is 2.4120 × 10²² formula units. Other check values: H₂O is 18.015, CaCO₃ is 100.086, glucose C₆H₁₂O₆ is 180.156, NaCl is 58.4398 and sucrose C₁₂H₂₂O₁₁ is 342.297 g/mol. Three situations make the composition table matter more than the total. A student answering "what percentage of calcium carbonate is oxygen?" needs 47.956%, which comes from 47.997 ÷ 100.086 — the total alone does not answer the question. A technician preparing 250 mL of 0.15 M glucose needs 6.7558 g, obtained by multiplying 0.15 mol/L × 0.25 L × 180.156 g/mol, so an error in the molar mass propagates straight into the solution strength. And anyone working with hydrates has to decide whether the water counts: anhydrous CuSO₄ is 159.609 g/mol against 249.677 for the pentahydrate, a 56% difference that quietly ruins a preparation if the bottle label is read carelessly. One pitfall deserves naming, because it is invisible once typed. Co is cobalt at 58.933 g/mol; CO is carbon monoxide at 28.010 g/mol. A single shift key changes the answer by 31 g/mol, and the same trap catches No against NO and Sn against SN. This parser follows chemical notation strictly and warns when an all-caps pair could have been meant as one element. Atomic weights come from the IUPAC 2021 Table of Standard Atomic Weights, so an older calculator can differ in the third decimal — sulfur moved from 32.065 to 32.06, shifting Fe₂(SO₄)₃ by about 0.02 g/mol. Standard atomic weights are terrestrial isotopic averages, so they do not describe enriched material such as heavy water. Everything is parsed in your browser and nothing you type is uploaded.

Molar Mass Calculator Formula & Method

M = Σ (nᵢ × Aᵢ) M = molar mass of the compound (g/mol) nᵢ = number of atoms of element i in one formula unit (whole number) Aᵢ = standard atomic weight of element i (g/mol, IUPAC 2021 table) mass percent of element i = (nᵢ × Aᵢ) ÷ M × 100 (the unrounded column sums to exactly 100 %) moles n = m ÷ M m = sample mass in grams mass m = n × M particles N = n × Nᴀ Nᴀ = 6.02214076 × 10²³ mol⁻¹ (exact, SI 2019) Parser rules: an uppercase letter starts an element symbol and lowercase letters continue it (Co = cobalt, CO = carbon + oxygen); brackets ( ) [ ] { } nest and their trailing digits multiply the whole group; hydrate separators · * . split segments and a leading integer multiplies its segment. Rounding rule: no rounding at any intermediate step. Full double precision through the sum and through the mass-percent division; rounding only at display — total to 3 decimals, subtotals to 4, mass percent to 2. Source: IUPAC, Standard Atomic Weights of the Elements 2021 (IUPAC Technical Report), all 118 elements.

Examples: Molar Mass Calculator

Input

CuSO4·5H2O (copper(II) sulfate pentahydrate)

Result

249.677 g/mol · O 57.671% · Cu 25.451% · S 12.841% · H 4.037%

Cu 63.546 + S 32.060 + O 9 × 15.999 = 143.991 + H 10 × 1.008 = 10.080 sums to 249.677 g/mol, and each subtotal divided by that total gives the mass percent column.

Input

CaCO3, asking for the oxygen percentage

Result

100.086 g/mol · O 47.956% · Ca 40.044% · C 12.001%

Three oxygens contribute 3 × 15.999 = 47.997 g/mol, and 47.997 ÷ 100.086 × 100 = 47.956%, which is the standard textbook answer for percentage composition.

Input

Co versus CO

Result

Co = 58.933 g/mol (cobalt) · CO = 28.010 g/mol (carbon monoxide)

One shift key changes the answer by 31 g/mol, which is why the parser treats an uppercase letter as the start of a symbol and lowercase letters as its continuation.

Input

10 g of CuSO4·5H2O, converting to moles

Result

0.040052 mol · 2.4120 × 10²² formula units

n = m ÷ M = 10 ÷ 249.677 = 0.040052 mol, then multiplying by the Avogadro constant 6.02214076 × 10²³ mol⁻¹ gives the particle count.

Input

K4[Fe(CN)6] (potassium ferrocyanide, nested brackets)

Result

368.346 g/mol

The inner (CN)₆ group is multiplied by six first, then the whole [Fe(CN)₆] bracket is combined with four potassium atoms, which is what the recursive-descent parser handles automatically.

Frequently Asked Questions – Molar Mass Calculator

Molar mass is the mass in grams of one mole of a substance, given in g/mol. It equals the sum of the standard atomic weights of every atom in the formula unit. Water is 18.015 g/mol, so one mole of water weighs 18.015 grams.