# Molecular Weight Calculator - Calculate Molar Mass of Chemical Compounds

Free online tool to compute the molecular weight (molar mass) of any chemical compound. Supports formula parsing, element‑by‑element input, and automatic unit conversion. Perfect for chemistry students, lab technicians, and researchers.

### Input Values

Chemical Formula (e.g., H2O, C6H12O6, (NH4)2SO4)

_Enter chemical formula_  Parse

Add Element Manually (all 118 elements)

Select element  _Count_

Calculate Molecular Weight  Clear All

### Calculated Molecular Weight

Result

Calculated molecular weight will appear here

### What Is a Molecular Weight Calculator and Why Do You Need One?

A **molecular weight calculator** (also called a molar mass calculator or formula weight tool) is an online utility that computes the mass of a molecule based on its chemical formula. For each element in the formula, the calculator multiplies its atomic weight (from the periodic table) by the number of atoms present, then sums the contributions of all elements to give the final molecular weight in **grams per mole (g/mol)**.

Molecular weight is a cornerstone concept in chemistry. It bridges the microscopic world (atoms and molecules) with the macroscopic world (grams, liters, and moles) - for example, by knowing the molecular weight of a substance you can convert between a weight you can measure on a lab balance and the number of molecules needed for a reaction, making stoichiometry possible.

This **free online molecular weight tool** operates entirely within your browser - no data is sent to any server, ensuring your privacy and enabling offline use. It supports two input methods: directly typing a formula (e.g., `H2O`, `C6H12O6`, `(NH4)2SO4`) or manually building the formula by selecting elements from a periodic table dropdown. The calculated molecular weight can be copied instantly, and the tool includes detailed explanations and reference tables to help you understand the underlying chemistry.

### How to Use This Free Online Molecular Weight Calculator

Using this **molar mass calculator** is simple. Follow these steps:

1. **Enter a chemical formula** in the input field. The calculator recognises formulas such as `H2O`, `NaCl`, `C6H12O6`, `Fe2(SO4)3`, and even parentheses like `(NH4)2SO4`. Click "Parse" to automatically extract the element symbols and their subscripts.
2. Alternatively, **build the formula manually** by selecting an element from the periodic table dropdown, entering a count (optional), and clicking the plus button. Repeat for each element in your compound.
3. **Adjust counts** by editing the number fields next to each element in the "Formula Elements" list. Remove any element by clicking the minus button.
4. The **molecular weight is automatically calculated** as you type or adjust elements. No extra "Calculate" button is needed - the tool updates instantly.
5. **Copy the result** using the copy button, or use the Clear All button to start a new calculation. The tool saves your last‑used inputs locally for up to 30 days.

**Important:** Chemical symbols are case‑sensitive. Enter "Co" for cobalt and "CO" for carbon monoxide - the tool distinguishes them correctly.

