Type a formula such as H2SO4 or Ca(OH)2 and get the molar mass in grams per mole, with every step shown. The same page gives the percent composition by element and converts between grams and moles.
Capitalization matters: Co is cobalt, CO is carbon monoxide. For hydrates, use a dot: CuSO4.5H2O.
How to enter a formula
Write element symbols with the correct capitalization: Co is cobalt, CO is carbon monoxide. Put subscripts as plain numbers (H2O), use parentheses for groups (Ca(OH)2) and a dot for hydrates (CuSO4·5H2O). The calculator adds up each atom’s atomic mass and shows the working line by line.
Examples
- Sulfuric acid, H2SO4: 98.072 g/mol
- Calcium hydroxide, Ca(OH)2: 74.092 g/mol
- Copper(II) sulfate pentahydrate, CuSO4·5H2O: 249.677 g/mol
- Water, H2O: 18.015 g/mol
- Carbon dioxide, CO2: 44.009 g/mol
What is molar mass?
Molar mass is the mass of one mole of a substance, expressed in grams per mole (g/mol). Numerically it equals the sum of the atomic masses of the atoms in the formula, where atomic mass is given in atomic mass units (amu, also written u). For water, 2 × 1.008 + 15.999 ≈ 18.015.
Percent composition
The percent composition tells you what fraction of a compound’s mass each element contributes. For water it is 11.19% hydrogen and 88.81% oxygen. It is the starting point for finding empirical formulas.
Grams to moles
Divide the mass in grams by the molar mass to get moles; multiply moles by the molar mass to get grams. Enter a mass in the converter and the page does both directions.
Atomic masses used
Values follow the IUPAC/CIAAW 2024 tables, the same used by the interactive periodic table. For hydrogen, carbon, nitrogen, oxygen, sulfur and chlorine, whose masses vary slightly in nature, the calculator uses the conventional values. Results may differ in the last decimal from a textbook that rounds atomic masses.
Related chemistry tools
- Interactive periodic table: tap any element to see its atomic mass, electron configuration and electronegativity
- Element symbols: all 118 symbols with atomic numbers and a printable periodic table
Frequently asked questions
How do I calculate molar mass by hand?
Look up the atomic mass of each element, multiply by the number of atoms in the formula, and add. The calculator shows these steps.
What is the difference between molar mass and molecular weight?
They are numerically the same; molar mass is in g/mol and molecular weight is relative (unitless, or in amu).
Why does my textbook give a slightly different answer?
Books round atomic masses differently, for example 1.01 instead of 1.008 for hydrogen. Differences appear in the last digit.
Does it handle hydrates and parentheses?
Yes. Use a dot for the water of crystallization and parentheses for repeated groups.
Are lowercase letters a problem?
Yes: capitalization matters. Co (cobalt) and CO (carbon monoxide) are different formulas.