molecalculator

Moles & Molar Mass

Molar Mass: How to Calculate It from a Chemical Formula

Calculator No. 01-4116 · Updated · Formula and assumptions shown below

The calculator on this page is switched off while it is checked. The formula is below, and the worked example shows how to do the sum by hand.

For study and lab planning. The result follows from the numbers you enter and the formula shown. Check it against your method before you weigh, mix or dilute anything, follow the safety data sheet and your supervisor, and do not use it for clinical, dosing or medication work.

Calculate a compound’s molar mass by adding the atomic masses of every atom in its chemical formula. Enter a formula’s atom counts as a mass-weighted sum to find the result in grams per mole (g/mol); the example below shows the arithmetic for sodium chloride.

Formula

Molar mass = Σ (number of atoms of each element × atomic mass of that element). In symbols, M = Σ(niAi). Here, M is the compound’s molar mass in g/mol, ni is the number of atoms of element i in one formula unit or molecule (a count, with no unit), and Ai is that element’s standard atomic weight expressed in g/mol. The calculator’s input is the finished molar mass you have calculated from the formula; it returns that value in g/mol. Use the periodic table to supply atomic weights and count each element using subscripts and parentheses.

This is a composition-based calculation: it does not require a sample mass or a number of moles. The periodic-table values are relative atomic masses conventionally used as g/mol for molar-mass calculations. This page uses IUPAC abridged standard atomic weights, including H = 1.008, C = 12.011, N = 14.007, O = 15.999, Na = 22.990, and Cl = 35.45 g/mol. Elements whose standard atomic weights are given as intervals can require a stated convention; use the value specified by your course or reference.

Worked Example

Calculate the molar mass of sodium chloride, NaCl. Its formula contains one sodium atom and one chlorine atom. The calculator input default, 58.44 g/mol, is the sum rounded to two decimal places.

  1. Write the atomic contributions: sodium contributes 1 × 22.990 = 22.990 g/mol; chlorine contributes 1 × 35.45 = 35.45 g/mol.
  2. Add the contributions: M = 22.990 + 35.45 = 58.440 g/mol.
  3. Round to the calculator’s displayed precision of zero decimal places: 58 g/mol. The input value itself is 58.44 g/mol; the calculator reports it as 58 at the selected precision.

For a result that preserves the conventional two-decimal value in this example, the reported molar mass is 58.44 g/mol. Calculator display precision controls rounding only; it does not change the chemical formula or the underlying sum.

Assumptions

  • The chemical formula correctly represents the substance and its stated composition.
  • Atomic weights are the abridged standard values listed in the formula section; a particular isotope composition may require isotope-specific masses instead.
  • The calculator accepts a molar mass already calculated from the formula and displays that entered value; it does not parse a chemical formula automatically.

What You’ll Need

  • The complete chemical formula, including subscripts, parentheses, and any hydrate notation.
  • A reliable periodic table with atomic weights, plus a calculator or paper for multiplication and addition.
  • A consistent rounding rule, such as the number of significant figures required by your assignment or lab method.

Step-by-Step

  1. Write the formula exactly. Identify whether the substance is a molecule, an ionic compound, or a hydrate. Preserve all subscripts and parentheses. For example, Ca(OH)2 contains one Ca, two O, and two H atoms—not one of each.
  2. Count atoms of each element in one formula unit. A missing subscript means 1. A subscript outside parentheses multiplies every atom inside: in Al2(SO4)3, there are 2 Al, 3 S, and 12 O atoms. Multiply through nested groups carefully if the formula has them.
  3. Account for hydrate water. In a formula such as CuSO4·5H2O, include five water molecules: add 10 H atoms and 5 O atoms to the counts already in CuSO4. The centered dot indicates water of crystallization, not multiplication of the whole salt formula.
  4. Look up each element’s atomic weight. Use the same periodic table or assigned reference throughout. Keep enough digits during the calculation; do not round each atomic weight prematurely. Atomic weights are not the same as atomic numbers: carbon’s atomic number is 6, but its standard atomic weight is about 12.011 g/mol.
  5. Multiply each weight by its atom count. For each element, calculate n × A. For Ca(OH)2, for instance, the contributions are 1 × A(Ca), 2 × A(O), and 2 × A(H). Parentheses affect the count, not the atomic weight.
  6. Add every contribution. The total is the molar mass in g/mol. Check that each element in the formula appears exactly once in your sum with its full atom count.
  7. Round the final answer appropriately. Follow the precision required by the task. Retain guard digits through the sum, then round once at the end. If you enter the result in this page’s calculator, type the molar mass in g/mol; the output is that value rounded to the chosen display precision.
  8. Use the value only with matching units. To convert a sample mass to amount of substance, use moles = mass in grams ÷ molar mass in g/mol. For example, grams divided by g/mol gives mol. Do not substitute a molecular mass in daltons without checking the context and units.

