Chemical Formula Input
Total Molar Mass -- g/mol
Element Symbol Atoms Mass Contrib. (g/mol) Mass %
Key Terms Explained
Molar Mass
The mass of one mole of a substance, expressed in g/mol. Numerically equal to the molecular weight in amu.
Molecular Weight
The mass of a single molecule in atomic mass units (amu). In practice, used interchangeably with molar mass.
Atomic Mass Unit (amu)
The standard unit of atomic-scale mass, defined as 1/12 the mass of a carbon-12 atom. Also called Dalton (Da). 1 amu = 1.66054 x 10^-24 g.
Mole
A counting unit equal to 6.022 x 10^23 particles. Like "a dozen" means 12, a mole means 602,200,000,000,000,000,000,000 atoms or molecules.
Avogadro's Number
6.02214076 x 10^23 mol^-1. The number of atoms or molecules in one mole of a substance. Named after Amedeo Avogadro.
Percent Composition
The mass percentage of each element in a compound. Calculated as (element mass contribution / total molar mass) x 100%. Used to verify empirical formulas.
Isotope
Atoms of the same element with different neutron counts, giving slightly different masses. Periodic table values are weighted averages of natural isotope abundances.
Hydrate
A compound with water molecules trapped in its crystal structure, written with a dot or asterisk (e.g., CuSO4 * 5H2O). The water mass is added to the total molar mass.
Diatomic Molecule
A molecule consisting of exactly two atoms, either of the same element (H2, O2, N2, Cl2) or different elements (HCl, CO). The subscript 2 doubles the atomic mass.

The Complete Guide to Molar Mass and Molecular Weight

Whether you are working through stoichiometry homework, preparing a lab solution, or verifying a synthesis product, knowing the molar mass of your compound is the first and most critical step. This guide explains how the calculation works, how to read a chemical formula correctly, and why the percent composition table is such a powerful analytical tool.

How to Use This Calculator

Type a chemical formula in the input field using standard notation: capital letters for element symbols, lowercase for the second letter of two-letter elements (e.g., Na, Cl, Fe), and digits for atom counts (e.g., H2O, NaCl, Fe2O3). Use parentheses for grouped subunits with a multiplier (Al2(SO4)3). Use a dot or asterisk to separate a hydrate's water portion (CuSO4*5H2O or CuSO4.5H2O). The results update instantly as you type. You can also pick a preset molecule from the dropdown to see the format.

How the Parser Works

The engine uses a stack-based recursive approach that reads the formula character by character. When it sees an uppercase letter it starts a new element; a following lowercase letter completes the two-letter symbol (so "Co" is cobalt, not carbon + oxygen). A following digit (including multi-digit numbers like "12") sets the atom count for that element. When it encounters an opening parenthesis, it saves the current state to a stack and starts a fresh accumulator. When it hits a closing parenthesis followed by a number, it multiplies all the inner counts by that number and merges them back into the previous level. A dot or asterisk triggers hydrate mode, treating everything that follows as an additive group.

Reading the Percent Composition Table

The table shows four columns for each element found in your formula: the element's full name, its symbol, how many atoms of it appear in one formula unit, its total mass contribution in g/mol (atom count multiplied by atomic mass), and its percentage of the total molar mass. The percentages must always sum to 100%. If you are given a percent composition from experiment and want to identify the compound, you can compare those percentages against the table output here for candidate formulas.

Common Formula Writing Mistakes to Avoid

The most common error is capitalizing the second letter of a two-letter element (writing "CO" when you mean cobalt, CO being parsed as carbon + oxygen). Another frequent issue is omitting the multiplier after parentheses: Ca3(PO4)2 must include the 2 or the parser treats the group as appearing once. For hydrates, both dot (.) and asterisk (*) are accepted here, but some textbooks use a centered dot that may not paste correctly from a PDF. If you get an unexpected result, check your capitalization and multipliers first.

Why Molar Mass Matters in the Lab

