Skip to content
EN - Language: English

Science and maths

Molar mass calculator

Type a formula such as H2SO4 or CuSO4·5H2O to see its molar mass worked out step by step, the percentage by mass of each element, and conversions between grams, moles and particles.

Capitals matter: Co is cobalt, but CO is carbon monoxide. Write hydrates with a dot (CuSO4·5H2O) and charges after a ^ (SO4^2-).

Examples:

Molar mass H2SO4

98.07 g/mol

ElementAtomsRelative atomic massSubtotal (g/mol)% by mass
H hydrogen21.00802.01602.06
S sulfur132.0632.0632.69
O oxygen415.99963.99665.25

Working

M = 2 · 1.0080 + 32.06 + 4 · 15.999 = 98.0720 ≈ 98.07 g/mol

The result has as many decimal places as the least precise atomic mass, and never more than two.

Mass, moles and particles

M = 98.07 g/mol. Results are given to 4 significant figures. Avogadro constant: 6.022 140 76 × 10²³ mol⁻¹ (exact).

How do you calculate molar mass?

Molar mass, MM, is the mass of one mole of a substance, in g/mol (also written g mol−1\mathrm{g\,mol^{-1}}). To work it out, take the relative atomic mass of each element from the periodic table, multiply it by the number of atoms of that element in the formula and add up the results. For sulfuric acid, H2SO4\mathrm{H_2SO_4}, with the IUPAC 2024 values:

M=2×1.0080+32.06+4×15.999=2.0160+32.06+63.996=98.0720≈98.07 g/mol\begin{aligned} M &= 2 \times 1.0080 + 32.06 \\ &\quad + 4 \times 15.999 \\ &= 2.0160 + 32.06 + 63.996 \\ &= 98.0720 \\ &\approx 98.07 \ \mathrm{g/mol} \end{aligned}

In g/mol, molar mass has the same value as the relative formula mass, MrM_r, which has no unit: for sulfuric acid, Mr=98.07M_r = 98.07. Since the mole was redefined in 2019, the match is no longer exact, but the difference is far too small to matter in practical chemistry.

A number after a bracket multiplies everything inside it: Ca(OH)2\mathrm{Ca(OH)_2} contains two oxygen atoms and two hydrogen atoms. In a hydrate such as copper(II) sulfate pentahydrate, CuSO4⋅5H2O\mathrm{CuSO_4 \cdot 5H_2O}, the water of crystallisation counts too, so its molar mass, 249.68 g/mol, includes the mass of five H2O\mathrm{H_2O} units.

Percentage by mass

The percentage by mass of an element is its share of the molar mass. For sulfur in H2SO4\mathrm{H_2SO_4}:

% S=32.0698.072×100%≈32.69%\begin{aligned} \%\,\mathrm{S} &= \frac{32.06}{98.072} \times 100\% \\ &\approx 32.69\% \end{aligned}

The calculator divides by the unrounded total (98.072 rather than 98.07) and rounds each percentage to 0.01%, so the percentages can add up to slightly more or less than 100%, e.g. 99.99% or 100.01%.

Mass, moles and particles

The amount of substance, nn (in moles), follows from the mass of the sample, mm, and the number of particles, NN, from the amount and the Avogadro constant, NAN_A:

n=mM,N=n×NAn = \frac{m}{M}, \qquad N = n \times N_A

The Avogadro constant is exact: since the 2019 revision of the SI it has been fixed at NA=6.022 140 76×1023 mol−1N_A = 6.022\,140\,76 \times 10^{23}\ \mathrm{mol^{-1}}. For example, for 9.807 g of sulfuric acid:

n=9.807 g98.07 g/mol=0.1000 mol\begin{aligned} n &= \frac{9.807\ \mathrm{g}}{98.07\ \mathrm{g/mol}} \\ &= 0.1000\ \mathrm{mol} \end{aligned}

