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.
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.
Using this molar mass calculator is simple. Follow these steps:
Important: Chemical symbols are case‑sensitive. Enter "Co" for cobalt and "CO" for carbon monoxide - the tool distinguishes them correctly.
The molecular weight is calculated by:
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).
The calculator includes 26 of the most common chemical elements used in organic, inorganic, and biochemistry. For compounds containing other elements, you can manually add them (future update). Below is a quick reference table of the included elements with their standard atomic weights (IUPAC) in g/mol:
| Symbol | Element Name | Atomic Weight (g/mol) | Common Uses |
|---|---|---|---|
| H | Hydrogen | 1.008 | Water, organic compounds |
| He | Helium | 4.003 | Cryogenics, balloons |
| Li | Lithium | 6.941 | Batteries |
| Be | Beryllium | 9.012 | Aerospace alloys |
| B | Boron | 10.811 | Fiberglass |
| C | Carbon | 12.011 | Organic chemistry backbone |
| N | Nitrogen | 14.007 | Ammonia, proteins |
| O | Oxygen | 15.999 | Respiration, combustion |
| F | Fluorine | 18.998 | Fluoridated water |
| Ne | Neon | 20.180 | Neon signs |
| Na | Sodium | 22.990 | Table salt (NaCl) |
| Mg | Magnesium | 24.305 | Light alloys |
| Al | Aluminum | 26.982 | Packaging, construction |
| Si | Silicon | 28.086 | Electronics, glass |
| P | Phosphorus | 30.974 | Fertilizers, DNA |
| S | Sulfur | 32.065 | Sulfuric acid |
| Cl | Chlorine | 35.453 | Disinfectants, PVC |
| Ar | Argon | 39.948 | Inert atmosphere |
| K | Potassium | 39.098 | Fertilizers |
| Ca | Calcium | 40.078 | Bones, cement |
| Fe | Iron | 55.845 | Steel, construction |
| Cu | Copper | 63.546 | Electrical wiring |
| Zn | Zinc | 65.380 | Galvanization |
| Ag | Silver | 107.868 | Jewelry, photography |
| Au | Gold | 196.967 | Precious metal, electronics |
| Hg | Mercury | 200.590 | Thermometers, fluorescent lamps |
| Pb | Lead | 207.200 | Batteries, radiation shielding |
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.
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.
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.
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.
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:
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.
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?
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.
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.
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.
Yes. The formula parser currently handles simple parentheses but not hydrates directly. For hydrated compounds, you can manually add the water molecules as additional elements (oxygen and hydrogen) with the appropriate counts, or you can wait for a future update that adds native hydrate support.
The atomic weights are taken from the IUPAC standard periodic table and are accurate to three or four decimal places, which is more than sufficient for most educational, research, and industrial applications.
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.
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.
Discover more free developer tools that might interest you.
Calculate acceleration from velocity and time
Use ToolCalculate chemical concentrations
Use ToolCalculate density from mass and volume
Use ToolCalculate solution dilutions
Use ToolCalculate force using Newton's laws
Use ToolCalculate gas properties using gas laws
Use ToolRead the how-to, then come back to this tool when you are ready to run it locally.