Common Mistakes

  • Ignoring subscripts or parentheses: Ca(OH)2 has two oxygen atoms and two hydrogen atoms. In a longer formula, expand each group before adding.
  • Misreading hydrate notation: The coefficient after the dot applies to the water formula. Include both its hydrogen and oxygen atoms.
  • Using atomic number instead of atomic weight: Atomic number counts protons; it is not the mass value required in this sum.
  • Mixing units or conventions: Keep atomic weights in g/mol and report molar mass in g/mol. Isotope-specific samples and interval atomic weights may not match a single conventional table value exactly.
  • Rounding too early: Rounding every contribution can shift the final total. Keep extra digits until the final answer.
  • Confusing molar mass with sample mass: A molar mass describes one mole of a substance; it is not the number of grams present in a particular container.

Tips

  • Make a small table with columns for element, atom count, atomic weight, and contribution. This makes omissions easier to spot.
  • Do a formula-count check before calculating: the atom counts should agree with the subscripts after all groups and hydrates are expanded.
  • Keep units on the final line. Each atomic contribution is in g/mol, so their sum is also in g/mol.
  • For ionic substances, use the formula unit as written. The calculation does not depend on whether the substance exists as separate molecules in the solid.
  • For an isotope-labeled compound, use the specified isotope masses and abundances or the requested convention rather than an ordinary average atomic weight.

Troubleshooting

Your answer is much too small or large: Recheck parentheses, hydrate coefficients, and every subscript. A missing multiplier on a large group can cause a substantial error.

Your total differs slightly from a reference: Check which atomic-weight table and rounding rule the reference uses. Some elements have natural atomic-weight intervals, and texts may show fewer digits. Compare unrounded totals before assuming the method is wrong.

The formula includes a charge: A charge does not add or remove a whole atom, so it does not change this atom-count sum. However, electron mass is usually negligible at ordinary classroom precision. If a task specifically asks for the mass of an ion at high precision, follow its stated convention.

The calculator result looks rounded: It displays the entered molar mass at zero decimal places in this setup. The worked example’s full value is 58.44 g/mol; the displayed integer is only a rounding choice. For more decimal places, use the unrounded sum in your working or a calculator configured for greater precision.

Frequently Asked Questions

What is molar mass?
Molar mass is the mass of one mole of a substance, usually expressed in grams per mole (g/mol).

How do I calculate molar mass from a chemical formula?
Count each element’s atoms, multiply each count by its atomic weight, and add the contributions.

Does a subscript outside parentheses multiply every atom inside?
Yes. In Al2(SO4)3, the 3 gives 3 sulfur atoms and 12 oxygen atoms.

Do I include water in a hydrate?
Yes. Include the number of water molecules shown after the dot and multiply both H and O counts by that number.

Is molar mass the same as molecular mass?
They describe related quantities but use different units: molecular mass is commonly expressed in daltons, while molar mass is expressed in g/mol.

Why can two sources give slightly different answers?
They may use different atomic-weight precision, rounding, or conventions for elements with variable natural isotope composition.

For bench work, follow your lab method, the safety data sheet (SDS), and your supervisor.

Related

Formula used
in mm | Molar mass | g/mol | 58.44 | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.

More in this section

The whole Moles & Molar Mass section →