The sample contains N=0.1000 mol×NA≈6.022×1022N = 0.1000\ \mathrm{mol} \times N_A \approx 6.022 \times 10^{22} molecules. The calculator gives these results to 4 significant figures.

Why might the last digit differ?

Periodic tables round atomic masses differently. The calculator uses the IUPAC 2024 values, such as H 1.0080, O 15.999 and S 32.06. Your textbook or exam data sheet may round them more, so check which values it uses and work with those. If your table gives H 1.0, O 16.0 and S 32.1, for example, sulfuric acid comes out at 98.1 g/mol. Some books and databases list it as 98.08 g/mol. The method is the same each time; only the atomic masses differ.

The result has as many decimal places as the least precise atomic mass in the formula, and never more than two. The atomic mass of lead, 207.2, has only one decimal place, so for lead(II) oxide, PbO\mathrm{PbO}, the calculator gives 223.2 g/mol.

What won’t the calculator accept?

  • Elements with no standard atomic weight, such as technetium (Tc) and plutonium (Pu). They have no stable isotopes and no characteristic isotopic composition on Earth, so IUPAC gives them no standard atomic weight. Periodic tables often show a whole number in square brackets for them instead: the mass number of the longest-lived isotope.
  • Formulas typed in lower case. Capitals change the meaning: Co is cobalt, but CO is carbon monoxide. So the calculator rejects “co” and asks you to type the formula correctly rather than guessing.
  • A charge typed straight after a number, such as SO42-. It could mean SO42−\mathrm{SO_4^{2-}}, or 42 oxygen atoms and a single negative charge, so put the charge after a ^: SO4^2-. With no digit before the sign, as in OH-, the ^ is not needed. The calculator ignores the charge anyway: the molar mass of an electron is only about 0.000 55 g/mol, much smaller than the last decimal place of the result (0.01 or 0.1 g/mol).

Sources

We checked the facts on this page against these sources. All of them may be reused freely: they carry an open licence or are not covered by copyright.

  1. B. Güttler et al., Metrologia 56 (2019) 044002 - Amount of substance and the mole in the SI (one mole contains exactly 6.022 140 76 × 10²³ entities; molar mass from relative atomic masses, with M_u still 1 g/mol to the accuracy practical chemistry needs) · CC BY 3.0
  2. S. Lower, Chem1 (LibreTexts) - 4.2: Avogadro's Number and the Mole (grams to moles by dividing by the molar mass, moles to particles by multiplying by the Avogadro constant) · CC BY 3.0
  3. S. Lower, Chem1 (LibreTexts) - 4.3: Formulas and Their Meaning (molar mass as the sum of the atomic weights in the formula; percentage composition) · CC BY 3.0
  4. S. Lower, Chem1 (LibreTexts) - 4.6: Significant Figures and Rounding (a sum keeps as many decimal places as its least precise term) · CC BY 3.0
  5. P. R. Young, Introductory Chemistry Online (LibreTexts) - 4.2: Molar Mass (the molar mass in g/mol has the same value as the formula mass in u) · CC BY-SA 4.0
  6. PubChem (NCBI) - Sulfuric acid, CID 1118, computed properties (molecular weight as the sum of the masses of the atoms in the formula; listed as 98.08 g/mol) · public domain
  7. Wikibooks - General Chemistry/Formulas and Numbers (formula mass, molar mass in g/mol, percentage composition) · CC BY-SA 4.0
  8. Wikidata - chemical element (Q11344; the element names the calculator shows) · CC0 1.0
  9. Wikipedia - Molar mass · CC BY-SA 4.0
  10. Wikipedia - Standard atomic weight · CC BY-SA 4.0
  11. Wikipedia - Avogadro constant · CC BY-SA 4.0
  12. Wikipedia - Chemical formula · CC BY-SA 4.0
  13. Wikipedia - Water of crystallization · CC BY-SA 4.0
  14. Wikipedia - Electron mass · CC BY-SA 4.0

Other tools