Simuveliq

Molar mass calculator

Type a chemical formula —H2SO4, Ca(OH)2, Fe2(SO4)3, CuSO4·5H2O, K4[Fe(CN)6]— and get its molar mass in g/mol, the percent composition by mass of each element and, if you give the sample mass, the moles and the number of formula units. Every step is explained: count the atoms, multiply by the atomic mass and add.

What you can do

Sources

Atomic masses, ionization energies, melting points and names from Wikidata, public-domain data (CC0 1.0), checked one by one by Simuveliq. Atomic masses are the IUPAC standard ones.

Guide: molar mass, moles and percent composition

Molar mass links what you weigh on a balance (grams) with what counts in a chemical reaction (number of particles). Almost every general chemistry calculation, such as stoichiometry, preparing solutions or empirical formulas, starts with it. This guide explains how it is calculated, how to go from grams to moles and particles, and how percent composition is found.

The mole and molar mass

One mole contains exactly 6.022 140 76 × 10²³ entities (atoms, molecules, ions or formula units); this is the Avogadro constant, NA, whose value has been exact by definition in the SI since 2019. The molar mass M of a substance is the mass of one mole, in g/mol, and numerically it equals the sum of the atomic masses of the atoms in its formula.

How atoms are counted

Worked example: calcium hydroxide

With the standard atomic weights Ca = 40.078, O = 15.999 and H = 1.008:

M[Ca(OH)2] = 1·40.078 + 2·15.999 + 2·1.008 = 74.092 g/mol

  1. Moles in 10 g: n = m / M = 10 / 74.092 ≈ 0.13497 mol.
  2. Formula units: N = n · NA = 0.13497 · 6.022 × 10²³ ≈ 8.128 × 10²² formula units.
  3. Percent composition (each element's contribution divided by M): Ca 40.078/74.092 = 54.09 %; O 31.998/74.092 = 43.19 %; H 2.016/74.092 = 2.72 %. They add up to 100 %.

These are exactly the values the calculator shows when you type Ca(OH)2 with a 10 g sample.

Example with a hydrate

For copper(II) sulfate pentahydrate, CuSO4·5H2O (Cu = 63.546, S = 32.06): M = 63.546 + 32.06 + 9·15.999 + 10·1.008 = 249.677 g/mol. The water of hydration contributes 5 · 18.015 = 90.075 g/mol, that is, 36.08 % of the mass: that is what is lost when the blue crystal is heated to give the white anhydrous sulfate.

The reverse path: the empirical formula

If the percent composition is known, the ratio of atoms can be found. For example, a compound with 40.0 % C, 6.71 % H and 53.3 % O: 100 g contains 40.0/12.011 = 3.33 mol of C, 6.71/1.008 = 6.66 mol of H and 53.3/15.999 = 3.33 mol of O. Dividing by the smallest, the ratio is 1 : 2 : 1 and the empirical formula is CH2O. The molecular formula also needs the actual molar mass (glucose, C6H12O6, has this same empirical formula). The calculator does not do this step, but it is useful to check the result: the composition of the formula you get must match the data.

How to use the calculator

  1. Type the formula with parentheses or brackets if it has them, for example Fe2(SO4)3 or K4[Fe(CN)6]; hydrates with a period or ·, for example CuSO4·5H2O.
  2. Optionally, type the sample mass in grams: you get the moles and the number of formula units.
  3. Read the per-element table (atoms, atomic mass, contribution and percentage) and the step-by-step solution.

Common mistakes

The atomic masses the tool uses are the IUPAC standard ones, with their source given in the periodic table.

Further reading

R. Chang and K. A. Goldsby, Chemistry (McGraw-Hill); T. L. Brown, H. E. LeMay, B. E. Bursten et al., Chemistry: The Central Science (Pearson). Simuveliq is not affiliated with these authors or publishers.

More tools

Versión en español

© 2026 Simuveliq. All rights reserved.