Skip to content

Molecular Weight Calculator

Case matters: Co is cobalt, CO is carbon monoxide. Brackets and hydrate dots are allowed.

Used to give the mass of this many moles.

Molecular weight (g/mol) —
Atoms per formula unit
—
Distinct elements
—
Mass of the entered amount (g)
—
Share of the molecular weight by element
The chart appears with your result

Molecular weight is the sum of every atom's standard atomic weight in the formula. For glucose, C6H12O6: 6 × 12.011 + 12 × 1.008 + 6 × 15.999 = 180.156 g/mol. Enter any formula, including brackets like Ca(OH)2 or hydrates like CuSO4·5H2O, and the per-element breakdown appears below the total.

About this tool

Weighing out a reagent, converting grams to moles for a stoichiometry problem or checking a label all start with the same number: the mass of one mole of the compound. This calculator reads a written formula, expands parentheses, square brackets and hydrate water, counts each element and multiplies by its IUPAC conventional atomic weight. Alongside the total you get the number of atoms in one formula unit, a table of each element's contribution and percentage by mass, a bar chart of those shares, and the mass of whatever amount in moles you enter. One limit: the weights are averages for natural isotopic abundance, so isotopically labelled compounds (deuterated solvents, 13C tracers) and exact monoisotopic masses for mass spectrometry need different values.

How to use it

  1. Type the formula

    Use element symbols with correct capitals, digits for subscripts, ( ) or [ ] for groups and a dot for water of crystallisation.

  2. Enter an amount in moles

    Optional. The calculator multiplies it by the molecular weight to give a mass in grams.

  3. Read the breakdown

    The table and bar chart show how much of the total each element supplies; download the chart as PNG, SVG or CSV if needed.

Examples

Glucose, C6H12O6

Chemical formula
C6H12O6
Amount of substance
1

Result Molecular weight (g/mol): 180.156
Atoms per formula unit: 24
Distinct elements: 3
Mass of the entered amount (g): 180.156

  1. C: 6 × 12.011 = 72.066 g/mol
  2. H: 12 × 1.008 = 12.096 g/mol
  3. O: 6 × 15.999 = 95.994 g/mol
  4. Sum = 180.156 g/mol

Six carbons, twelve hydrogens and six oxygens add up to 180.156 g/mol; oxygen alone supplies about 53% of that mass.

2 mol of water

Chemical formula
H2O
Amount of substance
2

Result Molecular weight (g/mol): 18.015
Atoms per formula unit: 3
Distinct elements: 2
Mass of the entered amount (g): 36.03

  1. H: 2 × 1.008 = 2.016 g/mol
  2. O: 1 × 15.999 = 15.999 g/mol
  3. Sum = 18.015 g/mol

Water weighs 18.015 g/mol, so two moles have a mass of 36.03 g.

Blue vitriol, CuSO4·5H2O

Chemical formula
CuSO4·5H2O

Result Molecular weight (g/mol): 249.677
Atoms per formula unit: 21
Distinct elements: 4
Mass of the entered amount (g): 249.677

  1. Cu: 1 × 63.546 = 63.546 g/mol
  2. S: 1 × 32.06 = 32.06 g/mol
  3. O: 9 × 15.999 = 143.991 g/mol
  4. H: 10 × 1.008 = 10.08 g/mol
  5. Sum = 249.677 g/mol

The five waters of crystallisation add 90.075 g/mol to the 159.602 g/mol of anhydrous copper sulfate.

How it is calculated

M = Σ (nᵢ × Aᵢ)

M
molecular (molar) weight in g/mol
nᵢ
number of atoms of element i in one formula unit
Aᵢ
standard atomic weight of element i (IUPAC conventional value)

The parser walks the formula left to right. A subscript after a bracket multiplies every count inside it, so Ca(OH)2 gives one Ca, two O and two H. A leading number after a hydrate dot multiplies that whole part, so ·5H2O adds ten H and five O. Each element count is multiplied by its atomic weight and the products are summed. Mass percentage is each product divided by the total.

When not to use it

  • Exact monoisotopic masses for high-resolution mass spectrometry need isotope masses, not averaged weights.
  • Polymers with a distribution of chain lengths have a number- or weight-average molar mass that a single formula cannot give.
  • Isotopically enriched compounds such as D2O differ from the natural-abundance values used here.

Common mistakes

  • Writing CO when you mean cobalt (Co) changes the answer from 58.933 to 28.010 g/mol.
  • Forgetting the water of crystallisation in a hydrate makes CuSO4·5H2O look 90 g/mol lighter.
  • Placing a subscript inside a bracket instead of after it, as in Ca(OH2), counts the wrong atoms.

Frequently asked questions

Is molecular weight the same as molar mass?

Numerically yes. Molecular weight is strictly a dimensionless ratio to one twelfth of a carbon-12 atom, while molar mass carries units of g/mol. For glucose both read 180.156, so most labs use the terms interchangeably.

Which atomic weights does it use?

The IUPAC abridged and conventional standard atomic weights, such as 1.008 for hydrogen, 12.011 for carbon and 15.999 for oxygen. Elements with a published interval, like hydrogen and carbon, use the single conventional value IUPAC gives for general use.

How do I enter a hydrate?

Put a middle dot, a full stop or an asterisk between the salt and the water, followed by the number of waters: CuSO4·5H2O, CuSO4.5H2O and CuSO4*5H2O all give 249.677 g/mol.

Can it handle nested brackets?

Yes. Square and round brackets can be nested as deep as the formula requires, for example K4[Fe(CN)6]. Each closing bracket's subscript multiplies everything inside that pair.

Why do I get an error for a symbol?

Symbols are case-sensitive and must exist in the table, which covers hydrogen through uranium excluding elements without a standard weight such as technetium and promethium. A lowercase first letter, or an unknown pair such as Xq, is rejected.

How do I convert grams to moles with this?

Divide your mass in grams by the molecular weight shown. For 90 g of glucose, 90 ÷ 180.156 is 0.4996 mol. The amount field works the other way, turning moles into grams.

Cite this tool

Using this tool in an assignment, article or report? Copy a citation, or a link for your website.

APA

Tools Directory Editorial Team. (2026, October 23). Molecular Weight Calculator. Tools Directory. Retrieved October 27, 2026, from https://tools.milunir.com/chemistry/stoichiometry-and-reactions/molecular-weight-calculator/

MLA

Tools Directory Editorial Team. “Molecular Weight Calculator.” Tools Directory, 23 Oct. 2026, https://tools.milunir.com/chemistry/stoichiometry-and-reactions/molecular-weight-calculator/. Accessed 27 Oct. 2026.

Chicago

Tools Directory Editorial Team. “Molecular Weight Calculator.” Tools Directory. Last modified October 23, 2026. Accessed October 27, 2026. https://tools.milunir.com/chemistry/stoichiometry-and-reactions/molecular-weight-calculator/.

Link<a href="https://tools.milunir.com/chemistry/stoichiometry-and-reactions/molecular-weight-calculator/">Molecular Weight Calculator – Tools Directory</a>