Molar Mass Calculator
Type a chemical formula to get its molar mass in g/mol, the percent composition by element, and grams ↔ moles, with parentheses and hydrates.
Case matters: Co is cobalt, CO is carbon monoxide. Use ( ) or [ ] for groups and · or . for hydrates.
| Element | Atoms | Atomic weight | Mass (g/mol) | % by mass |
|---|---|---|---|---|
| C Carbon | 6 | 12.011 | 72.066 | 40.00% |
| H Hydrogen | 12 | 1.008 | 12.096 | 6.71% |
| O Oxygen | 6 | 15.999 | 95.994 | 53.28% |
Grams ↔ moles
= 0.055507 mol = 3.3427e+22 formula units
= 90.0780 g
What Molar Mass Calculator Does
This molar mass calculator reads a chemical formula as you type it (including parentheses, square brackets and hydrates such as CuSO4·5H2O) and returns the molar mass in grams per mole, a breakdown by element with percent composition, and a converter between grams, moles and number of formula units.
Atomic weights are the IUPAC standard values shown to three decimal places (H 1.008, C 12.011, O 15.999), the same precision used in most textbooks and answer keys. Elements with no stable isotopes, such as technetium or radon, have no standard atomic weight; for those the mass number of the longest-lived isotope is used and shown in brackets.
How to Use Molar Mass Calculator
- Type a chemical formula, or tap an example
- Read the molar mass in g/mol and the Hill-order formula
- Check each element’s contribution and percent by mass
- Convert between grams and moles below the result
Formula Used by Molar Mass Calculator
Molar mass
M = Σ (atoms of each element × its atomic weight)
Worked example
Glucose, C6H12O6.
- C: 6 × 12.011 = 72.066
- H: 12 × 1.008 = 12.096
- O: 6 × 15.999 = 95.994
- 72.066 + 12.096 + 95.994
Result: 180.156 g/mol: 40.00% C, 6.71% H, 53.28% O by mass.
Grams, moles and particles
moles = grams ÷ M · particles = moles × Nₐ
- Nₐ
- Avogadro constant, exactly 6.02214076 × 10²³ per mole
Worked example
10 g of glucose.
- 10 ÷ 180.156 = 0.05551 mol
- 0.05551 × 6.02214076 × 10²³
Result: 0.0555 mol, or about 3.343 × 10²² molecules.
Molar Masses of Common Compounds
| Compound | Formula | Molar mass (g/mol) |
|---|---|---|
| Water | H₂O | 18.015 |
| Ammonia | NH₃ | 17.031 |
| Carbon dioxide | CO₂ | 44.009 |
| Ethanol | C₂H₅OH | 46.069 |
| Sodium chloride | NaCl | 58.440 |
| Calcium hydroxide | Ca(OH)₂ | 74.092 |
| Sodium bicarbonate | NaHCO₃ | 84.006 |
| Sulfuric acid | H₂SO₄ | 98.072 |
| Calcium carbonate | CaCO₃ | 100.086 |
| Glucose | C₆H₁₂O₆ | 180.156 |
| Caffeine | C₈H₁₀N₄O₂ | 194.194 |
| Copper(II) sulfate pentahydrate | CuSO₄·5H₂O | 249.677 |
Source: CIAAW — Standard Atomic Weights
How to Read Your Result
Why your textbook may differ slightly
Some books round atomic weights to two decimals or fewer (H 1.01, O 16.00), which moves the answer in the second decimal place. Water comes out as 18.02 instead of 18.015. Use the precision your course asks for; the element table shows the weights used so you can match them.
Hydrates
The water in a hydrate is part of the solid’s mass, so it counts. Anhydrous copper sulfate, CuSO₄, is 159.604 g/mol; the blue pentahydrate is 249.677 g/mol, about 36% water by mass.
Limitations & Accuracy Notes
- Ionic charges written at the end of a formula (SO4^2-) are ignored; the mass of the electrons is negligible for this purpose.
- Isotope-specific formulas (such as D₂O written with D) are not supported; use the element symbol H and correct separately if needed.
- Standard atomic weights apply to normal terrestrial materials; isotopically enriched samples differ.
Frequently Asked Questions
How do you calculate molar mass?
Multiply each element’s atomic weight by the number of its atoms in the formula and add them up. For water, H₂O: 2 × 1.008 + 15.999 = 18.015 g/mol. The same number in grams is one mole of the substance.
What is the difference between molar mass and molecular weight?
Numerically they are the same. Molecular weight (or molecular mass) is expressed in atomic mass units (u or Da) for one molecule; molar mass is in grams per mole for 6.02214076 × 10²³ of them. 18.015 u per water molecule means 18.015 g/mol.
How do I enter parentheses and hydrates?
Type them as written: Ca(OH)2, Al2(SO4)3, K4[Fe(CN)6]. For hydrates, join the parts with a dot, · or *: CuSO4·5H2O or CuSO4.5H2O. A number at the start of a part multiplies that whole part.
How do I convert grams to moles?
Divide the mass in grams by the molar mass: 10 g of glucose (180.156 g/mol) is 10 ÷ 180.156 = 0.0555 mol. To go from moles to grams, multiply. Both conversions are under the result.
What is percent composition?
The share of a compound’s mass that comes from each element. Glucose, C₆H₁₂O₆, is 40.00% carbon, 6.71% hydrogen and 53.29% oxygen by mass. It is the starting point for empirical-formula problems.
Why does capitalization matter?
Because element symbols are case-sensitive: Co is cobalt, but CO is carbon monoxide (one carbon, one oxygen). Every symbol starts with a capital letter, and a second letter, if any, is lowercase.
Which atomic weights are used?
IUPAC standard atomic weights, shown to three decimal places: for example H 1.008, C 12.011, O 15.999, Cl 35.45. Elements with no stable isotopes, such as technetium, use the mass number of their longest-lived isotope, shown in brackets.
References & Further Reading
- CIAAW — Standard Atomic Weights — IUPAC Commission on Isotopic Abundances and Atomic Weights
- CIAAW — Abridged Standard Atomic Weights
- NIST CODATA — Avogadro constant — Exact since the 2019 SI redefinition