For example, H2O has two hydrogen atoms and one oxygen atom, giving approximately 18.015 g/mol using the listed atomic weights. Parenthesized groups are multiplied by the following subscript; hydrate dot notation is not supported. Use the result to convert grams to moles before using the [molarity calculator](https://www.toolcomb.com/molarity-calculator), or explore reaction amounts with the [stoichiometry calculator](https://www.toolcomb.com/stoichiometry-calculator).

### The Molecular Weight Formula - How It Works

MW = Σ (atomic weight × subscript)

Molecular Weight = Sum of (Atomic Weight × Number of Atoms)

The molecular weight is calculated by:

1. Identifying each element in the chemical formula and the number of atoms of that element.
2. Looking up the **atomic weight** of each element from a standard periodic table.
3. Multiplying the atomic weight by the number of atoms.
4. Summing the results for all elements.

#### Example Calculation - Water (H₂O):

- Hydrogen (H): atomic weight = 1.008 g/mol; subscript = 2 → contribution = 2.016 g/mol
- Oxygen (O): atomic weight = 15.999 g/mol; subscript = 1 → contribution = 15.999 g/mol
- **Total = 2.016 + 15.999 = 18.015 g/mol**

#### Example Calculation - Glucose (C₆H₁₂O₆):

- Carbon (C): 12.011 × 6 = 72.066 g/mol
- Hydrogen (H): 1.008 × 12 = 12.096 g/mol
- Oxygen (O): 15.999 × 6 = 95.994 g/mol
- **Total = 72.066 + 12.096 + 95.994 = 180.156 g/mol**

### Molecular Weight vs. Molar Mass - What's the Difference?

Although the terms are often used interchangeably, there is a subtle but important distinction:

| Concept | Definition | Typical Unit | When It Matters |
| --- | --- | --- | --- |
| **Molecular Weight (MW)** | Mass of a single molecule (sum of atomic weights) | Atomic mass units (amu) or Daltons (Da) | Mass spectrometry, theoretical calculations |
| **Molar Mass (M)** | Mass of one mole of a substance (6.022 × 10²³ particles) | Grams per mole (g/mol) | Laboratory weighing, stoichiometry, solution preparation |

In practice, the **numerical values** of molecular weight (in amu) and molar mass (in g/mol) are identical for a given compound - for example, water is 18.015 amu per molecule and 18.015 g per mole. Because a mole contains Avogadro’s number of particles, the mass of one mole (molar mass) equals the mass of one molecule (molecular weight) multiplied by Avogadro’s number. The two terms are therefore used interchangeably in most chemistry contexts, and this calculator reports the result in g/mol (the standard lab unit).

### Supported Elements - Complete Periodic Table Reference

The calculator includes **all 118 chemical elements** (hydrogen through oganesson). Stable and naturally occurring elements use IUPAC conventional atomic weights in g/mol. Radioelements and synthetic elements with no official standard atomic weight use the mass number of the longest-lived isotope, which is the usual classroom convention for a formula-mass estimate. Type formulas such as **TiO2**, **KMnO4**, **UF6**, or **C60**, or pick any element from the dropdown.

| Symbol | Element Name | Atomic Weight (g/mol) | Source |
| --- | --- | --- | --- |
| H | Hydrogen | 1.008 | IUPAC conventional |
| He | Helium | 4.003 | IUPAC conventional |
| Li | Lithium | 6.941 | IUPAC conventional |
| Be | Beryllium | 9.012 | IUPAC conventional |
| B | Boron | 10.811 | IUPAC conventional |
| C | Carbon | 12.011 | IUPAC conventional |
| N | Nitrogen | 14.007 | IUPAC conventional |
| O | Oxygen | 15.999 | IUPAC conventional |
| F | Fluorine | 18.998 | IUPAC conventional |
| Ne | Neon | 20.18 | IUPAC conventional |
| Na | Sodium | 22.99 | IUPAC conventional |
| Mg | Magnesium | 24.305 | IUPAC conventional |
| Al | Aluminum | 26.982 | IUPAC conventional |
| Si | Silicon | 28.086 | IUPAC conventional |
| P | Phosphorus | 30.974 | IUPAC conventional |
| S | Sulfur | 32.065 | IUPAC conventional |
| Cl | Chlorine | 35.453 | IUPAC conventional |
| Ar | Argon | 39.948 | IUPAC conventional |
| K | Potassium | 39.098 | IUPAC conventional |
| Ca | Calcium | 40.078 | IUPAC conventional |
| Sc | Scandium | 44.956 | IUPAC conventional |
| Ti | Titanium | 47.867 | IUPAC conventional |
| V | Vanadium | 50.942 | IUPAC conventional |
| Cr | Chromium | 51.996 | IUPAC conventional |
| Mn | Manganese | 54.938 | IUPAC conventional |
| Fe | Iron | 55.845 | IUPAC conventional |
| Co | Cobalt | 58.933 | IUPAC conventional |
| Ni | Nickel | 58.693 | IUPAC conventional |
| Cu | Copper | 63.546 | IUPAC conventional |
| Zn | Zinc | 65.38 | IUPAC conventional |
| Ga | Gallium | 69.723 | IUPAC conventional |
| Ge | Germanium | 72.63 | IUPAC conventional |
| As | Arsenic | 74.922 | IUPAC conventional |
| Se | Selenium | 78.971 | IUPAC conventional |
| Br | Bromine | 79.904 | IUPAC conventional |
| Kr | Krypton | 83.798 | IUPAC conventional |
| Rb | Rubidium | 85.468 | IUPAC conventional |
| Sr | Strontium | 87.62 | IUPAC conventional |
| Y | Yttrium | 88.906 | IUPAC conventional |
| Zr | Zirconium | 91.224 | IUPAC conventional |
| Nb | Niobium | 92.906 | IUPAC conventional |
| Mo | Molybdenum | 95.95 | IUPAC conventional |
| Tc | Technetium | 98 | Longest-lived isotope (no IUPAC standard AW) |
| Ru | Ruthenium | 101.07 | IUPAC conventional |
| Rh | Rhodium | 102.906 | IUPAC conventional |
| Pd | Palladium | 106.42 | IUPAC conventional |
| Ag | Silver | 107.868 | IUPAC conventional |
| Cd | Cadmium | 112.414 | IUPAC conventional |
| In | Indium | 114.818 | IUPAC conventional |
| Sn | Tin | 118.71 | IUPAC conventional |
| Sb | Antimony | 121.76 | IUPAC conventional |
| Te | Tellurium | 127.6 | IUPAC conventional |
| I | Iodine | 126.904 | IUPAC conventional |
| Xe | Xenon | 131.293 | IUPAC conventional |
| Cs | Cesium | 132.905 | IUPAC conventional |
| Ba | Barium | 137.327 | IUPAC conventional |
| La | Lanthanum | 138.905 | IUPAC conventional |
| Ce | Cerium | 140.116 | IUPAC conventional |
| Pr | Praseodymium | 140.908 | IUPAC conventional |
| Nd | Neodymium | 144.242 | IUPAC conventional |
| Pm | Promethium | 145 | Longest-lived isotope (no IUPAC standard AW) |
| Sm | Samarium | 150.36 | IUPAC conventional |
| Eu | Europium | 151.964 | IUPAC conventional |
| Gd | Gadolinium | 157.25 | IUPAC conventional |
| Tb | Terbium | 158.925 | IUPAC conventional |
| Dy | Dysprosium | 162.5 | IUPAC conventional |
| Ho | Holmium | 164.93 | IUPAC conventional |
| Er | Erbium | 167.259 | IUPAC conventional |
| Tm | Thulium | 168.934 | IUPAC conventional |
| Yb | Ytterbium | 173.045 | IUPAC conventional |
| Lu | Lutetium | 174.967 | IUPAC conventional |
| Hf | Hafnium | 178.49 | IUPAC conventional |
| Ta | Tantalum | 180.948 | IUPAC conventional |
| W | Tungsten | 183.84 | IUPAC conventional |
| Re | Rhenium | 186.207 | IUPAC conventional |
| Os | Osmium | 190.23 | IUPAC conventional |
| Ir | Iridium | 192.217 | IUPAC conventional |
| Pt | Platinum | 195.084 | IUPAC conventional |
| Au | Gold | 196.967 | IUPAC conventional |
| Hg | Mercury | 200.59 | IUPAC conventional |
| Tl | Thallium | 204.38 | IUPAC conventional |
| Pb | Lead | 207.2 | IUPAC conventional |
| Bi | Bismuth | 208.98 | IUPAC conventional |
| Po | Polonium | 209 | Longest-lived isotope (no IUPAC standard AW) |
| At | Astatine | 210 | Longest-lived isotope (no IUPAC standard AW) |
| Rn | Radon | 222 | Longest-lived isotope (no IUPAC standard AW) |
| Fr | Francium | 223 | Longest-lived isotope (no IUPAC standard AW) |
| Ra | Radium | 226 | Longest-lived isotope (no IUPAC standard AW) |
| Ac | Actinium | 227 | Longest-lived isotope (no IUPAC standard AW) |
| Th | Thorium | 232.038 | IUPAC conventional |
| Pa | Protactinium | 231.036 | IUPAC conventional |
| U | Uranium | 238.029 | IUPAC conventional |
| Np | Neptunium | 237 | Longest-lived isotope (no IUPAC standard AW) |
| Pu | Plutonium | 244 | Longest-lived isotope (no IUPAC standard AW) |
| Am | Americium | 243 | Longest-lived isotope (no IUPAC standard AW) |
| Cm | Curium | 247 | Longest-lived isotope (no IUPAC standard AW) |
| Bk | Berkelium | 247 | Longest-lived isotope (no IUPAC standard AW) |
| Cf | Californium | 251 | Longest-lived isotope (no IUPAC standard AW) |
| Es | Einsteinium | 252 | Longest-lived isotope (no IUPAC standard AW) |
| Fm | Fermium | 257 | Longest-lived isotope (no IUPAC standard AW) |
| Md | Mendelevium | 258 | Longest-lived isotope (no IUPAC standard AW) |
| No | Nobelium | 259 | Longest-lived isotope (no IUPAC standard AW) |
| Lr | Lawrencium | 266 | Longest-lived isotope (no IUPAC standard AW) |
| Rf | Rutherfordium | 267 | Longest-lived isotope (no IUPAC standard AW) |
| Db | Dubnium | 268 | Longest-lived isotope (no IUPAC standard AW) |
| Sg | Seaborgium | 269 | Longest-lived isotope (no IUPAC standard AW) |
| Bh | Bohrium | 270 | Longest-lived isotope (no IUPAC standard AW) |
| Hs | Hassium | 269 | Longest-lived isotope (no IUPAC standard AW) |
| Mt | Meitnerium | 278 | Longest-lived isotope (no IUPAC standard AW) |
| Ds | Darmstadtium | 281 | Longest-lived isotope (no IUPAC standard AW) |
| Rg | Roentgenium | 282 | Longest-lived isotope (no IUPAC standard AW) |
| Cn | Copernicium | 285 | Longest-lived isotope (no IUPAC standard AW) |
| Nh | Nihonium | 286 | Longest-lived isotope (no IUPAC standard AW) |
| Fl | Flerovium | 289 | Longest-lived isotope (no IUPAC standard AW) |
| Mc | Moscovium | 290 | Longest-lived isotope (no IUPAC standard AW) |
| Lv | Livermorium | 293 | Longest-lived isotope (no IUPAC standard AW) |
| Ts | Tennessine | 294 | Longest-lived isotope (no IUPAC standard AW) |
| Og | Oganesson | 294 | Longest-lived isotope (no IUPAC standard AW) |

### Where is Molecular Weight Used in Real Life?

#### 1. Chemistry Laboratory - Stoichiometry & Solution Preparation

Molecular weight is essential for converting between masses measured on a balance and moles used in chemical equations. For example, the number of moles is calculated as **n = mass (g) / molecular weight (g/mol)**. Without the correct molecular weight, stoichiometric calculations will be wrong.

#### 2. Biochemistry - Protein & Nucleic Acid Analysis

The molecular weight of proteins is used in SDS‑PAGE gel electrophoresis, mass spectrometry, and size‑exclusion chromatography. Knowing the molecular weight of a gene sequence (DNA/RNA) helps in designing PCR primers and calculating yields.

#### 3. Pharmaceuticals - Dosage Calculations

The molecular weight of an active pharmaceutical ingredient (API) is used to convert between moles and grams in a prescription. For example, if a drug’s molecular weight is 300 g/mol, a 300 mg dose corresponds to 0.001 mol.

#### 4. Environmental Chemistry - Pollutant Analysis

Environmental labs measure pollutants in water (e.g., nitrate) as mg/L. To convert that to molarity (for reaction stoichiometry), you need the molecular weight of the pollutant. Likewise, converting µg/m³ concentrations in air requires the molecular weight of the gas.

### Stoichiometry - How to Convert Between Mass and Moles

The molecular weight (or molar mass) is the bridge between the amount you can weigh on a balance (grams) and the amount used in a balanced chemical equation (moles). The relationship is given by:

n = m / MW

moles = mass (g) ÷ molecular weight (g/mol)

Once you know the number of moles, you can use the coefficients of a balanced equation to determine the moles of other reactants or products - the heart of all stoichiometry problems.

#### Example - Using Molecular Weight in a Stoichiometry Problem:

You weigh out 10.00 g of sodium chloride (NaCl). The molecular weight of NaCl is 58.44 g/mol. How many moles is that?

n = 10.00 g ÷ 58.44 g/mol = **0.1711 mol NaCl**

If the equation requires 2 moles of NaCl to produce 1 mole of product, your 0.1711 mol would produce half that amount of product.

The reverse conversion (from moles to grams) uses **m = n × MW**.

### Frequently Asked Questions (FAQ) - Molecular Weight & Molar Mass

#### How do I calculate the molecular weight of a compound?

Look up the atomic weight of each element from a periodic table, multiply each by the number of atoms of that element in the formula, and sum the products.

#### What is the difference between molecular weight and molar mass?

Molecular weight (in amu) is the mass of a single molecule; molar mass (in g/mol) is the mass of one mole of molecules. Numerically they are equal. This calculator reports the value in g/mol, which is the standard lab unit.

#### Can I use this calculator for hydrated compounds (like CuSO₄·5H₂O)?

The parser does not accept hydrate dot notation directly. You can calculate the combined atom counts for the anhydrous compound and water, then add those elements manually. Check the counts before relying on the result.

#### How accurate are the atomic weights used in this calculator?

All 118 elements are included. For elements with an IUPAC standard atomic weight, this page uses that conventional value (typically three or four decimal places). For radioelements and synthetic elements with no official standard atomic weight (for example Tc, Pm, and most transuranics), it uses the mass of the longest-lived isotope. That is enough for educational formula mass; isotope-specific work should use a nuclide mass, not this table.

#### Is my data secure when using this online molecular weight calculator?

Absolutely. All calculations are performed locally in your browser using JavaScript. No data is transmitted to any server - your inputs remain on your own device. This ensures your privacy and also means the tool works offline after the initial page load.

#### Can I use this calculator offline?

Yes. Once the page has loaded, all parsing and calculation logic runs locally in your browser. No internet connection is required after the first load - perfect for use in laboratories without Wi‑Fi or during study sessions.

### Why Choose Our Molecular Weight Calculator Over Others?

- **Completely free, no registration.** Unlimited calculations with no hidden costs.
- **Privacy‑first design.** All calculations happen locally in your browser. Your data never leaves your device.
- **Supports formula parsing** for common formulas (e.g., `H2O`, `C6H12O6`, `(NH4)2SO4`).
- **Manual element‑by‑element builder** for custom or complex formulas.
- **Auto‑calculation** as you type - no separate "Calculate" button to press.
- **Local save** of recent inputs for up to 30 days.
- **Works offline** after initial page load.
- **Fully responsive design** with resizable panels on desktop for custom workflow.

## Related Tools

Discover more free tools that might help with your next task.

[Concentration Calculator Calculate chemical concentrations Use Tool](https://www.toolcomb.com/concentration-calculator)

[Density Calculator Calculate density from mass and volume Use Tool](https://www.toolcomb.com/density-calculator)

[Dilution Calculator Calculate solution dilutions Use Tool](https://www.toolcomb.com/dilution-calculator)

[Gas Law Calculator Calculate gas properties using gas laws Use Tool](https://www.toolcomb.com/gas-law-calculator)

[Half-Life Calculator Calculate remaining amount, time, or half-life for exponential decay Use Tool](https://www.toolcomb.com/half-life-calculator)

[Molality Calculator Calculate molality of solutions Use Tool](https://www.toolcomb.com/molality-calculator)

### Related guides

Read the how-to, then come back to this tool when you are ready to run it locally.

- [Molality Calculator: When Molarity Misleads m = n/kg solvent vs M = n/L solution, colligative properties, density bridges, and when to open the molality tool first.](https://www.toolcomb.com/blog/molality-calculator-when-molarity-misleads)
- [How to Calculate Molecular Weight Sum atomic masses correctly and check the result with a browser molecular weight tool.](https://www.toolcomb.com/blog/how-to-calculate-molecular-weight)
- [Stoichiometry vs Molarity: Which Calculator for Which Problem Mole ratios vs M=n/V, limiting reagent, and why dilution is C1V1=C2V2-not stoich. A comparison table for picking the right ToolComb chemistry tool.](https://www.toolcomb.com/blog/stoichiometry-vs-molarity-which-problem)

[View All Tools](https://www.toolcomb.com/tools)
