Skip to content

Methods and checksMethods

How every result is reached and what it was checked against, app by app.

Methods and checks pages

Formula weight from the molecular formula, version 1.3.0

formula-mass@1.3.0: this version's equations with their symbols, each constant's value, their sources and whether each was read, a worked example where the record holds one, its level and what it was checked against, the number of cases, and what was not checked. This version's record is not rewritten; a correction is added under Changes.

What this page can and cannot show

Level: Checked against a reference. Reference kind: not recorded. This level uses the apps' wider definition on the levels page.

Not fully recorded, and not independently reviewed. Items marked "Not recorded" are missing from this project's records for the version named. Apart from any worked example shown, the cases and their values are not printed, so a reader cannot re-run these checks. No independent scientist has yet reviewed these methods or checks.

Use it on the web: Tris pH and pKa at your working temperature · Use it on the web: Buffer recipe with pH at your working temperature · Use it on the web: Molarity calculator: mass for a concentration · Every version of this method · Every method · What the levels mean

Version 1.3.0

Level: Checked against a reference. Reference kind: not recorded. This level uses the apps' wider definition on the levels page. formula-mass@1.3.0

What this page can and cannot show

What was checked

Checked against a CIAAW 2021 sum in Python's decimal module, with the formula from RDKit 2026.03.6, exactly on 58 fixtures (6 October 2026). The refusals and the decimal-dot warning added in 1.2.0 are unit-tested, not checked against an independent reader (10 November 2026).

Cases: no case set is linked to formula-mass@1.3.0.

A case set exists for formula-mass@1.1.0; it has not been run against this version.

What was not checked

No published case set names formula-mass@1.3.0. The 58 cases of stored reference values (lab-calculators 0.1.0 and 0.2.0) name no method version, and stored reference values (0.11.0) is for formula-mass@1.1.0; neither is tied to this version yet. The change notes for 1.2.0 and 1.3.0 say every published mass is unchanged (none of those formulas starts with a digit); tying the sets needs a re-run tool-case file under this project's ruling of 11 November 2026, section S6. The 1.3.0 refusal of a formula starting with a digit is unit-tested and has two hand cases (13CH4, 2H2O), not a published case set. The 58 cases' expected values are CIAAW sums in Python's decimal module over formulas taken from RDKit 2026.03.6: RDKit supplied the formula, not the mass. The 1.2.0 refusals and the decimal-dot warning are unit-tested only, not checked against an independent formula reader. The IUPAC 2021 report (Prohaska et al. 2022) was not read: its publisher's site refused a plain request. The table was checked element by element against CIAAW's abridged table page instead, on 11 November 2026: all 84 values agree. No case runs this method through the served tool on its production runtime. No person has worked these cases or read these sources; the reading and checks recorded here were made by AI sessions.

Equations

Definition: The molar mass of a formula unit is the sum of its atoms' atomic weights; a definition, not a model (this project's ruling of 11 November 2026, section S11(a)).

M = Σᵢ nᵢ × A_r(i) g/mol, over every element i in the formula, where nᵢ is the element's count summed over the formula's groups and adducts, each multiplied by its multiplier.
Symbol Meaning and unit
M formula weight of the formula as written, salt and hydrate included, g/mol
n_i number of atoms of element i in one formula unit, 1
A_r(i) the element's abridged standard atomic weight, used as g/mol, g/mol

Conventions

Convention chosen by this project: an ASCII '.' with a digit on each side is read as an adduct, never a decimal count, and the reply warns. CuSO4.5H2O is read as CuSO4·5H2O, 249.68 g/mol; read as a decimal, it would be 185.62 g/mol.

As ruled by this project on 11 November 2026, section "Q2".

Constants

Constant Value and unit Source Date read
Abridged standard atomic weights, 84 elements; an element whose weight is an interval takes the value CIAAW's abridged table prints (A_r) a table of values, part of the method IUPAC Commission on Isotopic Abundances and Atomic Weights (CIAAW). Abridged Standard Atomic Weights 2024., table Abridged Standard Atomic Weights 2024, section column "Abridged Standard Atomic Weight" 2026-11-11

