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.
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.
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.
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.
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
These are exactly the values the calculator shows when you type Ca(OH)2 with a 10 g sample.
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.
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.
The atomic masses the tool uses are the IUPAC standard ones, with their source given in the periodic table.
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.
© 2026 Simuveliq. All rights reserved.