Molar Mass Calculator
Type a chemical formula such as Ca(OH)2 or CuSO4·5H2O to get its
molar mass in g/mol, the mass percent of every element and the Hill formula. Then convert between
grams, moles and number of particles for the same substance.
Formula and molar mass
- Hill formula
- —
- Total atoms
- —
- Elements
- —
† This formula contains an element with no standard atomic weight. The mass number of its longest-lived isotope is used, so the result is approximate.
Composition by element
Enter a valid formula to see the composition.
| Symbol | Element | Atoms | Atomic weight (g/mol) | Mass (g/mol) | Mass % |
|---|
Grams, moles and particles
Particles are molecules, or formula units for ionic substances. Avogadro constant: 6.02214076 × 1023 per mol (exact).
Atomic weights used
Show the table of all 118 elements
| No. | Symbol | Name | Atomic weight (g/mol) |
|---|
Conventional standard atomic weights (abridged values, in g/mol) with IUPAC spellings of the names. Values in square brackets with † are mass numbers of the longest-lived isotope, used for elements that have no standard atomic weight.
Everything is calculated in your browser. Nothing you type is sent anywhere.
How to use the molar mass calculator
- Type a chemical formula in the box or tap one of the example buttons. Capital letters matter:
Cois cobalt,COis carbon monoxide. - Group atoms with round, square or curly brackets, for example
Ca(OH)2orK4[Fe(CN)6]. Write a hydrate with a middle dot, a full stop or an asterisk before the water:CuSO4·5H2O. - Read the molar mass in g/mol, the formula with proper subscripts, the Hill formula and the total number of atoms.
- Check the table and the bar for the mass each element contributes and its mass percent.
- To convert, type a mass in grams or an amount in moles. The other value and the number of particles update at once.
What is molar mass?
Molar mass is the mass of one mole of a substance, written in grams per mole (g/mol). A mole is an amount of substance containing exactly 6.02214076 × 1023 elementary entities, such as atoms, molecules or formula units. That number is the Avogadro constant, NA. Since 2019 its value has been fixed by definition instead of being measured. One mole of water molecules has a mass of 18.015 g.
Written in g/mol, the molar mass is numerically equal to the relative molecular mass or relative formula mass of the substance, which has no unit. Water has a relative molecular mass of 18.015 and a molar mass of 18.015 g/mol.
How it works
The calculator reads the formula, counts every atom and adds the standard atomic weight of each atom:
M = Σ (ni × Ai)
Here M is the molar mass in g/mol, ni is the number of atoms of
element i in the formula and Ai is the standard atomic weight of
that element in g/mol. The sum runs over all elements in the formula. The arithmetic uses whole
numbers, so no floating-point noise appears; the result is rounded to three decimals.
The percent composition and the conversions use the same numbers:
mass % of i = ni × Ai / M × 100
n = m / M, m = n × M, N = n × NA
In these formulas m is a mass in grams, n an amount in moles and
N a number of particles. Each mass percent is rounded to two decimals, so the displayed
values can add up to 99.99 % or 100.01 %. The table tells you when that happens.
How brackets and hydrates are counted
A number right after a closing bracket multiplies every atom inside it, and brackets can be nested. In
Al2(SO4)3 the group SO4 occurs three times, which gives 3 S and 12 O. In
K4[Fe(CN)6] the group CN is counted six times inside the square brackets. In a hydrate
such as CuSO4·5H2O the dot separates two parts, and the number in front of the second
part multiplies all of its atoms: 5 H2O means 10 H and 5 O. The atoms of all parts are added together.
The Hill formula lists carbon first and hydrogen second, then all other elements in alphabetical
order. When there is no carbon, every element is sorted alphabetically. Ethanol C2H5OH
becomes C2H6O and sulfuric acid H2SO4 becomes H2O4S.
Examples
Example 1: water, H2O. 2 × 1.008 + 15.999 = 18.015 g/mol. Hydrogen
contributes 2.016 g/mol (11.19 %) and oxygen 15.999 g/mol (88.81 %). The molecule has 3 atoms.
Example 2: calcium hydroxide, Ca(OH)2.
40.078 + 2 × (15.999 + 1.008) = 40.078 + 34.014 = 74.092 g/mol. The atoms are Ca 1, O 2 and
H 2, five in total. By mass the compound is 54.09 % calcium, 43.19 % oxygen and 2.72 % hydrogen.
Example 3: copper sulfate pentahydrate, CuSO4·5H2O.
63.546 + 32.06 + 4 × 15.999 + 5 × 18.015 = 249.677 g/mol. The atom count is Cu 1, S 1, O 9
and H 10, which makes 21 atoms. Copper makes up 25.45 % of the mass.
Example 4: grams, moles and molecules. For 36.03 g of water,
n = 36.03 / 18.015 = 2.000 mol and N = 2.000 × 6.02214076 × 1023 =
1.204 × 1024 molecules. In the other direction, 0.5 mol of NaCl (58.44 g/mol) has a
mass of 0.5 × 58.44 = 29.22 g.
Molar mass, molecular weight and formula mass
The three terms are often used as if they were the same, but they differ slightly. Molar mass has the unit g/mol and applies to any substance. Molecular weight, or relative molecular mass, is a pure number and applies to substances made of discrete molecules, such as water or carbon dioxide. Formula mass, or relative formula mass, is also a pure number and is used for ionic compounds and other lattices, such as NaCl or SiO2, which do not form separate molecules. For a given substance all three have the same numerical value, so this page gives one number and calls it the molar mass.
Why atomic weights differ in the last digit
Most elements are mixtures of isotopes, which are atoms with the same number of protons but different masses. A standard atomic weight is an average of the isotope masses weighted by their natural abundance. Chlorine is roughly 76 % chlorine-35 and 24 % chlorine-37, so its average is 35.45 even though no single chlorine atom has that mass.
Abundances vary slightly with the source of the sample. For hydrogen, carbon, oxygen, sulfur, chlorine and a few other elements IUPAC publishes an interval and a conventional single value. Tables also round differently: a textbook may give 22.99 for sodium, another 22.98977. Results can differ in the third decimal, so use the periodic table your course uses.
Elements without stable isotopes, such as technetium, promethium and polonium, and all heavier elements except thorium, protactinium and uranium, have no standard atomic weight. The table shows the mass number of the longest-lived known isotope in square brackets with a dagger. Results that include them are approximate.
Common mistakes
- Wrong capitals.
COis carbon monoxide (28.010 g/mol), whileCois cobalt (58.933 g/mol). A formula typed entirely in lowercase is rejected. - Forgetting the multiplier. In
Mg(NO3)2the 2 applies to N and O together: 2 N and 6 O. - Leaving out the water of hydration.
CuSO4andCuSO4·5H2Oare different substances with different molar masses.
Frequently asked questions
What is the difference between molar mass and molecular weight?
Molar mass is expressed in g/mol, molecular weight is a dimensionless relative mass. For the same substance they have the same number, for example 18.015 for water.
Why do Co and CO give different results?
Element symbols are case sensitive. A capital letter followed by a lowercase letter is one element (Co, cobalt). Two capitals are two elements (C and O, carbon monoxide).
Can I enter ions and charges?
No. Enter the neutral formula, for example NaCl or Al2(SO4)3.
How do I find the number of molecules in a sample?
Divide the mass by the molar mass to get moles, then multiply by the Avogadro constant. The conversion card does both steps. For ionic compounds the result counts formula units.
Is my data private?
Yes. The calculation runs in your browser and nothing is uploaded. Your last formula and values stay in your own browser storage.
Related tools
- Chemical Equation Balancer — balance a reaction equation before working with moles.
- Significant Figures Calculator — round a result to the right number of significant figures.
- Unit Converter — convert between grams, kilograms and other units.
- Percentage Calculator — percentages and percent change for any numbers.
- Ideal Gas — simulate gas particles and see pressure, volume and temperature interact.