Every volumetric preparation starts with molar mass. To make a 1 M solution of sodium chloride (NaCl, 58.443 g/mol) in 500 mL of water, you weigh out 1 mol x 58.443 g/mol x 0.5 L = 29.22 g of NaCl. Without the molar mass, you cannot convert from the grams on your scale to the moles your reaction requires. The molar mass is also the key conversion factor in yield calculations, limiting reagent problems, and gas-law applications using the ideal gas law (PV = nRT, where n is moles).

Frequently Asked Questions

Molar mass and molecular weight refer to the same concept but with slightly different technical meanings. Molecular weight (or molecular mass) is the mass of a single molecule, measured in atomic mass units (amu or Da). Molar mass is the mass of one mole (6.022 x 10^23 molecules) of that substance, expressed in grams per mole (g/mol). Numerically they are identical: the molar mass of water is 18.015 g/mol and the molecular weight of one water molecule is 18.015 amu. In everyday chemistry usage, the terms are interchangeable.

Atomic masses on the periodic table are weighted averages of all naturally occurring isotopes of each element. Isotopes are atoms of the same element with different numbers of neutrons, giving them slightly different masses. Chlorine, for example, exists as Cl-35 (about 75.77% natural abundance) and Cl-37 (about 24.23%), which averages out to the listed 35.45 amu. Because these isotope ratios are consistent throughout nature, the averaged values are exactly what you need for lab calculations involving real-world samples of elements.

A hydrate is a compound that has water molecules incorporated into its crystal structure. Its formula is written with a dot or asterisk separating the base salt from the water portion (e.g., CuSO4 * 5H2O). To find the molar mass, calculate the mass of the base salt and then add the mass of the water molecules. For CuSO4 * 5H2O: CuSO4 is 159.609 g/mol, and 5 x H2O is 5 x 18.015 = 90.075 g/mol, giving a total of 249.685 g/mol. This calculator handles the dot or asterisk notation automatically.

Percent mass composition tells you what fraction of a compound's total mass comes from each element. It is calculated by dividing the total mass contribution of one element by the overall molar mass of the compound, then multiplying by 100. For water (H2O, molar mass 18.015 g/mol): hydrogen contributes 2 x 1.008 = 2.016 g/mol, so it is 2.016 / 18.015 x 100 = 11.19%; oxygen contributes 15.999 / 18.015 x 100 = 88.81%. Percent composition is essential for verifying empirical formulas and for converting between mass and moles of specific elements in a compound.

The gram per mole (g/mol) unit bridges the atomic scale and the laboratory scale. Individual atoms are so tiny that working with single molecules is impractical. A mole (6.022 x 10^23 particles) is defined so that one mole of any element's atoms in grams equals its atomic mass in amu. This means you can directly convert between a readable mass on a scale and the number of molecules you have, using only the molar mass as a conversion factor. It is the fundamental bridge between chemistry at the molecular level and chemistry in the real-world lab.

Common Lab Solvents and Reagents: Molar Mass Reference
Compound Formula Molar Mass (g/mol) Common Use
WaterH2O18.015Universal solvent, standard reference
EthanolC2H5OH46.069Organic solvent, disinfectant
AcetoneC3H6O58.080Polar aprotic solvent, degreaser
MethanolCH3OH32.042Polar solvent, fuel, HPLC mobile phase
Hydrochloric AcidHCl36.461Acid-base reactions, pH adjustment
Sulfuric AcidH2SO498.079Strong acid, dehydrating agent
Sodium HydroxideNaOH39.997Strong base, titration standard
Sodium ChlorideNaCl58.443Ionic strength adjustment, buffer
GlucoseC6H12O6180.156Cell culture media, osmolarity standard
Ethyl AcetateC4H8O288.106Extraction solvent, column chromatography
AmmoniaNH317.031Base, buffer component
Acetic AcidCH3COOH60.052Buffer (acetate), organic acid