Skip to content

Molecular Weight Calculator – Molar Mass from Formula

Updated:

Find molar mass from a chemical formula and see each element’s contribution. Optionally enter a sample mass to calculate moles and the number of molecules or formula units.

Find Molar Mass from a Chemical Formula

Input Fields
Use case-sensitive element symbols. Parentheses, brackets and hydrate separators (·, . or *) are supported.
If enabled, the result will update automatically when you change any value.

Molecular Weight Formula

Formula
\[ M=\sum_i a_i A_i,\qquad n=\frac{m}{M},\qquad N=nN_{\mathrm A} \]

Where:

  • \(M\) — molar mass of the substance (g/mol)
  • \(a_i\) — number of atoms of element \(i\) in one molecule or formula unit
  • \(A_i\) — atomic weight of element \(i\) (g/mol)
  • \(m\) — sample mass (g)
  • \(n\) — amount of substance (mol)
  • \(N\) — number of molecules or formula units
  • \(N_{\mathrm A}\) — Avogadro constant, \(6.02214076\times10^{23}\ \mathrm{mol}^{-1}\)

Add the atomic-weight contributions of every element to obtain molar mass. If you enter a sample mass, divide it by molar mass to find moles, then multiply by the Avogadro constant to estimate the particle count.

Molecular Weight – Calculation Example

Example: The default formula is glucose, C6H12O6. Find its molar mass and the amount and particle count in the default 180 g sample.

\[ M=6(12.011)+12(1.008)+6(15.999)=180.156\ \mathrm{g/mol} \]

\[ n=\frac{180\ \mathrm g}{180.156\ \mathrm{g/mol}}\approx0.99913408\ \mathrm{mol} \]

\[ N\approx0.99913408(6.02214076\times10^{23})\approx6.01693\times10^{23} \]

Result: The molar mass is 180.156 g/mol. A 180 g sample contains approximately 0.99913408 mol and 6.01693 × 10²³ glucose molecules.

How to use the calculator

  1. Enter the substance in Chemical Formula, using case-sensitive element symbols and whole-number subscripts written as ordinary digits. For example, enter H2O, Ca(OH)2, or CuSO4·5H2O.
  2. Leave Calculate moles and number of particles from a mass selected if you want results for a sample. Clear it if you need only molar mass and the element breakdown.
  3. If the option is selected, enter a non-negative value in Sample Mass in grams. The default is 180 g.
  4. Read Molar Mass in g/mol. Use Element Breakdown to check the parsed atom counts, each element’s mass contribution, and its percentage of the total. When a sample mass is supplied, also read Amount of Substance and Number of Molecules or Formula Units.

What molecular weight means here

A chemical formula tells you which elements are present and how many atoms of each belong to one molecule or formula unit. This calculator multiplies those counts by stored atomic weights and adds the contributions. Although “molecular weight” is commonly used in the name, the reported quantity is molar mass, in grams per mole. It applies to molecular substances such as glucose and to ionic compounds such as sodium chloride, which are described by formula units rather than individual molecules.

Molar mass connects a measured mass to an amount in moles. One mole contains \(6.02214076\times10^{23}\) specified entities. For the glucose example, one mole has a mass of 180.156 g according to the atomic weights used here. A 180 g sample is therefore slightly less than one mole—not exactly one mole, despite the close numbers.

The element breakdown helps you verify that the formula was interpreted as intended. In Ca(OH)2, for instance, the subscript 2 applies to both O and H, giving one Ca, two O, and two H atoms per formula unit. Its mass percentages describe each element’s share of the compound’s total formula mass; they are not the percentages of separate substances in a mixture. If elemental composition is your main goal, see the percent composition calculator.

Formula entry and practical limits

Use correct capitalization: Co is cobalt, while CO contains carbon and oxygen. Parentheses and square brackets can group atoms, and a following whole-number subscript multiplies the entire group. Hydrates can be written with ·, ., or * as the separator; CuSO4·5H2O includes five water units for every CuSO4 unit. These separators are not decimal points in this input.

The calculator accepts a terminal ionic charge and omits it from the atom count. Electron mass is not included, so charge does not materially change the displayed molar mass. For an unambiguous charge following a polyatomic formula, use notation such as SO4^2-. Check the element breakdown if a charge or subscript could be read in more than one way.

Results use the calculator’s stored atomic weights, and molar mass is displayed to three decimal places; reference tables with different rounding may give slightly different values. The particle result assumes one molecule or formula unit per counted entity. It does not account for dissociation in solution, purity, or isotope-specific masses. A sample mass of zero gives zero moles and particles. For a different calculation involving particle count and gas volume, use the Avogadro’s law calculator; for charged species measured by mass spectrometry, see the mass spectrometry m/z calculator.

Frequently Asked Questions

How do I calculate molar mass by hand?

Count each element’s atoms, multiply each count by its atomic weight, then add the results. For water, H2O, the calculation is \(2(1.008)+15.999=18.015\) g/mol. For a formula with groups, work out how many atoms the group’s subscript contributes before multiplying by atomic weights.

What is a normal or good molar mass?

There is no universal normal or good molar mass; the value depends on the substance’s formula. A small molecule can have a much lower molar mass than a large organic compound. To check a result, compare it with a trusted value for the same formula, allowing for small differences in atomic-weight rounding.

Is molecular weight in daltons the same number as molar mass in g/mol?

They are numerically approximately equal for a substance with the same isotopic composition, but they describe different quantities. Daltons (Da) express the mass of one molecule or formula unit; g/mol expresses the mass of one mole of those entities. An isotope-specific mass may differ from a result based on standard atomic weights.

How do I use a sample mass measured in milligrams or kilograms?

Convert the mass to grams before entering it: divide milligrams by 1,000, or multiply kilograms by 1,000. For example, 250 mg is 0.250 g. Do not convert the molar mass instead—the calculator reports it in g/mol and expects the sample mass in grams, so the units cancel when calculating moles.

Do an empirical formula and a molecular formula have the same molar mass?

Not necessarily. An empirical formula gives the simplest whole-number ratio of atoms, while a molecular formula gives the actual atom counts in a molecule. For example, CH2O has a molar mass of about 30.026 g/mol, whereas C6H12O6 is six times that value. Use the molecular formula when you need the mass of a mole of molecules.

Why does a hydrate have a higher molar mass than its anhydrous compound?

A hydrate’s formula includes a specified number of water units, and their atoms contribute to its molar mass. For example, CuSO4·5H2O includes five H2O units in addition to CuSO4. If a sample has been heated and has lost some or all of that water, use the formula matching its actual hydration state.

Does the particle count for a salt mean the same number of dissolved ions?

No. For an ionic compound, the calculated count refers to formula units, not individual ions produced after dissolution. If NaCl dissolves completely, each formula unit can yield one sodium ion and one chloride ion, giving twice as many ions as formula units. Actual ion counts can depend on dissolution and dissociation conditions.

Leave a Reply

Your email address will not be published. Required fields are marked *