Live results as you type
The molar mass updates on every keystroke. If a symbol is wrong, the exact character is highlighted so you can fix it quickly.
Free chemistry tool · No sign-up
Type any chemical formula, or simply a name like glucose, and this molar mass calculator gives you the answer in g/mol instantly. You also get percent composition, the empirical formula, step-by-step working and a grams to moles converter in one place.
Case matters: Co is cobalt, CO is carbon monoxide.
Try an example
Molar mass
g/mol
C6H12O6
| Element | Atoms | Atomic mass | Mass (g/mol) | Mass % |
|---|---|---|---|---|
| Total | 24 | 180.156 | 100% |
Uses the molar mass calculated above.
n = m ÷ Mm = n × MN = n × NAWhy it is better
Most molar mass tools stop at a single number. This one explains the answer, handles tricky formulas and turns the result into something you can use at the bench.
The molar mass updates on every keystroke. If a symbol is wrong, the exact character is highlighted so you can fix it quickly.
Round, square and curly brackets, nested groups, hydrates such as CuSO4·5H2O, decimal subscripts, isotopes D and T, and ion charges.
Not sure of the formula? Type water, baking soda or caffeine. The calculator recognises over 80 common names and fills in the formula.
See the mass contribution and mass percent of every element with a visual bar, so you never need a separate percent composition calculator.
Convert between mass, moles and number of molecules with the molar mass you just found. Edit any field and the other two update.
Every multiplication and the final sum are written out, so you can check the method or copy it into homework and lab reports.
How to use
You only need a formula. Everything else is calculated for you in four quick steps.
Type a formula such as H2SO4 or Ca(OH)2, or a name like glucose. Capital letters matter, so Co is cobalt while CO is carbon monoxide.
The result appears instantly in g/mol. Then choose 2, 3 or 4 decimal places to match your textbook or lab sheet.
Review the atoms, atomic masses, mass contributions and percent composition of each element, plus the full working.
Finally, enter grams, moles or particles in the converter. The other two values are calculated from the same molar mass.
The method
Molar mass is the mass of one mole of a substance, measured in grams per mole (g/mol). One mole contains exactly 6.02214076 × 1023 particles, which is Avogadro’s number. To find the molar mass of a compound, you add up the atomic masses of every atom in its formula.
A number after a bracket multiplies everything inside it. For example, Ca(OH)2 contains two oxygen atoms and two hydrogen atoms. For a hydrate such as CuSO4·5H2O, add five water molecules (5 × 18.015 = 90.075) to CuSO4 (159.602). The total is 249.677 g/mol.
Need to round the answer for a test? Use our significant figures calculator to match the precision of your data.
Worked example
Conversions
Once you know the molar mass, converting between mass and amount is a single step. The grams to moles calculator built into the tool above does this automatically, but the formulas are simple.
n = m ÷ Mm = n × MN = n × 6.022 × 1023For example, 25 g of sodium chloride is 25 ÷ 58.440 = 0.428 mol. Likewise, 0.5 mol of carbon dioxide weighs 0.5 × 44.009 = 22.00 g. If you are scaling a reaction, our molarity calculator turns grams into solution concentrations, our ratio calculator helps with mole ratios, and the unit converter handles mg, kg and other units.
Reference table
These values use the same atomic weights as the calculator. Select Calculate on any row to see its full breakdown.
| Compound | Molar mass (g/mol) | Action |
|---|---|---|
| WaterH2O | 18.015 | |
| Carbon dioxideCO2 | 44.009 | |
| Sodium chlorideNaCl | 58.440 | |
| GlucoseC6H12O6 | 180.156 | |
| SucroseC12H22O11 | 342.297 | |
| Sulfuric acidH2SO4 | 98.072 | |
| Hydrochloric acidHCl | 36.458 | |
| Nitric acidHNO3 | 63.012 | |
| Sodium hydroxideNaOH | 39.997 | |
| AmmoniaNH3 | 17.031 | |
| MethaneCH4 | 16.043 | |
| EthanolC2H5OH | 46.069 | |
| Calcium carbonateCaCO3 | 100.086 | |
| Sodium bicarbonateNaHCO3 | 84.006 | |
| Potassium permanganateKMnO4 | 158.032 | |
| CaffeineC8H10N4O2 | 194.194 | |
| Copper sulfate pentahydrateCuSO4·5H2O | 249.677 | |
| Oxygen gasO2 | 31.998 |
Key terms
These three terms give the same number for a compound. However, they differ in meaning and units, which matters in exams and lab reports. It is also why a molar mass calculator doubles as a molecular weight calculator.
The mass of one mole of a substance, in g/mol. You use it to convert grams to moles when preparing solutions or balancing reactions.
The mass of one molecule relative to one twelfth of a carbon-12 atom. It is unitless or given in daltons (Da), so glucose is 180.156 Da.
Used for ionic compounds like NaCl, which form crystal lattices instead of separate molecules. It is calculated from one formula unit in the same way.
Benefits
The tool runs entirely in your browser. Nothing you type is uploaded, it works offline once loaded, and it is free with no sign-up.
Check homework and exam practice in seconds. The working shows each step, so you learn the method instead of copying a number.
Project it in class and share a link that opens with your formula loaded. It is a quick way to demonstrate percent composition.
Weigh out reagents with 4 decimal precision and convert target moles to grams before you prepare a solution.
Verify formula weights for hydrates, salts and active ingredients during formulation, quality checks and stoichiometry work.
FAQ
It reads a chemical formula, counts the atoms of each element and multiplies each count by that element’s standard atomic weight. Then it adds the results to give the molar mass in grams per mole (g/mol). This one also shows percent composition and converts grams to moles.
Multiply the atomic mass of each element by the number of its atoms in the formula, then add everything together. For example, the molar mass of CO2 is 12.011 + 2 × 15.999 = 44.009 g/mol.
The molar mass of water is 18.015 g/mol. It comes from two hydrogen atoms (2 × 1.008 = 2.016) plus one oxygen atom (15.999).
Divide the mass in grams by the molar mass. For 36 g of water, 36 ÷ 18.015 = 1.998 mol. The converter on this page does it for you as soon as you enter a formula.
They share the same number but not the same units. Molar mass is given in g/mol, while molecular weight is unitless or expressed in daltons. So glucose has a molar mass of 180.156 g/mol and a molecular weight of 180.156 Da.
Put a dot, an asterisk or a middle dot between the parts, for example CuSO4.5H2O, CuSO4*5H2O or CuSO4·5H2O. Round, square and curly brackets all work, including nested groups like K4[Fe(CN)6].
Radioactive elements such as technetium and plutonium have no stable isotopes, so they have no standard atomic weight. Instead, the calculator uses the mass number of the longest-lived isotope and marks the result as approximate.
It uses IUPAC standard atomic weights, with the conventional values for elements whose isotopes vary in nature (for example H = 1.008, C = 12.011 and O = 15.999). These match most textbooks and periodic tables, so your answers will agree with class notes.
Ready when you are
Whether you are balancing equations, preparing a solution or revising for an exam, this molar mass calculator gives a precise answer with the working to back it up. Bookmark it and try your next formula now.
Calculate a molar mass