Proofwell
Menu

Molar Mass Calculator

Enter a chemical formula to get its molar mass in g/mol and the percentage of each element by mass. Brackets, hydrates and charged ions all work, and the working shows every atomic weight used.

Chemistry · QuantitiesUpdated Sources cited

Element symbols are case-sensitive (Co is cobalt, CO is carbon monoxide). Brackets and hydrates work: Ca(OH)2, CuSO4·5H2O or CuSO4*5H2O.
Examples:

Result

Molar mass of C₆H₁₂O₆

180.16 g/mol

Molecular formula (Hill order): C₆H₁₂O₆ · 24 atoms

Contribution of each element
ElementAtomsAtomic weightMass% by mass
C Carbon612.01172.0740.00%
H Hydrogen121.00812.106.71%
O Oxygen615.99995.9953.28%
Assumptions behind this result
  • Atomic weights are the IUPAC CIAAW abridged standard atomic weights (2024 revision), which apply to normal terrestrial samples.

Step-by-step solution

  1. Step 1: Count the atoms of each element

    Expand any brackets and hydrate parts by multiplying the subscripts. C₆H₁₂O₆ contains 24 atoms in total.

    C:6H:12O:6\begin{aligned} \text{C} &: 6 \\ \text{H} &: 12 \\ \text{O} &: 6 \end{aligned}
  2. Step 2: Multiply each count by the atomic weight

    Look up the standard atomic weight of each element (in g/mol) and multiply by the number of atoms.

    C:6×12.011=72.066H:12×1.008=12.096O:6×15.999=95.994\begin{aligned} \text{C} &: 6 \times 12.011 = 72.066 \\ \text{H} &: 12 \times 1.008 = 12.096 \\ \text{O} &: 6 \times 15.999 = 95.994 \end{aligned}
  3. Step 3: Add the contributions

    The sum is the molar mass. It is given to 2 decimal places, matching the precision of the atomic weights used.

    M=72.066+12.096+95.994=180.16 g/molM = 72.066 + 12.096 + 95.994 = 180.16\ \text{g/mol}
  4. Step 4: Find the percentage of each element by mass

    Divide each element’s contribution by the molar mass and multiply by 100. The percentages add up to 100%.

    C:72.066180.16×100=40.00%H:12.096180.16×100=6.71%O:95.994180.16×100=53.28%\begin{aligned} \text{C} &: \frac{72.066}{180.16} \times 100 = 40.00\% \\ \text{H} &: \frac{12.096}{180.16} \times 100 = 6.71\% \\ \text{O} &: \frac{95.994}{180.16} \times 100 = 53.28\% \end{aligned}

What the calculator does

For any formula it gives:

  • the molar mass in g/mol, to the precision the atomic weights support;
  • the number of atoms of each element;
  • each element’s contribution to the mass, and its percentage by mass;
  • the molecular formula in Hill order (carbon first, then hydrogen, then alphabetical).

How to enter a formula

Write For
H2SO4 ordinary formulas
Ca(OH)2, K4[Fe(CN)6] groups in round or square brackets, nested if needed
CuSO4·5H2O or CuSO4*5H2O hydrates
SO4^2-, NH4+ ions

Element symbols are case-sensitive: Co is cobalt but CO is carbon monoxide.

The formula

M=∑ini Ar(i) g/molM = \sum_i n_i \, A_r(i)\ \text{g/mol}

Here nᵢ is the number of atoms of element i in the formula and Aᵣ(i) is its standard atomic weight. The mass percentage of an element is

% i=ni Ar(i)M×100\%\,i = \frac{n_i\,A_r(i)}{M} \times 100

Worked example: glucose, C₆H₁₂O₆

  1. Count atoms. 6 carbon, 12 hydrogen and 6 oxygen.
  2. Multiply by atomic weights. 6 × 12.011 = 72.066; 12 × 1.0080 = 12.096; 6 × 15.999 = 95.994.
  3. Add. M = 72.066 + 12.096 + 95.994 = 180.156 g/mol. The atomic weights of C, H and O carry uncertainties that add up to about ±0.02 g/mol, so the result is reported as 180.16 g/mol.
  4. Percentages. Carbon 40.00%, hydrogen 6.71%, oxygen 53.28%.

Common mistakes

  • Applying a subscript to the wrong atoms. In Ca(OH)₂ the 2 applies to both O and H, giving 2 O and 2 H.
  • Forgetting the water in a hydrate. The water of crystallisation is part of the formula’s mass.
  • Lower-case symbols. co2 is not a formula; carbon dioxide is CO2.
  • Over-precise answers. Sulfur’s atomic weight is only known to ±0.02 because its isotopic composition varies in nature, so a molar mass containing sulfur cannot be meaningful to three decimal places.

Practical applications

  • Making solutions. Mass needed = concentration × volume × molar mass.
  • Stoichiometry. Converting between grams and moles is the first step in any reaction calculation.
  • Empirical formulas. Percent composition data from combustion analysis lead back to a formula.
  • Fertilisers and food labels. The percentage of nitrogen in a fertiliser, or of sodium in salt, comes from percent composition.

Assumptions and limitations

Atomic weights are the IUPAC abridged standard values, which apply to normal terrestrial materials. Samples with unusual isotopic composition, such as enriched uranium or deuterated compounds, have different molar masses. Elements with no stable isotopes have no standard atomic weight; the calculator uses the mass number of the longest-lived isotope and says so. Isotope labels such as D and ¹³C are not supported.

Frequently asked questions

What is the difference between molar mass and molecular weight?

Molar mass is the mass of one mole of a substance, in g/mol. Relative molecular mass (often called molecular weight) is the same number without units, relative to one twelfth of the mass of a carbon-12 atom. For water, the molar mass is 18.015 g/mol and the relative molecular mass is 18.015.

Why does the calculator give 18.015 g/mol for water when my textbook says 18.02?

Both are correct to their stated precision. The calculator uses the current IUPAC abridged atomic weights (H = 1.0080, O = 15.999) and shows as many decimal places as those values support. Textbooks often round to two decimal places.

How do I enter a hydrate such as copper sulfate pentahydrate?

Use a dot or an asterisk between the parts, CuSO4·5H2O or CuSO4*5H2O. The number after the dot multiplies everything in the water part.

Do electrons change the molar mass of an ion?

Only negligibly. Each electron adds 0.000549 g/mol, far below the precision of the atomic weights, so molar masses of ions are conventionally the same as for the neutral formula.

Why are atomic weights not whole numbers?

Most elements are mixtures of isotopes with different masses, and the atomic weight is their abundance-weighted average. Chlorine, for example, is about 76% chlorine-35 and 24% chlorine-37, giving 35.45.

References

  1. IUPAC Commission on Isotopic Abundances and Atomic Weights. Abridged standard atomic weights (2024 revision).
  2. Prohaska, T. et al. (2022). Standard atomic weights of the elements 2021 (IUPAC Technical Report). Pure and Applied Chemistry, 94(5), 573–600.
  3. BIPM (2019). The International System of Units (SI Brochure), 9th edition: definition of the mole.