This calculator finds grams per mole (g/mol), also called molar mass, from a chemical formula by adding the atomic masses of all atoms in it. Enter the number of each type of atom; the result is the mass of one mole of the substance, useful for chemistry calculations and study.
Formula
The molar mass is the sum of each element’s atomic weight multiplied by the number of its atoms:
M = Σ(ni × Ai)
- M is molar mass, in grams per mole (g/mol).
- ni is the number of atoms of element i in one formula unit or molecule.
- Ai is that element’s standard atomic weight, in g/mol.
For the calculator’s supported elements, use H = 1.008, C = 12.011, N = 14.007, O = 15.999, Na = 22.990, Cl = 35.45, and S = 32.06 g/mol. The list input holds the atom counts in that same order. The calculator multiplies each count by its listed atomic weight and adds the products. Enter zero for elements absent from the formula.
Worked Example
The calculator opens with zero atom counts, which produces 0 g/mol. To work out the molar mass of water, H2O, use the same formula with counts H = 2, C = 0, N = 0, O = 1, Na = 0, Cl = 0, and S = 0:
M = (2 × 1.008) + (1 × 15.999)
M = 2.016 + 15.999
M = 18.015 g/mol
Thus, water has a molar mass of 18.015 g/mol using these atomic weights. If you enter those counts in the calculator, its result is 18.015 g/mol.
Assumptions
- The chemical formula accurately represents one molecule or formula unit.
- Atomic weights are the listed IUPAC abridged standard values; the result is an average molar mass, not the mass of a particular isotopic variant.
- The calculator supports only H, C, N, O, Na, Cl, and S. For any other element, use its appropriate standard atomic weight and add its contribution separately.
- This is chemistry arithmetic for study and lab planning, not a measurement of sample purity or composition. For bench work, follow your lab method, the safety data sheet (SDS) and your supervisor.
What You’ll Need
- The substance’s correct chemical formula, including parentheses and subscripts.
- A way to identify each element’s atom count. The subscript applies to the element or parenthesized group immediately before it.
- The atomic weights for all elements in the formula. The calculator includes common values for seven elements; look up a suitable standard atomic weight for other elements.
Step-by-Step
- Write the complete formula. Check that you have the correct substance and that the formula includes every element. For example, glucose is C6H12O6; sodium chloride is NaCl.
- Count the atoms of each element. A missing subscript means one atom. In NaCl, there is one Na and one Cl. In C6H12O6, there are six C, twelve H, and six O atoms.
- Resolve parentheses and grouped formulas. Multiply every subscript inside parentheses by the subscript outside them. For Ca(OH)2, for instance, the group contributes two O and two H atoms. The calculator does not include Ca, so calculate its contribution separately or use a calculator that supports it.
- Enter the counts in the list. Put the counts in this fixed order: H, C, N, O, Na, Cl, S. Enter zero for an absent element. For H2O, enter 2, 0, 0, 1, 0, 0, 0.
- Read the result in g/mol. Each atom count is multiplied by its atomic weight, then the contributions are summed. Keep enough decimal places for the calculation; round only when a later task requires it.
- Check the formula and result independently. Confirm that no subscripts or groups were missed, and repeat the sum by hand or with a second calculation. For a substance containing an unsupported element, add its atom count times its atomic weight to the calculator’s result.
- Use molar mass only for the conversion you need. To convert a measured mass to amount of substance, divide grams by g/mol. To convert moles to grams, multiply moles by g/mol. Keep the units with each value so they cancel correctly.
Common Mistakes
- Ignoring a subscript. In CO2, the oxygen contribution is two times the oxygen atomic weight, not one times it.
- Misreading parentheses. In Al2(SO4)3, the 3 multiplies S and O within the group. A list-based count must reflect the expanded formula.
- Confusing a coefficient with a subscript. A coefficient such as 2H2O means two water molecules, not a different molar mass for water. The molar mass of H2O remains 18.015 g/mol.
- Mixing grams and g/mol. Grams describe a sample’s mass; g/mol describes the mass per mole. They are not interchangeable.
- Rounding too early. Keep the atomic-weight precision through the sum, then round the final result to a sensible precision for the task.
- Using the wrong chemical form. Hydrates, salts, and isotopically labeled compounds may have different formulas or molar masses from the unmodified compound.
Tips
- Expand complex formulas into a simple count of each element before entering values.
- For a hydrate such as CuSO4·5H2O, include the water’s atoms as part of the total formula-unit count.
- Use the same atomic-weight convention throughout a calculation, especially when comparing results from different references.
- Remember that a mole is a fixed amount of substance. Molar mass links that amount to mass; it does not tell you how many grams are in a particular container unless you also know the number of moles.
Troubleshooting
The calculator gives zero or an unexpected value: check whether the counts were entered in H, C, N, O, Na, Cl, S order, and make sure the list contains the intended values. A zero in the wrong position can silently omit an element.
The formula contains an element the calculator does not support: calculate the listed elements first, then add each missing element’s count multiplied by its standard atomic weight. Alternatively, use a calculator that accepts the full formula.
Your answer differs slightly from a reference: references may use atomic weights with different decimal precision or conventions. Check the values used, retain full precision during the sum, and compare results at the same number of decimal places.
The answer is far from the expected value: expand parentheses and hydrate groups, distinguish a molecular formula from an empirical formula, and verify that you did not treat a leading coefficient as part of the compound’s formula.
Frequently Asked Questions
Are grams per mole and molar mass the same thing?
Grams per mole is the unit commonly used for molar mass. It tells you the mass corresponding to one mole of a substance.
How do I calculate grams per mole from a chemical formula?
Multiply each element’s atomic weight by its atom count in the formula, then add all the contributions.
What is the difference between atomic mass and molar mass?
Atomic mass refers to the mass of an atom, commonly expressed in unified atomic mass units. Molar mass refers to the mass of one mole of entities and is expressed in g/mol. Their numerical values are often similar.
Does a missing subscript mean zero or one?
A missing subscript means one atom. Enter zero in the calculator only when that element is not present in the formula.
Can I calculate a compound with parentheses or a hydrate dot?
Yes, after expanding the groups into total atom counts. Multiply subscripts through parentheses, and include the atoms contributed by water in a hydrate.
Why might two molar-mass answers differ slightly?
Atomic weights may be rounded differently between references. Isotopic composition and the exact chemical form can also affect the value.
Related
Formula used
list atoms | Atom counts in formula (in the order H, C, N, O, Na, Cl, S) | 0, 0, 0, 0, 0, 0, 0 out mm | Molar mass | g/mol | sum(atoms * 1)
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
- Air Pressure and Density: How They Are Related
- Air Density and Altitude: What Changes as You Climb1.225 kg/m^3
- Density vs Pressure: What Each Measures and Why1.000 kg/m^3
- DMF Density vs Pressure Calculator949.15 kg/m3
- Density vs Pressure Graph: How to Read the Relationship1,000.046 kg/m^3
- Air Pressure vs. Air Density: What’s the Difference?