CHEMISTRY CALCULATOR

Molecular Weight Calculator

Calculate molecular weight from the number of carbon, hydrogen, oxygen and nitrogen atoms in a formula.

Reviewed by the Calculator.nu math team
Updated August 2026
Molecular weight
180.156 g/mol
Carbon by mass
40.002 %
Total atoms
24

The formula

MW = 12.011C + 1.008H + 15.999O + 14.007N
# standard atomic weights from the IUPAC table

How to calculate molecular weight

Molecular weight is the sum of the atomic weights of every atom in a molecule. This calculator handles the four elements that make up most organic compounds; the defaults describe glucose, C₆H₁₂O₆.

Standard atomic weights are averages across natural isotope abundances, which is why carbon is 12.011 rather than 12. For mass spectrometry you would use monoisotopic masses instead.

The calculator asks for:

  • Carbon atoms
  • Hydrogen atoms
  • Oxygen atoms
  • Nitrogen atoms

No submit button: type and the answer moves. Your inputs end up in the link, so the page can be shared already filled in.

The calculation runs on exactly the numbers currently in the fields above, recomputed in full each time — there is no dependency on the order values are entered in, so adjusting one input to test a scenario and then changing it back leaves the result exactly where it started.

Why molecular weight matters

A molecular weight calculation gets used both to check work already done by hand and to explore how a formula behaves without redoing the algebra every time an input changes — this page exists for both, since the underlying arithmetic is the same either way.

It is useful for checking a manual calculation before submitting or acting on it, and equally useful for building intuition about a formula by adjusting one input at a time and watching how the result moves in response — a much faster way to understand a relationship than working through several versions of the algebra by hand.

A formula like this one is rarely the last step in a piece of work — the figure it produces usually feeds into a further calculation, a comparison against a published value, or a write-up that needs to state both the result and how confident it is. Getting this step right the first time, rather than propagating a small arithmetic slip through several more steps, is the main practical reason to check a manual calculation against a tool like this one before building on top of it.

In practice, a formula like this one is most often reached for at the exact moment a manual calculation needs checking against a deadline — a lab report due, a problem set to submit — which is precisely the situation where a small arithmetic slip is easiest to miss and most costly to leave uncorrected. Running the same inputs through an independent calculator catches that class of error reliably.

Worked example

Here is the calculation with the starting values:

  • Carbon atoms: 6
  • Hydrogen atoms: 12
  • Oxygen atoms: 6
  • Nitrogen atoms: 0

That gives:

  • Molecular weight: 180.156 g/mol
  • Carbon by mass: 40.002 %
  • Total atoms: 24

The figures above are the calculator's own default values, shown purely so the working is visible rather than hidden — the same steps apply exactly to your own numbers, entered in the fields at the top of this page.

Reading the result

The carbon percentage is a useful cross-check against elemental analysis results, which report the mass fraction of each element in a purified sample.

Where this goes wrong. Molecular weight and molar mass are numerically identical but conceptually different. Molecular weight is dimensionless, relative to carbon-12; molar mass carries units of grams per mole.

A result that is wrong by an exact factor of ten, a hundred or a similar round number is almost always a units error rather than a mistake in the formula itself — checking each input against the unit stated beside it is the fastest way to track it down.

180.156 g/mol for C₆H₁₂O₆, usually rounded to 180.16 in laboratory work.

Because natural carbon is about 98.9% carbon-12 and 1.1% carbon-13. The standard atomic weight is the abundance-weighted average of the isotopes.

It returns molecular weight. With 6 carbon atoms, 12 hydrogen atoms and 6 oxygen atoms, that comes to 180.156 g/mol. Change any field and the figure moves with it.

Generally, no more than the least precise input justifies — a result reported to six decimal places from inputs measured to two significant figures is implying a precision the calculation does not actually have. The calculator shows full precision so you can round appropriately for your own use.

Yes — the equation shown in the formula section above is the standard form used in textbooks and reference material for this calculation, not a simplified or approximate version.

Yes, in the sense that it applies the correct standard formula and returns an accurate result for the inputs given — but check your own course or publication's requirements for how results should be rounded, presented and referenced, since those conventions vary and are not something a calculator can know on your behalf.

Was this calculator helpful?

Tap a star to rate it. Your feedback helps us improve the tools people rely on most.