Skip to content
Test versionSearch

Mathematics

Formula mass calculator

Calculate the formula mass of a chemical formula in g/mol by summing atom counts times the atomic contributions you enter, with mass shares per element.

How it worksFAQRelated tools

Content reviewed:

Also available for Germany, in German 

Formula: up to 200 characters, 32 symbols,nesting 8; parentheses/square groups and middle-dot hydrates allowed. Charges, isotopic labels, zero counts and initial coefficients refuse. Enter all used molar contributions using semicolons, up to 500 characters; each positive and at most 1,000,000 g/mol. No default weights. Amount up to 1e30; particle input integer. Decimal point/comma, integer fraction or exponent notation; no thousands groups. Precision 0–12. TXT/CSV and up to 30 explicit in-tab scenarios. Total mass: up to 32 symbols. Element contributions: up to 16 symbols, each atom count, entered molar contribution and exact/rounded mass share. Rounded percentages may not sum to exactly 100. No atomic-weight table.

Entered-reference educational arithmetic. It does not check chemical existence, valence, handling safety, isotope composition or uncertainty. Fractional computed entity values are not a discrete sample count.

Decimal results are approximate. Inputs stay in this browser tab.

How it works

Sum of parsed atom counts multiplied by your positive entered contributions in g/mol. Optional element contributions and exact/rounded mass shares from entered references.

Worked example

Illustrative arithmetic only: H=1;O=16 gives H2O a result of 18 g/mol. These example numbers are not an atomic-weight table.

Frequently asked questions

What does the formula mass calculator do?

It sums the atom counts in your chemical formula multiplied by the molar contributions you enter in g/mol. Optionally it shows each element's contribution and its exact and rounded mass share.

Why do I have to enter the atomic weights myself?

The calculator has no built-in atomic-weight table and no default weights. Enter every element used as Symbol=value pairs separated by semicolons, for example H=1;O=16. Each value must be positive and at most 1,000,000 g/mol.

Which formulas can I enter?

Up to 200 characters and 32 symbols, with nesting up to 8 levels. Parentheses, square-bracket groups and middle-dot hydrates are allowed. Charges, isotopic labels, zero counts and leading coefficients are refused.

What does the worked example show?

With the illustrative values H=1;O=16, H2O gives 18 g/mol. These example numbers are not an atomic-weight table.

Why do the mass shares not add up to exactly 100%?

The calculator shows exact and rounded mass shares for each element. Rounded percentages may not sum to exactly 100.

Does it check whether the compound exists or is safe to handle?

No. This is educational arithmetic based on the values you enter. It does not check chemical existence, valence, handling safety, isotope composition or uncertainty. Your inputs stay in this browser tab.