Template · Chemistry

Molar mass calculator from a chemical formula

Molar mass of a compound from its element counts, with mass percent and a grams-to-moles converter.

Create an account

Downloads are included in the $19.85 yearly membership. Sign in

XLSXCSVODSXMLNumbers
Molar mass calculator from a chemical formula
Example data — replace the blue input cells with your own.
MOLAR MASS (G/MOL)NUMBER OF ATOMSHEAVIEST ELEMENT BY MASS
194.1924C
Compound: Caffeine (example)
Compound nameCaffeine (example)Label only
Formula (text, for the record)C8H10N4O2Typed for reference; the element rows below do the arithmetic
CheckOKSymbols are matched without regard to case. Enter Co and CO as elements, never as one string.
Element symbolCountAtomic weight (g/mol)Mass contribution (g/mol)Mass percentElement name
C812.01196.0949.5%Carbon
H101.00810.085.2%Hydrogen
N414.00756.0328.9%Nitrogen
O215.99932.0016.5%Oxygen

Showing the first 16 of 55 rows and 7 of 7 columns. Cells with formulas show the formula on hover.

What does this template do?

This workbook adds up the molar mass of a chemical compound from the element symbols and counts in its formula. Enter a compound name, its formula and up to twelve element rows. The Calculator tab looks up each atomic weight in the Elements table, multiplies it by the count and totals the mass in grams per mole. It also reports the mass percent of each element, the number of atoms and the heaviest element by mass.

The Elements table lists the abridged IUPAC standard atomic weights for elements 1 to 92. Radioactive elements with no standard atomic weight show the mass number of a long-lived isotope, with a note. A converter block turns a mass in grams into moles and back. A second worked compound, copper(II) sulfate pentahydrate, shows how a hydrate is entered element by element.

The example compound is caffeine, C8H10N4O2, with a molar mass of about 194.19 g/mol. The compound names and masses are example data for the worked case.

What’s inside

  • Molar mass from element counts, with atomic weights looked up in a table for elements 1 to 92
  • Mass contribution and mass percent for each element, with a total that sums to 100%
  • Exact VLOOKUP; an unknown symbol is flagged instead of returning a wrong weight
  • Grams-to-moles and moles-to-grams converter for the compound on the calculator
  • Second worked example, copper(II) sulfate pentahydrate, entered as element counts

Which tabs does the workbook have?

TabWhat it holds
CalculatorCompound name, formula, element counts, molar mass, mass percent and a mass-to-mole converter.
ElementsAtomic number, symbol, name and abridged standard atomic weight for elements 1 to 92.
NotesWhat the workbook does, the method, assumptions and limits.

What formulas does this template use?

This template holds 111 formulas in 587 cells across 3 tabs, so 19% of its cells calculate. They use 12 distinct functions; the longest formula is 130 characters and 48 of them read from another tab.

FunctionUsesWhat it does
IF106one result when a test is true, another when false
OR50true when any test is true
IFERROR48swaps an error for a fallback value
VLOOKUP48looks a value up in a column
ISNUMBER24true for a number
NOT24reverses true and false
SUM6adds numbers
COUNT3counts numeric cells
COUNTIF2counts cells meeting one condition
INDEX1value at a position in a range
MATCH1position of a value in a range
MAX1largest value

Counted from the workbook itself. Only functions that Excel, LibreOffice Calc, Google Sheets and Apple Numbers evaluate the same way are used, so the formulas survive every download format.

How do you use it?

  1. On the Calculator tab, type the compound name and formula in the blue cells.
  2. Enter each element symbol in column A and its count in column B, using up to twelve rows.
  3. Read the molar mass, number of atoms and heaviest element in the tiles at the top.
  4. Use the converter block to move between grams and moles for the compound.
  5. For an element that is not in the table, add a row to the Elements tab and extend the lookup range.

What is it good for?

  • Checking the molar mass of a reagent before weighing it
  • Converting a sample mass into moles for a reaction
  • Comparing the mass percent of elements in a hydrate
  • Teaching how atomic weights add up in a formula

Questions about this sheet

Does the calculator handle hydrates?

Yes. Enter the water of hydration as extra oxygen and hydrogen rows. Copper(II) sulfate pentahydrate is the worked example, with Cu 1, S 1, O 9 and H 10.

Why does a row show Unknown symbol?

The symbol is not in the Elements table. Symbols are matched without regard to case, so enter Co and CO as separate elements rather than as one formula string.

Which atomic weights does it use?

The abridged IUPAC standard atomic weights listed on the Elements tab. The starred radioactive elements show the mass number of a long-lived isotope instead.