Skip to main content

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

Calculated Molecular Weight

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.

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:

ConceptDefinitionTypical UnitWhen 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.

SymbolElement NameAtomic Weight (g/mol)Source
HHydrogen1.008IUPAC conventional
HeHelium4.003IUPAC conventional
LiLithium6.941IUPAC conventional
BeBeryllium9.012IUPAC conventional
BBoron10.811IUPAC conventional
CCarbon12.011IUPAC conventional
NNitrogen14.007IUPAC conventional
OOxygen15.999IUPAC conventional
FFluorine18.998IUPAC conventional
NeNeon20.18IUPAC conventional
NaSodium22.99IUPAC conventional
MgMagnesium24.305IUPAC conventional
AlAluminum26.982IUPAC conventional
SiSilicon28.086IUPAC conventional
PPhosphorus30.974IUPAC conventional
SSulfur32.065IUPAC conventional
ClChlorine35.453IUPAC conventional
ArArgon39.948IUPAC conventional
KPotassium39.098IUPAC conventional
CaCalcium40.078IUPAC conventional
ScScandium44.956IUPAC conventional
TiTitanium47.867IUPAC conventional
VVanadium50.942IUPAC conventional
CrChromium51.996IUPAC conventional
MnManganese54.938IUPAC conventional
FeIron55.845IUPAC conventional
CoCobalt58.933IUPAC conventional
NiNickel58.693IUPAC conventional
CuCopper63.546IUPAC conventional
ZnZinc65.38IUPAC conventional
GaGallium69.723IUPAC conventional
GeGermanium72.63IUPAC conventional
AsArsenic74.922IUPAC conventional
SeSelenium78.971IUPAC conventional
BrBromine79.904IUPAC conventional
KrKrypton83.798IUPAC conventional
RbRubidium85.468IUPAC conventional
SrStrontium87.62IUPAC conventional
YYttrium88.906IUPAC conventional
ZrZirconium91.224IUPAC conventional
NbNiobium92.906IUPAC conventional
MoMolybdenum95.95IUPAC conventional
TcTechnetium98Longest-lived isotope (no IUPAC standard AW)
RuRuthenium101.07IUPAC conventional
RhRhodium102.906IUPAC conventional
PdPalladium106.42IUPAC conventional
AgSilver107.868IUPAC conventional
CdCadmium112.414IUPAC conventional
InIndium114.818IUPAC conventional
SnTin118.71IUPAC conventional
SbAntimony121.76IUPAC conventional
TeTellurium127.6IUPAC conventional
IIodine126.904IUPAC conventional
XeXenon131.293IUPAC conventional
CsCesium132.905IUPAC conventional
BaBarium137.327IUPAC conventional
LaLanthanum138.905IUPAC conventional
CeCerium140.116IUPAC conventional
PrPraseodymium140.908IUPAC conventional
NdNeodymium144.242IUPAC conventional
PmPromethium145Longest-lived isotope (no IUPAC standard AW)
SmSamarium150.36IUPAC conventional
EuEuropium151.964IUPAC conventional
GdGadolinium157.25IUPAC conventional
TbTerbium158.925IUPAC conventional
DyDysprosium162.5IUPAC conventional
HoHolmium164.93IUPAC conventional
ErErbium167.259IUPAC conventional
TmThulium168.934IUPAC conventional
YbYtterbium173.045IUPAC conventional
LuLutetium174.967IUPAC conventional
HfHafnium178.49IUPAC conventional
TaTantalum180.948IUPAC conventional
WTungsten183.84IUPAC conventional
ReRhenium186.207IUPAC conventional
OsOsmium190.23IUPAC conventional
IrIridium192.217IUPAC conventional
PtPlatinum195.084IUPAC conventional
AuGold196.967IUPAC conventional
HgMercury200.59IUPAC conventional
TlThallium204.38IUPAC conventional
PbLead207.2IUPAC conventional
BiBismuth208.98IUPAC conventional
PoPolonium209Longest-lived isotope (no IUPAC standard AW)
AtAstatine210Longest-lived isotope (no IUPAC standard AW)
RnRadon222Longest-lived isotope (no IUPAC standard AW)
FrFrancium223Longest-lived isotope (no IUPAC standard AW)
RaRadium226Longest-lived isotope (no IUPAC standard AW)
AcActinium227Longest-lived isotope (no IUPAC standard AW)
ThThorium232.038IUPAC conventional
PaProtactinium231.036IUPAC conventional
UUranium238.029IUPAC conventional
NpNeptunium237Longest-lived isotope (no IUPAC standard AW)
PuPlutonium244Longest-lived isotope (no IUPAC standard AW)
AmAmericium243Longest-lived isotope (no IUPAC standard AW)
CmCurium247Longest-lived isotope (no IUPAC standard AW)
BkBerkelium247Longest-lived isotope (no IUPAC standard AW)
CfCalifornium251Longest-lived isotope (no IUPAC standard AW)
EsEinsteinium252Longest-lived isotope (no IUPAC standard AW)
FmFermium257Longest-lived isotope (no IUPAC standard AW)
MdMendelevium258Longest-lived isotope (no IUPAC standard AW)
NoNobelium259Longest-lived isotope (no IUPAC standard AW)
LrLawrencium266Longest-lived isotope (no IUPAC standard AW)
RfRutherfordium267Longest-lived isotope (no IUPAC standard AW)
DbDubnium268Longest-lived isotope (no IUPAC standard AW)
SgSeaborgium269Longest-lived isotope (no IUPAC standard AW)
BhBohrium270Longest-lived isotope (no IUPAC standard AW)
HsHassium269Longest-lived isotope (no IUPAC standard AW)
MtMeitnerium278Longest-lived isotope (no IUPAC standard AW)
DsDarmstadtium281Longest-lived isotope (no IUPAC standard AW)
RgRoentgenium282Longest-lived isotope (no IUPAC standard AW)
CnCopernicium285Longest-lived isotope (no IUPAC standard AW)
NhNihonium286Longest-lived isotope (no IUPAC standard AW)
FlFlerovium289Longest-lived isotope (no IUPAC standard AW)
McMoscovium290Longest-lived isotope (no IUPAC standard AW)
LvLivermorium293Longest-lived isotope (no IUPAC standard AW)
TsTennessine294Longest-lived isotope (no IUPAC standard AW)
OgOganesson294Longest-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)?

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.

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.