Molecular Weight Calculator
How it Works
01Pick Each Atom
89 elements supported — Hydrogen through Uranium with IUPAC 2021 atomic weights
02Set Number of Atoms
1–50 per element. Add up to 8 different elements with the + button
03Sum Atomic Masses
M = Σ (count × atomic mass) — straightforward stoichiometric arithmetic
04Get Formula + Mass %
Empirical formula, total g/mol, and percent composition for each element
What is a Molecular Weight Calculator?
Every atomic mass is the IUPAC 2021 standard atomic weight — the natural-abundance average across each element's stable isotope distribution. Pick "Hydrogen" and the calculator uses 1.008 g/mol; pick "Carbon" it uses 12.011, etc. The output gives you the molecular weight in g/mol (and kg/mol, and grams per single molecule for context); the empirical formula in subscript notation; the percent composition by mass for each element (with a visual gauge); and — when you build a well-known compound — a "common compound match" callout (water → 18.015 g/mol, glucose → 180.156 g/mol, etc.).
Designed for general chemistry homework, organic synthesis labs, biochemistry assays, and pharmaceutical formulation, the tool runs entirely in your browser — no data is stored or transmitted.
Pro Tip: Pair this with our Molarity Calculator for solution-prep math, or our PPM to Molarity Calculator for environmental work where compound molecular weight is the bridge between mass and moles.
How to Use the Molecular Weight Calculator?
How do I calculate molecular weight?
Molecular weight is the most basic stoichiometric calculation — sum the atomic masses of every atom in the compound. Here's the complete breakdown:
Think of a compound's molecular weight like the weight of a recipe: each ingredient (element) contributes its individual weight (atomic mass) times how much of it you use (number of atoms). Total it up and you have the weight of one "serving" — one mole — of the compound.
The Core Formula
M = Σᵢ (count_i × atomic_mass_i)
Sum over all elements i in the compound. Each element contributes (count × atomic mass). Result has units of g/mol — grams of compound per mole. For water (H₂O): M = 2 × 1.008 + 1 × 15.999 = 18.015 g/mol. The factor of 1.008 comes from hydrogen being a mixture of ¹H and trace ²H; ¹⁵.999 from oxygen being mostly ¹⁶O with a few percent ¹⁷O and ¹⁸O.
Standard Atomic Weights (IUPAC 2021)
The atomic mass used is the natural-abundance average — weighted by each isotope's abundance on Earth. So carbon's atomic weight is 12.011 (not exactly 12), reflecting the ~98.9% ¹²C and ~1.1% ¹³C natural mixture. Some elements have wider isotopic variability, leading to bracketed values (e.g., sulfur is reported as [32.059, 32.076] but is rounded to 32.06 for routine use).
For radioactive elements with no stable isotopes (Tc, Pm, Po, At, Rn, Fr, Ra, Ac), the atomic weight reported is the mass number of the longest-lived isotope, which is why you'll see Tc = 98 rather than a fractional value.
Percent Composition by Mass
%mass_i = (count_i × atomic_mass_i) ÷ M × 100%
For glucose C₆H₁₂O₆ (M = 180.156): C = 6 × 12.011 / 180.156 = 40.0% · H = 12 × 1.008 / 180.156 = 6.71% · O = 6 × 15.999 / 180.156 = 53.3%. Mass percentages always sum to 100% — that's a built-in arithmetic check.
Mass per Single Molecule
m_one = M / N_A
where N_A = 6.022 × 10²³ /mol is Avogadro's number. So one water molecule weighs 18.015 / 6.022×10²³ ≈ 2.99 × 10⁻²³ g. Tiny — but with Avogadro's number of them, you get one mole = 18 grams.
Molecular Weight Calculator – Compound Mass In Practice
- Step 1: Identify the elements and counts. Carbon × 6, Hydrogen × 12, Oxygen × 6. Three element slots needed.
- Step 2: Look up atomic masses. C = 12.011, H = 1.008, O = 15.999 g/mol (IUPAC 2021).
- Step 3: Compute each contribution. C: 6 × 12.011 = 72.066. H: 12 × 1.008 = 12.096. O: 6 × 15.999 = 95.994.
- Step 4: Sum. M = 72.066 + 12.096 + 95.994 = 180.156 g/mol.
- Step 5: Compute mass percent. C: 72.066/180.156 = 40.00%. H: 12.096/180.156 = 6.71%. O: 95.994/180.156 = 53.29%. Sum: 100.00% ✓.
- Step 6: Verify against literature. Reported value for glucose: 180.156 g/mol — exact match. The calculator's "common compound" match would flag this as Glucose if you select C₆H₁₂O₆.
Now consider aspirin (acetylsalicylic acid), C₉H₈O₄: M = 9(12.011) + 8(1.008) + 4(15.999) = 108.099 + 8.064 + 63.996 = 180.159 g/mol. Notice that aspirin and glucose have the same molecular weight to within 0.003 g/mol — a coincidence that has fooled many a stoichiometry student. The empirical formulas (and pharmacological effects) are completely different.
For a simple inorganic example: sodium chloride, NaCl. M = 22.990 + 35.45 = 58.44 g/mol. One mole of table salt weighs 58.44 grams — about a tablespoon. This is also why a "1 molar" NaCl solution dissolves 58.44 g in 1 liter of water.
Who Should Use the Molecular Weight Calculator?
Technical Reference
Standard Atomic Weights. The atomic masses used are the IUPAC 2021 standard atomic weights, which represent the natural isotopic-abundance-weighted average for each element. The values are updated periodically by the IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW); current values reflect the best available data on terrestrial isotope distributions.
Why the values aren't exact integers. Most elements have multiple stable isotopes. Carbon's atomic weight is 12.011 because natural carbon is ~98.9% ¹²C (mass 12 by definition) and ~1.1% ¹³C (mass 13.003). Hydrogen's 1.008 reflects ~99.985% ¹H and trace ²H (deuterium). Some elements show abundance variation by source — the IUPAC table reports interval values [a, b] for these (e.g., S = [32.059, 32.076]); routine work uses the conventional rounded value.
Reference Molecular Weights for Common Compounds (g/mol):
- Water (H₂O): 18.015
- Carbon dioxide (CO₂): 44.009
- Sodium chloride (NaCl): 58.44
- Sodium hydroxide (NaOH): 39.997
- Sulfuric acid (H₂SO₄): 98.079
- Hydrochloric acid (HCl): 36.458
- Nitric acid (HNO₃): 63.013
- Glucose (C₆H₁₂O₆): 180.156
- Sucrose (C₁₂H₂₂O₁₁): 342.297
- Ethanol (C₂H₅OH): 46.069
- Acetic acid (CH₃COOH): 60.052
- Aspirin (C₉H₈O₄): 180.159
- Caffeine (C₈H₁₀N₄O₂): 194.194
- Calcium carbonate (CaCO₃): 100.087
- Ammonium nitrate (NH₄NO₃): 80.043
Monoisotopic vs. Average Masses. For mass spectrometry of small molecules, the monoisotopic mass (using the lightest stable isotope of each element) is preferred — water's monoisotopic mass is 18.0106 (using ¹H and ¹⁶O exactly), while the average is 18.015. The ~5 ppm difference matters in high-resolution MS but is irrelevant for routine wet chemistry. This calculator uses average atomic weights, suitable for solution preparation, stoichiometry, and routine analytical work.
Hill System Ordering. The standard formula-writing convention: carbon first, then hydrogen, then other elements in alphabetical order. Glucose is C₆H₁₂O₆ (Hill order). Inorganic compounds without carbon usually go alphabetically (NaCl, H₂SO₄). The calculator displays the formula in input order — re-arrange your input to match Hill convention if your application requires it.
Key Takeaways
Frequently Asked Questions
What is the Molecular Weight Calculator?
Output includes the empirical formula in subscript notation (H₂O, C₆H₁₂O₆), the molecular weight in g/mol with conversions to kg/mol and grams per single molecule, percent composition by mass for each element, the per-element contribution breakdown, and a common-compound match for well-known formulas (water, glucose, NaCl, etc.).
Designed for general chemistry homework, organic synthesis, biochemistry, and pharmaceutical work, the tool runs entirely in your browser — no data is stored or transmitted.
Pro Tip: For more chemistry tools, try our Molarity Calculator.
What's the difference between molecular weight, molar mass, and molecular mass?
Why isn't carbon's atomic weight exactly 12?
Where do the atomic weights come from?
How do I include a hydrate (water of crystallization)?
What about monoisotopic mass for mass spectrometry?
Why is the maximum 50 atoms per element?
Why is hydrogen 1.008 instead of 1.00794?
What's the percent composition for, exactly?
Why does my calculated molecular weight differ slightly from a textbook?
Can I use this for ionic compounds?
Disclaimer
Atomic weights use IUPAC 2021 standard values based on natural isotopic abundance. For isotope-labeled compounds, use exact monoisotopic masses instead. The empirical formula is built in input order — apply Hill ordering manually if your application requires it.