Molecular Weight Calculator
Find the molar mass of any chemical formula in g/mol, with percent composition by element, empirical formula, the full steps and a grams to moles converter.
One mole of glucose, 6.022 × 10²³ molecules, weighs 180.16 grams.
Bar widths show the share of the molar mass contributed by each element.
Element composition
Atoms of each element, its standard atomic weight and its share of the molar mass.
| Element | Atoms | Atomic weight | Mass (g/mol) | Mass % |
|---|---|---|---|---|
| Carbon (C) | 6 | 12.011 | 72.066 | 40.00% |
| Hydrogen (H) | 12 | 1.0080 | 12.096 | 6.71% |
| Oxygen (O) | 6 | 15.999 | 95.994 | 53.28% |
Your calculation
The same steps the calculator runs, with your formula.
- Count the atoms of each element: C 6, H 12, O 6.
- C: 6 × 12.011 = 72.066 g/mol.
- H: 12 × 1.0080 = 12.096 g/mol.
- O: 6 × 15.999 = 95.994 g/mol.
- Add the contributions: 72.066 + 12.096 + 95.994 = 180.156 g/mol, shown rounded as 180.16 g/mol.
- Mass percent of C: 72.066 ÷ 180.156 × 100 = 40.00%.
- One molecule: 180.156 g/mol ÷ 6.02214076 × 10²³ mol⁻¹ = 2.9916 × 10⁻²² g.
Grams, moles and particles
Type a mass or an amount. The other field updates from the molar mass above.
100 g ÷ 180.156 g/mol = 0.55507 mol, which is 3.3427 × 10²³ molecules.
Uses the CIAAW abridged standard atomic weights for normal terrestrial materials. Isotopically labeled or enriched samples differ.
How the Molecular Weight Calculator Works
This molecular weight calculator reads a chemical formula, counts every atom of every element, multiplies each count by the standard atomic weight of that element and adds the results. The total is the molar mass in grams per mole (g/mol), the mass of 6.02214076 × 10²³ molecules or formula units. The same number, without units, is the molecular weight that textbooks and safety data sheets print.
Alongside the molar mass you get the percent composition by element, the formula in Hill order, the empirical formula, the mass of a single molecule and a converter between grams, moles and particles. Every result uses the abridged standard atomic weights published by the IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW), so a value you compute by hand from the table on this page matches the calculator exactly.
The calculator keeps full precision through the sum and rounds only for display. The hero shows two decimals; the composition table and the steps show up to four, so you can see where each digit comes from.
Molecular Weight vs Molar Mass vs Formula Mass
Molar mass (M) is the mass of one mole of a substance, in g/mol. Molecular weight, formally relative molecular mass (Mr), is the same number with no unit: the mass of one molecule divided by one twelfth of the mass of a carbon 12 atom. Molecular mass is the mass of one molecule in daltons (Da), also written u.
For water all three read 18.015: Mr = 18.015, one molecule is 18.015 Da, and one mole is 18.015 g. One dalton is 1.66053906892 × 10⁻²⁷ kg (CODATA 2022). Formula mass is the same sum for ionic solids such as NaCl or CaCO3, which are built from repeating formula units instead of separate molecules, so the calculator calls their particles formula units.
How to Use the Calculator
- Element symbols. Type them with correct case: Co is cobalt, CO is carbon monoxide.
- Counts. A number after a symbol or a closing bracket multiplies it. No number means one.
- Brackets. Use ( ), [ ] or { } and nest them, as in K4[Fe(CN)6].
- Hydrates. Separate the water with ·, a period or an asterisk: CuSO4·5H2O, CuSO4.5H2O or CuSO4*5H2O.
- Ions. Add the charge at the end, as in SO4^2− or NH4+. It is reported and ignored, because each electron adds only about 0.00055 g/mol.
- Converter. Type grams to get moles and particles, or moles to get grams.
How to Calculate Molar Mass Manually
- Write the formula and expand every bracket: multiply each count inside by the number after the closing bracket.
- List each element once with its total number of atoms, adding atoms that appear in more than one place, such as both carbons in CH3COOH.
- Look up the atomic weight of each element in the table below.
- Multiply each atom count by its atomic weight.
- Add the products and round only at the end.
Worked example with parentheses: calcium phosphate, Ca3(PO4)2
Worked example with a hydrate: CuSO4·5H2O
Nested brackets work the same way from the inside out. In potassium ferrocyanide, K4[Fe(CN)6], the (CN)6 gives 6 carbon and 6 nitrogen atoms, and the molar mass is 4 × 39.098 + 55.845 + 6 × 12.011 + 6 × 14.007 = 368.345 g/mol.
Molar Mass of Common Compounds
Every value below comes from the same atomic weights and code as the calculator. The last column names the element that contributes the most mass, a quick check on percent composition.
| Compound | Formula | Molar mass (g/mol) | Largest mass share |
|---|---|---|---|
| Water | H2O | 18.015 | O 88.81% |
| Sodium chloride (table salt) | NaCl | 58.44 | Cl 60.66% |
| Carbon dioxide | CO2 | 44.009 | O 72.71% |
| Glucose | C6H12O6 | 180.156 | O 53.28% |
| Ethanol | C2H5OH | 46.069 | C 52.14% |
| Sulfuric acid | H2SO4 | 98.072 | O 65.25% |
| Caffeine | C8H10N4O2 | 194.194 | C 49.48% |
| Aspirin | C9H8O4 | 180.159 | C 60.00% |
| Ammonia | NH3 | 17.031 | N 82.24% |
| Methane | CH4 | 16.043 | C 74.87% |
| Calcium carbonate | CaCO3 | 100.086 | O 47.96% |
| Sodium bicarbonate | NaHCO3 | 84.006 | O 57.14% |
| Sucrose | C12H22O11 | 342.297 | O 51.41% |
| Acetic acid | CH3COOH | 60.052 | O 53.28% |
| Sodium hydroxide | NaOH | 39.997 | Na 57.48% |
Glucose and aspirin both round to 180.16 g/mol and differ only in the third decimal, 180.156 against 180.159. A molar mass narrows down a compound but never identifies it on its own: glucose, fructose and galactose share the formula C6H12O6 and therefore the same molar mass.
Percent Composition and the Empirical Formula
The percent composition of a compound is the share of its molar mass that comes from each element. Divide the mass contribution of the element by the molar mass and multiply by 100. The calculator shows it for every element in the composition table and the allocation bar.
The rounded shares add to 99.99% here; the small gap is rounding, not a missing element. The empirical formula is the smallest whole number ratio of atoms. The calculator finds it by dividing every count by their greatest common divisor: C6H12O6 divides by 6 to give CH2O, with an empirical unit mass of 180.156 ÷ 6 = 30.026 g/mol. Acetic acid, C2H4O2, reduces to the same CH2O, which is why it also shows 40.00% carbon.
To go backwards from lab percentages, assume a 100 g sample and convert each percentage to moles. For 40.00% C, 6.71% H and 53.28% O: 40.00 ÷ 12.011 = 3.3303 mol C, 6.71 ÷ 1.0080 = 6.6567 mol H and 53.28 ÷ 15.999 = 3.3302 mol O. Dividing by the smallest gives 1.0000 : 1.9989 : 1.0000, so the empirical formula is CH2O. A measured molar mass of 180.156 g/mol is 6 times 30.026, which gives the molecular formula C6H12O6.
Grams to Moles, Moles to Grams and Particles
The molar mass is the conversion factor between the mass you weigh on a balance and the amount of substance that chemical equations count. Three relations cover every conversion:
The Avogadro constant, NA = 6.02214076 × 10²³ mol⁻¹, has been exact since the 2019 revision of the SI, when the mole was redefined as exactly that many specified entities. The mass of one molecule is therefore M ÷ NA: for glucose, 180.156 ÷ 6.02214076 × 10²³ = 2.9916 × 10⁻²² g. Grams per mole and daltons per molecule still agree to about one part in a billion, because the molar mass constant is 1.00000000105 × 10⁻³ kg/mol in CODATA 2022.
In the lab, the molar mass of the exact substance in the bottle matters. Weighing 5 g of blue CuSO4·5H2O gives 5 ÷ 249.677 = 0.020026 mol of copper sulfate, not the 0.0313 mol you would expect from the anhydrous formula. For solution concentration and dilution, continue with the Molarity Calculator.
Standard Atomic Weights and Why They Are Not Whole Numbers
Most elements occur as a mixture of isotopes, atoms with the same number of protons but different numbers of neutrons. A standard atomic weight is the average mass of those atoms in normal terrestrial material, weighted by how common each isotope is, relative to one twelfth of the mass of a carbon 12 atom. Chlorine is a mixture of chlorine 35 and chlorine 37, so its standard atomic weight is 35.45, between the two.
Isotopic mixtures vary slightly between sources. For elements where that variation is well documented, CIAAW publishes an interval instead of a single number: hydrogen is [1.00784, 1.00811], carbon [12.0096, 12.0116] and chlorine [35.446, 35.457]. For everyday calculations CIAAW recommends abridged values to five significant figures where the variation allows, such as 1.0080 ± 0.0002 for hydrogen and 12.011 ± 0.002 for carbon. This calculator uses the 2024 abridged table, which includes the 2024 revisions for gadolinium, lutetium and zirconium.
Why other tables give slightly different molar masses
Older tables quote single values with more digits, such as C 12.0107, H 1.00794, N 14.0067 and O 15.9994. With those numbers caffeine comes to 194.1906 g/mol, the value in the NIST Chemistry WebBook, while the abridged values give 194.194 g/mol. The WebBook lists sulfuric acid at 98.078 g/mol, which implies a sulfur weight of about 32.065, against 98.072 g/mol here with the abridged sulfur value 32.06. Both are correct to the precision of their inputs; quote the source table when the third decimal matters.
Standard Atomic Weights of All 118 Elements
Atomic number, symbol, name and the abridged standard atomic weight used by the calculator. Bracketed values are mass numbers, not standard atomic weights. Aluminium and caesium are the IUPAC spellings of aluminum and cesium.
- 1 H hydrogen 1.0080
- 2 He helium 4.0026
- 3 Li lithium 6.94
- 4 Be beryllium 9.0122
- 5 B boron 10.81
- 6 C carbon 12.011
- 7 N nitrogen 14.007
- 8 O oxygen 15.999
- 9 F fluorine 18.998
- 10 Ne neon 20.180
- 11 Na sodium 22.990
- 12 Mg magnesium 24.305
- 13 Al aluminium 26.982
- 14 Si silicon 28.085
- 15 P phosphorus 30.974
- 16 S sulfur 32.06
- 17 Cl chlorine 35.45
- 18 Ar argon 39.95
- 19 K potassium 39.098
- 20 Ca calcium 40.078
- 21 Sc scandium 44.956
- 22 Ti titanium 47.867
- 23 V vanadium 50.942
- 24 Cr chromium 51.996
- 25 Mn manganese 54.938
- 26 Fe iron 55.845
- 27 Co cobalt 58.933
- 28 Ni nickel 58.693
- 29 Cu copper 63.546
- 30 Zn zinc 65.38
- 31 Ga gallium 69.723
- 32 Ge germanium 72.630
- 33 As arsenic 74.922
- 34 Se selenium 78.971
- 35 Br bromine 79.904
- 36 Kr krypton 83.798
- 37 Rb rubidium 85.468
- 38 Sr strontium 87.62
- 39 Y yttrium 88.906
- 40 Zr zirconium 91.222
- 41 Nb niobium 92.906
- 42 Mo molybdenum 95.95
- 43 Tc technetium [97]
- 44 Ru ruthenium 101.07
- 45 Rh rhodium 102.91
- 46 Pd palladium 106.42
- 47 Ag silver 107.87
- 48 Cd cadmium 112.41
- 49 In indium 114.82
- 50 Sn tin 118.71
- 51 Sb antimony 121.76
- 52 Te tellurium 127.60
- 53 I iodine 126.90
- 54 Xe xenon 131.29
- 55 Cs caesium 132.91
- 56 Ba barium 137.33
- 57 La lanthanum 138.91
- 58 Ce cerium 140.12
- 59 Pr praseodymium 140.91
- 60 Nd neodymium 144.24
- 61 Pm promethium [145]
- 62 Sm samarium 150.36
- 63 Eu europium 151.96
- 64 Gd gadolinium 157.25
- 65 Tb terbium 158.93
- 66 Dy dysprosium 162.50
- 67 Ho holmium 164.93
- 68 Er erbium 167.26
- 69 Tm thulium 168.93
- 70 Yb ytterbium 173.05
- 71 Lu lutetium 174.97
- 72 Hf hafnium 178.49
- 73 Ta tantalum 180.95
- 74 W tungsten 183.84
- 75 Re rhenium 186.21
- 76 Os osmium 190.23
- 77 Ir iridium 192.22
- 78 Pt platinum 195.08
- 79 Au gold 196.97
- 80 Hg mercury 200.59
- 81 Tl thallium 204.38
- 82 Pb lead 207.2
- 83 Bi bismuth 208.98
- 84 Po polonium [209]
- 85 At astatine [210]
- 86 Rn radon [222]
- 87 Fr francium [223]
- 88 Ra radium [226]
- 89 Ac actinium [227]
- 90 Th thorium 232.04
- 91 Pa protactinium 231.04
- 92 U uranium 238.03
- 93 Np neptunium [237]
- 94 Pu plutonium [244]
- 95 Am americium [243]
- 96 Cm curium [247]
- 97 Bk berkelium [247]
- 98 Cf californium [251]
- 99 Es einsteinium [252]
- 100 Fm fermium [257]
- 101 Md mendelevium [258]
- 102 No nobelium [259]
- 103 Lr lawrencium [266]
- 104 Rf rutherfordium [267]
- 105 Db dubnium [268]
- 106 Sg seaborgium [269]
- 107 Bh bohrium [270]
- 108 Hs hassium [269]
- 109 Mt meitnerium [277]
- 110 Ds darmstadtium [282]
- 111 Rg roentgenium [282]
- 112 Cn copernicium [286]
- 113 Nh nihonium [286]
- 114 Fl flerovium [290]
- 115 Mc moscovium [290]
- 116 Lv livermorium [293]
- 117 Ts tennessine [294]
- 118 Og oganesson [295]
Common Mistakes
- Wrong capital letters. "co" could mean Co (58.933 g/mol) or CO (28.010 g/mol), so the calculator asks instead of guessing.
- Not multiplying through brackets. Ca3(PO4)2 has 8 oxygen atoms, not 4.
- Ignoring water of hydration. Using 159.602 g/mol for CuSO4·5H2O crystals delivers only 63.92% of the intended moles.
- Atoms vs molecules. Oxygen gas is O2 at 31.998 g/mol, twice the 15.999 of one O atom.
- Charge typed as a count. SO42− reads as 42 oxygen atoms; write SO4^2−.
- Rounding too early. Round each atomic weight and the final sum, not every product.
When This Calculator Does Not Apply
- Isotopically labeled compounds. Heavy water or carbon 13 tracers weigh more than the standard weights predict, and the symbols D and T are not accepted.
- Mass spectrometry. Spectra show monoisotopic masses from single isotopes, not the averages used here.
- Polymers and mixtures. Proteins, plastics and alloys need an average or distribution, not one formula.
- Radioactive elements. Bracketed mass numbers make the result approximate.
Frequently Asked Questions
How do you calculate molar mass?
To calculate molar mass, write the chemical formula, count the atoms of each element, multiply each count by the standard atomic weight of that element and add the products. The result is in grams per mole. For glucose, C6H12O6, the sum is 6 × 12.011 + 12 × 1.0080 + 6 × 15.999 = 72.066 + 12.096 + 95.994 = 180.156 g/mol. Multiply every count inside parentheses by the number after the closing bracket, and for a hydrate add the water after multiplying it by its coefficient.
What is the difference between molecular weight and molar mass?
Molar mass is the mass of one mole of a substance, in grams per mole (g/mol). Molecular weight, more formally relative molecular mass, is the same number without units: the average mass of one molecule divided by one twelfth of the mass of a carbon 12 atom. Molecular mass is the mass of one molecule in daltons (Da). For water all three read 18.015, so the terms are often used interchangeably. Formula mass is the same sum for ionic compounds such as NaCl, which do not form separate molecules.
What is the molar mass of water?
The molar mass of water, H2O, is 18.015 g/mol with the IUPAC abridged standard atomic weights: 2 × 1.0080 for hydrogen plus 15.999 for oxygen gives 2.016 + 15.999 = 18.015 g/mol. One mole of water, 6.022 × 10²³ molecules, therefore weighs about 18.02 grams, close to 18 mL of liquid water at room temperature. By mass, water is 11.19% hydrogen and 88.81% oxygen. The NIST Chemistry WebBook lists 18.0153, which differs only in the fourth decimal place because it uses more digits for each atomic weight.
How do you convert grams to moles?
Divide the mass in grams by the molar mass in grams per mole: n = m ÷ M. For 36 g of water, n = 36 ÷ 18.015 = 1.9983 mol. To go the other way, multiply moles by the molar mass: 0.25 mol of sodium chloride is 0.25 × 58.44 = 14.61 g. To count particles, multiply moles by the Avogadro constant, 6.02214076 × 10²³ per mole, so 1.9983 mol of water holds about 1.2034 × 10²⁴ molecules. The converter under the results does all three steps for any formula.
Why is the atomic weight of chlorine 35.45 and not a whole number?
An atomic weight is an average over the isotopes found in nature, weighted by how common each one is. Chlorine is a mixture of chlorine 35 and chlorine 37 atoms, so its average falls between them, at 35.45. The mass of each isotope is also slightly off a whole number because of nuclear binding energy; only carbon 12 is exact, since it defines the scale. CIAAW gives chlorine as the interval 35.446 to 35.457 because samples from different sources vary, and recommends 35.45 ± 0.01 as the abridged value for everyday work.
How do you find the molar mass of a hydrate?
Add the molar mass of the salt to the coefficient times the molar mass of water. For copper(II) sulfate pentahydrate, CuSO4·5H2O, the anhydrous salt is 63.546 + 32.06 + 4 × 15.999 = 159.602 g/mol and the water is 5 × 18.015 = 90.075 g/mol, so the hydrate is 249.677 g/mol. Water makes up 36.08% of its mass, which is why heating the blue crystals until the water is driven off removes a little over a third of their weight. Type the dot as ·, a period or an asterisk.
Sources & References
- IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW). Standard Atomic Weights 2024 (interval and single values; 2024 revisions for Gd, Lu and Zr). ciaaw.org
- CIAAW. Abridged Standard Atomic Weights 2024 (the values used by this calculator). ciaaw.org
- IUPAC. Periodic Table of Elements, release of 4 May 2022 (abridged weights; bracketed mass numbers for elements without a characteristic isotopic composition). iupac.org
- National Library of Medicine, PubChem. Periodic table data (isotope masses used for the bracketed mass numbers). pubchem.ncbi.nlm.nih.gov
- BIPM. SI base unit: mole (exact Avogadro number in the definition of the mole). bipm.org
- NIST. CODATA 2022 recommended values: Avogadro constant, unified atomic mass unit (dalton), molar mass constant and electron mass in u.
- NIST Chemistry WebBook, SRD 69. Rules for chemical formulas (correct case, parentheses, charges) and entries for water, caffeine and sulfuric acid.
- Stanford University Libraries, Swain Chemistry Library. Hill System Order (carbon first, hydrogen second, then alphabetical; all alphabetical without carbon). stanford.edu
Results are estimates for normal terrestrial materials, for educational use. Every number on this page was recomputed with the code the calculator runs. Atomic weight data: CIAAW 2024 abridged table, reviewed 2026.