Worked example

Worked example: one case of formula-mass@1.3.0, from its inputs through each step to the answer. Values are written as a person writes them; the working carries more digits, so your own figure may differ in the last digit shown.

Inputs

  • formula = CaCl2·2H2O

Steps

  1. count: counts = Ca 1, Cl 2, H 4, O 2 (the hydrate's 2 multiplies H2O), from formula = CaCl2·2H2O.
  2. ca: sum = 40.078 g/mol, from n = 1, A_r(Ca) = 40.078.
  3. cl: sum = 70.9 g/mol, from n = 2, A_r(Cl) = 35.45.
  4. h: sum = 4.032 g/mol, from n = 4, A_r(H) = 1.0080.
  5. o: sum = 31.998 g/mol, from n = 2, A_r(O) = 15.999.
  6. M: sum = 147.008 g/mol, from terms = ca,cl,h,o; gives result.formulaWeightGPerMol.

The working, as the case writes it:

M = Σ nᵢ·A_r(i), each A_r as CIAAW prints it.

Answer

  • result.formulaWeightGPerMol = 147.008 g/mol

Where these values came from: our own exact-arithmetic script and a hand-worked case; CIAAW, Abridged Standard Atomic Weights 2024 (ciaaw.org), read 11 November 2026.

The build has not run this example through the tool.

Worked by an AI session on 2026-11-25. No person has yet worked this case.

What it refuses, and its input ranges

  • INVALID_FORMULA: The formula cannot be read: an unknown or misspelt element; an element with no standard atomic weight (Tc, Pm, Po onward); a count, multiplier or charge starting with 0; a zero count, multiplier or written "+0"/"-0"; a count or weight beyond exact integer range; one element with a count and a bare sign ("Fe3+"), refused as ambiguous with "Fe+3" suggested; a formula starting with a digit ("13CH4", "2H2O"), refused at position 0 since 1.3.0 (1.2.0 read the number as a multiplier of the first part).
  • MISSING_ARGUMENT: No formula is given.

Changes

2026-11-25-formula-mass@1.3.0-1

2026-11-25 · formula-mass@1.3.0 · Corrections to our methods

  • What was wrong: A number written at the start of a formula was read as a multiplier of its first part, though the grammar gives a multiplier only to an adduct after a middle dot, a period or an asterisk. 13CH4, methane labelled with carbon-13, was read as 13 × CH4, the Hill formula C13H52, with a formula weight of 208.559 g/mol for 16.043; 2H2O, two molecules of water as written in an equation, was read as H4O2, 36.03 g/mol. No warning was given.
  • Affected: The formula weight and Hill formula of any formula starting with a digit, in formula-mass 1.2.0 and earlier, wherever the reader runs: the Calc app's calculators, the assistant tools calc_formula_mass, calc_molarity and calc_buffer_recipe, and the library tools that read formulas through it. No published mass is affected: no published case starts a formula with a digit.
  • What changed: In 1.3.0 a formula starting with a digit is now refused; every other mass is unchanged. The refusal gives position 0 and both readings: an isotope label is not read, and a count of molecules is not a formula. A multiplier after a middle dot, a period or an asterisk (CuSO4·5H2O, CaCl2·2H2O) is read as before, and every formula 1.2.0 refused keeps its refusal and message.
  • How it was found: A review of the formula reader's grammar on 24 November 2026 found that no rule or test documented a number at the start of a formula, while the reader applied the adduct multiplier to the first part as well; the scientific review ruled the same day that such a formula is refused. A sweep of the tools' worked examples with 13 written before each formula argument, before and after the fix, found which tools computed on it.
  • Cases added: Unit tests (13CH4 refused at position 0; CuSO4·5H2O and a ·2H2O adduct still read) and two refused hand cases; no published case set yet.

Tools that use it

Cite this version

Formula weight from the molecular formula. Drybench; formula-mass@1.3.0; https://www.drybench.com/methods/m/formula-mass/1.3.0 (accessed [date]).