A compound molar mass calculator adds the atomic masses of every atom shown in a chemical formula and returns the compound’s molar mass in grams per mole (g/mol). Enter a correctly written formula’s element counts as a list of atomic-mass contributions; the calculator below demonstrates the calculation for a specified compound, sodium chloride (NaCl), using the standard atomic weights shown.
Formula
For a compound containing more than one element, its molar mass is the sum of each element’s atomic mass multiplied by the number of atoms of that element in one formula unit:
M = Σ(ni × Ai)
- M is molar mass, in g/mol.
- ni is the number of atoms of element i in the chemical formula; it is a count and has no unit.
- Ai is that element’s standard atomic weight, expressed here in g/mol.
For this calculator, the formula is M = n × 22.990 + cl × 35.45. The constants are the abridged standard atomic weights for sodium (Na) and chlorine (Cl). The calculator is a concrete example of the general method; it does not parse arbitrary formula text. For another compound, identify each element and its subscript, then include each element’s atomic-weight contribution.
Worked Example
The default inputs correspond to sodium chloride, NaCl: one sodium atom and one chlorine atom per formula unit.
- Sodium contribution: 1 × 22.990 g/mol = 22.990 g/mol.
- Chlorine contribution: 1 × 35.45 g/mol = 35.45 g/mol.
- Add the contributions: 22.990 + 35.45 = 58.440 g/mol.
Result: 58.440 g/mol. The calculator displays this as 58.440 g/mol to three decimal places.
Assumptions
- The formula represents a single chemical compound with a definite elemental composition.
- Atomic weights use the stated abridged standard values; naturally occurring isotope variation can cause small differences.
- The result is a formula-based molar mass, not a measurement of a particular sample’s purity or composition.
- This example does not include waters of crystallization, counterions, or other components unless they appear in the formula.
How to Calculate a Compound’s Molar Mass
Read the chemical formula, count the atoms of each element, look up the corresponding atomic weights, multiply each weight by its atom count, and add the products. Subscripts apply to the element immediately before them, while parentheses group atoms that are multiplied by a subscript outside the parentheses.
For example, water is H2O. It contains two hydrogen atoms and one oxygen atom. Using H = 1.008 and O = 15.999 g/mol:
M(H2O) = 2 × 1.008 + 1 × 15.999 = 18.015 g/mol.
For calcium hydroxide, Ca(OH)2, the outside subscript 2 applies to both O and H. The atom count is one Ca, two O, and two H. Using Ca = 40.078, O = 15.999, and H = 1.008 g/mol gives 40.078 + 2 × 15.999 + 2 × 1.008 = 74.092 g/mol. This is why expanding grouped formula units before adding is a useful error check.
What the Result Means
Molar mass links an amount of substance in moles to its mass in grams. Once a suitable molar mass is known, the basic relationships are:
- Mass from moles: mass (g) = amount (mol) × molar mass (g/mol).
- Moles from mass: amount (mol) = mass (g) ÷ molar mass (g/mol).
For instance, the molar mass of NaCl is 58.440 g/mol, so one mole of NaCl has a mass of about 58.440 g under this atomic-weight convention. A mole is a count of particles, not a mass; the molar mass provides the conversion between these quantities. Molar mass is also distinct from molecular mass, which is commonly expressed in unified atomic mass units (u), although the numerical values are closely related.
Common Formula and Rounding Errors
- Missing a subscript: H2O has two hydrogen atoms, not one. A missing count changes the total.
- Misreading parentheses: In Al2(SO4)3, the group occurs three times: there are two Al, three S, and twelve O atoms.
- Confusing a coefficient with a subscript: The 2 in 2H2O means two water molecules. It doubles the mass if calculating that entire quantity, whereas the molar mass of water itself remains 18.015 g/mol.
- Using the wrong chemical form: A hydrate, salt, or ion may have a different formula from the anhydrous neutral compound. Include all atoms actually represented.
- Rounding too early: Keep several digits for each contribution, add them, and round the final result to a precision suitable for the calculation. Atomic weights and measured sample masses do not imply unlimited experimental precision.
- Mixing units: Atomic weights used in the calculation must be in g/mol if the answer is to be reported in g/mol. Do not add a mass in grams directly to a molar-mass contribution.
A further distinction matters for ionic compounds: the formula often describes a formula unit rather than a discrete molecule. NaCl is therefore commonly described by its formula mass or molar mass, even though the same atom-counting sum applies.
Limits and Choosing Atomic Weights
Standard atomic weights are suitable for most ordinary stoichiometry and classroom calculations. Some elements have atomic weights that vary with natural isotopic composition; a specific sample can therefore differ slightly from a tabulated conventional value. If an exact isotope composition is specified, calculate with the isotope masses and abundances appropriate to that sample rather than treating the standard atomic weight as exact for every specimen.
The calculator’s inputs are whole-number atom counts for a two-element example. They do not accept parentheses, charges, isotope labels, or a general formula string. For formulas with more elements, hydrates, or polyatomic groups, write out each element count carefully and sum the contributions using a reliable atomic-weight table. The result describes the formula, not the purity, hydration state, or measured composition of material in a container.
Frequently Asked Questions
How do I find the molar mass of a compound?
Multiply each element’s atomic weight by its count in the formula, then add all the results. Check subscripts and parentheses before doing the arithmetic.
What is the molar mass of NaCl?
Using Na = 22.990 and Cl = 35.45 g/mol, NaCl has a molar mass of 22.990 + 35.45 = 58.440 g/mol.
Is molar mass the same as molecular weight?
They are often used informally to mean the same numerical sum. More precisely, molar mass is mass per mole, usually in g/mol, while molecular mass is the mass of one molecule, commonly expressed in u.
Do parentheses change the calculation?
They group atoms so an outside subscript multiplies every atom inside. In Ca(OH)2, for example, the group contains two O atoms and two H atoms.
Why can published molar masses differ slightly?
Sources may use different rounding conventions or atomic-weight values. Natural isotope composition can also vary, so a standard table value is an appropriate conventional value rather than a guarantee for every sample.
Related
Formula used
in n | Sodium atoms | atoms | 1 | 0 in cl | Chlorine atoms | atoms | 1 | 0 out mm | Molar mass | g/mol | n * 22.990 + cl * 35.45 | 3
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
- Calculator in Hindi: Meaning, Usage and Examples0.2000 mol/L
- Volume Strength Formula in Terms of Molarity11.20 volumes
- H2O2 Volume Strength to Molarity Calculator0.893 mol/L
- Volume Strength to Molarity: Formula and Calculator0.0409 mol/L
- Molar Volume: Definition, Formula, and Calculator22.414 L/mol
- Molar Volume of a Gas Calculator and Formula22.4140 L/mol