How to use this calculator
Type a chemical formula into the first box. Element symbols are case-sensitive, parentheses and square brackets can be nested, and hydrates can be written with a middle dot, an asterisk or a period: CuSO4·5H2O, CuSO4*5H2O or CuSO4.5H2O. The molar mass fills in immediately, and a table shows how many atoms of each element there are and what share of the mass they contribute — the percent composition.
Then enter a mass to get moles and number of particles, or a number of moles to find how many grams to weigh out. If you already know the molar mass, skip the formula and type it straight into the molar mass field; from a measured mass and amount, the calculator works the molar mass out instead.
The formula
- M
- molar mass
- m
- mass of sample
- n
- amount of substance
- N
- number of particles
Worked example
How many moles and how many molecules are in 10 g of water (H₂O)?
- Molar mass of H₂O = 2 × 1.008 + 15.999 = 18.015 g/mol.
- n = m / M = 10 / 18.015 = 0.5551 mol.
- N = n × N_A = 0.5551 × 6.02214076 × 10²³ = 3.343 × 10²³ molecules.
Ten grams of water is 0.555 mol, or about 334 sextillion molecules.
Molar masses of common compounds
| Compound | Formula | g/mol |
|---|---|---|
| Water | H₂O | 18.015 |
| Carbon dioxide | CO₂ | 44.009 |
| Sodium chloride | NaCl | 58.44 |
| Calcium carbonate | CaCO₃ | 100.086 |
| Glucose | C₆H₁₂O₆ | 180.156 |
| Sulfuric acid | H₂SO₄ | 98.072 |
Values use IUPAC abridged standard atomic weights, the same figures printed in most textbook periodic tables.
Assumptions and limits
- Atomic weights are IUPAC abridged standard values for natural isotopic abundance. Isotopically enriched samples (e.g. heavy water, D₂O) need exact isotope masses.
- For elements with no stable isotopes (Tc, Pm, Po and heavier), the mass number of the longest-lived isotope is used.
- Charges are ignored: enter SO4 for sulfate; the electron mass is negligible.
Frequently asked questions
What is the difference between molar mass and molecular weight?
Numerically they are the same. Molar mass has units of g/mol; molecular weight (relative molecular mass) is dimensionless, or expressed in daltons per molecule.
How do I find percent composition?
Divide each element’s mass contribution by the total molar mass. The table under the formula box does this for you — water is 11.19% hydrogen and 88.81% oxygen by mass.
Why does CO give a different answer than Co?
Symbols are case-sensitive. Co is cobalt (58.933 g/mol); CO is carbon monoxide, one carbon plus one oxygen (28.010 g/mol).
Sources
- IUPAC Commission on Isotopic Abundances and Atomic Weights — Standard atomic weights
- NIST — Avogadro constant (exact, SI 2019)
Related calculators
- Molarity CalculatorMass, moles, volume and concentration.
- Percent Yield CalculatorTheoretical and actual yield of a reaction.
- Mass Percent CalculatorPercent by weight, w/v and solution volume.
More in Chemistry calculators.