Molecular Weight Calculator

Calculate the molecular weight of a compound from up to six elements.

Supports all 118 elements with standard atomic weights.

Updated August 30, 2026
Frank Zhao - Creator
CreatorFrank Zhao
Loading calculator…

Introduction / Overview

Molecular weight (also called molecular mass) is the total mass of a molecule, calculated by adding up the atomic weights of every atom in its chemical formula. It tells you how heavy one mole of that substance is, which is essential for stoichiometric calculations, solution preparation, and understanding reaction yields.

What problems does this calculator solve?

  • Quickly find the molecular weight of any compound by selecting up to six elements and their quantities.
  • See a visual breakdown of how each element contributes to the total — useful for understanding which elements dominate a molecule's mass.
  • Verify homework answers, lab calculations, or prepare for stoichiometry problems without manual table lookups.

The calculator uses standard atomic weights from IUPAC for all 118 elements and displays results in unified atomic mass units (u), also known as daltons (Da). If you need the molar mass in grams per mole for solution preparation, check our Molar Mass Calculator.

How to Use / Quick Start Guide

You only need two pieces of information per element: which element it is, and how many atoms of it are in the molecule. The calculator handles the rest.

1

Select your first element

Open the Atom dropdown in the 1st Element section and choose an element (e.g., Hydrogen). The atomic mass is filled automatically from the periodic table.

2

Set the number of atoms

Open the Number of atoms dropdown and pick how many atoms of that element appear in the molecule (1–16).

3

Add more elements as needed

A new element slot appears automatically. Repeat for each distinct element in your compound. Up to six different elements are supported.

Worked Example: Water (H₂O)

Water has 2 hydrogen atoms and 1 oxygen atom.

1st Element: select H (atomic mass = 1), set quantity to 2.

2nd Element: select O (atomic mass = 16), set quantity to 1.

MwM_w==(1×2)+(16×1)(1 \times 2) + (16 \times 1)==18 u18\ \mathrm{u}

The molecular weight of water is 18 u18\ \mathrm{u}. The pie chart and table below the result show that hydrogen contributes about 11% and oxygen about 89% of the total mass.

Real-World Examples

These examples cover common compounds you'll encounter in chemistry courses and lab work. Each one shows the input setup and how the result is interpreted.

Sodium Chloride (NaCl)

Common table salt. One formula unit contains one sodium atom and one chlorine atom.

1st Element: Na (23 u) × 1

2nd Element: Cl (35.5 u) × 1

23+35.523 + 35.5==58.5 u58.5\ \mathrm{u}

Sodium dominates at about 39% of the mass, while chlorine makes up the remaining 61%.

Glucose (C₆H₁₂O₆)

The primary energy source for living cells. Six carbon, twelve hydrogen, and six oxygen atoms.

1st Element: C (12 u) × 6

2nd Element: H (1 u) × 12

3rd Element: O (16 u) × 6

(12×6)+(1×12)+(16×6)(12 \times 6) + (1 \times 12) + (16 \times 6)==180 u180\ \mathrm{u}

Carbon and oxygen each contribute 40% of the mass, while hydrogen contributes about 6.7%.

Calcium Hydroxide (Ca(OH)₂)

Used in water treatment and as a mild base. Note the subscript applies to the entire OH group: 1 Ca, 2 O, and 2 H.

1st Element: Ca (40 u) × 1

2nd Element: O (16 u) × 2

3rd Element: H (1 u) × 2

40+(16×2)+(1×2)40 + (16 \times 2) + (1 \times 2)==74 u74\ \mathrm{u}

Calcium alone accounts for over half the molecular weight.

Sulfuric Acid (H₂SO₄)

One of the most widely used industrial chemicals. Two hydrogen, one sulfur, and four oxygen atoms.

1st Element: H (1 u) × 2

2nd Element: S (32 u) × 1

3rd Element: O (16 u) × 4

(1×2)+32+(16×4)(1 \times 2) + 32 + (16 \times 4)==98 u98\ \mathrm{u}

Oxygen contributes nearly 65% of the total mass, which is typical for oxygen-rich acids.

Calculation Method

The molecular weight is a simple weighted sum: for each element, multiply its atomic mass by the number of atoms, then add everything together.

Mw=i=1kniMiM_w = \sum_{i=1}^{k} n_i \cdot M_i

Variable definitions

  • MwM_w — molecular weight of the compound (in u or Da)
  • nin_i — number of atoms of element ii in the molecule
  • MiM_i — atomic mass of element ii (standard atomic weight from IUPAC)
  • kk — number of distinct elements in the compound

Pro Tip: The unit matters

Molecular weight in unified atomic mass units (u) is numerically equal to the molar mass in grams per mole (g/mol). For example, water's molecular weight is 18 u18\ \mathrm{u}, and one mole of water weighs 18 g18\ \mathrm{g}. This equivalence is what makes the mole concept so powerful in chemistry.

Frequently Asked Questions

What's the difference between molecular weight and molar mass?

Molecular weight is measured in unified atomic mass units (u) and describes the mass of a single molecule. Molar mass is measured in grams per mole (g/mol) and describes the mass of 6.022×10236.022 \times 10^{23} molecules. They have the same numerical value — only the units differ.

Why does the calculator use standard atomic weights instead of exact isotope masses?

Standard atomic weights are the weighted averages of all naturally occurring isotopes of an element, as published by IUPAC. For most chemistry calculations — especially in education and general lab work — these averaged values are the correct ones to use. If you need exact isotope masses for mass spectrometry, you would look up individual isotope data separately.

Can I calculate molecular weight for compounds with more than 6 different elements?

The calculator supports up to 6 distinct elements per calculation. Most common compounds fit within this limit. For highly complex molecules like large proteins or polymers, you would typically use biochemistry software or look up the value in a reference database.

How do I handle polyatomic ions like sulfate (SO₄²⁻)?

Select Sulfur (1 atom) and Oxygen (4 atoms). The molecular weight of the ion itself is 32+(16×4)=96 u32 + (16 \times 4) = 96\ \mathrm{u}. The ionic charge doesn't affect molecular weight — it only matters when you're balancing formulas with counter-ions.

Limitations

  • Up to 6 elements: the calculator handles up to 6 distinct elements per compound. For molecules with more element types, break the calculation into parts or use a specialized tool.
  • Standard atomic weights: values are based on IUPAC-recommended standard atomic weights, which are weighted averages of naturally occurring isotopes. Results may differ slightly from calculations using exact isotope masses.
  • No structural information: molecular weight doesn't tell you about bonding, geometry, or isomerism. Two molecules with the same formula (and thus the same molecular weight) can have very different properties.
  • Quantity range: each element's atom count is limited to 1–16. This covers the vast majority of common compounds but won't handle very large repeat-unit polymers.
Molecular Weight Calculator — Calculate Molecule Mass from Elements