Using the Molecular Weight Calculator
This page adds abridged standard atomic weights for every atom in a formula. The total is the formula mass in daltons and the molar mass in grams per mole. Water, H2O, is 18.015 g/mol. Carbon dioxide, CO2, is 44.009 g/mol. Sodium chloride, NaCl, is 58.44 g/mol. Glucose, C6H12O6, is 180.156 g/mol.
For a molecular substance such as water, that number is the molecular mass. For an ionic formula such as NaCl, the same arithmetic is the formula mass. The page does not pretend an ionic crystal is one molecule. The number is still the sum of the atomic weights.
Weights come from the CIAAW abridged standard atomic weights table for 2024, retrieved on 24 November 2026 from https://ciaaw.org/abridged-atomic-weights.htm. The full table, including intervals, is at https://ciaaw.org/atomic-weights.htm. Where the full table gives an interval, this page uses the abridged central value and marks that element as an interval in the download. The printed uncertainty is not added into the total.
Elements with no standard atomic weight, including technetium and promethium, are rejected. A mass number is not substituted.
Formula Mass and Molar Mass
The formula mass is the sum of atomic weight times atom count. The molar mass uses the same digits with the unit grams per mole. H2O uses hydrogen 1.0080 twice and oxygen 15.999 once. 2.0160 plus 15.999 is 18.015. The headline drops a trailing zero and shows 18.015 g/mol.
Carbon is 12.011. Oxygen twice is 31.998. CO2 is 44.009 g/mol. Sodium is 22.990 and chlorine is 35.45, so NaCl is 58.44 g/mol. Six carbons, twelve hydrogens, and six oxygens give 180.156 g/mol. Calcium hydroxide, Ca(OH)2, is 74.092 g/mol, which is 40.078 plus two times 15.999 plus two times 1.0080. That sum is 74.092, near the two-decimal figure 74.09 that many tables round to. This page keeps 74.092.
Copper sulfate pentahydrate, CuSO4·5H2O, is 249.677 g/mol. Copper is 63.546, sulfur is 32.06, four oxygens are 63.996, and five water units are 90.075. The sum is 249.677, which rounds to 249.68 at two decimals. The page shows 249.677 so the rounding is yours to apply, not hidden.
The percentage for each element is that element contribution divided by the total, times 100. Rounded percentages may not add to exactly 100. The contributions themselves add to the headline. Use the contributions when the last digit matters.
How a Formula Is Read
An element symbol is a capital letter, plus a lowercase letter when the symbol has two letters. CO is carbon and oxygen. Co is cobalt. The second letter must be lowercase for a two-letter symbol. A symbol that is not in the dataset is rejected, including elements that CIAAW lists with no standard atomic weight.
A subscript is the digits after a symbol or a group. Unicode subscripts such as H₂O are accepted and treated as H2O. A missing subscript means 1. A subscript of 0 is rejected. A subscript above 1000 is rejected. The total atom count must be from 1 to 10000.
Parentheses and square brackets group atoms. The subscript after the group multiplies everything inside. Ca(OH)2 is one calcium, two oxygens, and two hydrogens. K4[Fe(CN)6] is 368.345 g/mol. Nesting may be six levels deep. A missing closer is rejected. The page does not guess where the group ended.
A hydrate mark is a middle dot, a bullet, or a period or asterisk before the water or other added formula. CuSO4·5H2O and CuSO4.5H2O are the same input. The integer after the mark multiplies the formula that follows. One hydrate mark is allowed, at the top level. A dot in the middle of a group is rejected.
The count becomes a molarity only after you choose a solution volume. The Molarity Calculator divides moles by liters. It does not parse H2O. Bring a g/mol value from this page into that one when the question changes from formula mass to concentration.
The formula is never executed as code. There is no evaluation of arithmetic you hide inside the text. Invalid characters are rejected rather than skipped.
Worked Formulas
Enter H2O. Confirm 18.015 g/mol, two hydrogen atoms, and one oxygen atom. Enter CO2 and confirm 44.009 g/mol. Enter NaCl and confirm 58.44 g/mol. Enter C6H12O6 and confirm 180.156 g/mol. These four are the quick audit. If H2O is not 18.015 g/mol, the dataset did not load or the formula was not H2O.
Enter Ca(OH)2 and confirm 74.092 g/mol. The parentheses are required for the meaning "two hydroxide groups." CaOH2 without parentheses is one calcium, one oxygen, and two hydrogens, which is a different count and a different mass. The page will compute the formula you typed. It will not insert parentheses you omitted.
Enter CuSO4·5H2O and confirm 249.677 g/mol. Five water units add five times 18.015 to the anhydrous salt. Leave the 5 off and the mass falls by that water. The download lists each element, not each water molecule as a separate row. Hydrogen and oxygen from the water are added to any hydrogen and oxygen already in the salt.
A single multiplication can audit two hydrogens. The 4 Function Calculator can multiply 1.0080 by 2. It does not know oxygen. Add 15.999 yourself if you are checking by hand. Use this page when the formula has groups, a hydrate, or more than one element.
Al2(SO4)3 is 342.132 g/mol. Two aluminium atoms and three sulfate groups are the point of the parentheses. The subscript 3 multiplies sulfur once and oxygen four times inside the group, then the leading 2 multiplies only aluminium.
Intervals, Uncertainty, and Omitted Elements
Hydrogen, lithium, boron, carbon, nitrogen, oxygen, magnesium, silicon, sulfur, chlorine, argon, bromine, thallium, and lead have interval standard atomic weights in the full CIAAW table. Their abridged values are single numbers with an uncertainty large enough to cover normal materials. This page uses the abridged central value. It does not pick the low end or the high end, and it does not add the uncertainty bar to the mass.
Other elements use the abridged standard atomic weight, which CIAAW quotes to five significant figures when the value supports it. Sodium 22.990 and calcium 40.078 are those abridged figures. A more precise CIAAW standard value can differ in a later digit. This page does not mix the full-precision table into some elements and the abridged table into others. Every stored weight is the abridged central value.
Technetium, promethium, and the elements with a dash in the CIAAW table have no standard atomic weight. Entering Tc returns an error that a mass number was not used. The page will not treat 99 as the atomic weight of technetium. If you need a specific isotope mass, that is a different dataset and it is not loaded here.
The uncertainty column in the source is stored in the JSON file and is not a line in the mass. Two bottles of an interval element can legally differ inside that uncertainty. The headline is the conventional abridged sum, not a measurement of your sample.
Formulas the Parser Will Not Repair
Spaces are invalid. H2O with a space is rejected. A charge such as Na+ is rejected because the plus sign is not a subscript. Write NaCl if you want the formula mass of the salt, not a charged fragment the parser would have to invent.
A lowercase first letter is rejected. co2 is not CO2, because element symbols start with a capital letter. Fix the capitals. The page will not rewrite the string.
Unmatched brackets stop the run. So does a group nested more than six deep, a formula longer than 80 characters, and an atom count above 10000. Those limits keep a pasted paragraph from being treated as a formula.
Comparing two masses by their difference of percentages can hide the absolute gap. The Percentage Difference Calculator compares two numbers you type. It does not parse a formula. If you want the percent each element contributes, use the percent column here. If you want the relative gap between two headline masses, you can take those two headlines to that other page. Do not expect either page to know the other inputs.
What the Mass Does Not Say
It does not identify a bottle, a hazard, or a dose. It does not say how to dissolve the compound. It does not return a concentration until you take the molar mass somewhere else and supply a volume. It does not apply significant-figure rules beyond showing the summed abridged values. You may round 74.092 to 74.09 in a note if you say that you rounded.
Density is mass per volume for a sample you measured or were given. The Density Calculator uses that relationship. A molar mass is not a density. Water at 18.015 g/mol grams per mole is not 18.015 grams per milliliter unless a separate density says so. Do not copy the molar mass into a density field and drop the unit.
Element Percentages and Further Formulas
The percent column is the element contribution divided by the formula mass, then multiplied by 100. For H2O the hydrogen contribution is 2.016 and the total is 18.015. The oxygen contribution is 15.999. Those two contributions add back to 18.015. If a rounded percent column is copied into a report, say that the percents were rounded. The contributions are the figures that still add to the headline.
Keeping the Formula Next to the Mass
Write the formula exactly as you typed it, including parentheses and the hydrate mark. 74.092 g/mol without the parentheses in the note cannot be checked. 249.677 g/mol without the five waters cannot be checked. The digits are not a fingerprint of one formula. Another formula could sum to a nearby number.
An alcohol strength is not a formula mass. The ABV Calculator uses the inputs on that page. It does not add atomic weights. A molecular formula for ethanol, C2H6O, can be entered here if you want that formula mass. The ABV percentage is a different question.