# Formula weight

`calc_formula_mass` is a tool of the Drybench MCP server. It runs the same engine and reporting rules as Drybench Calc.

## What it answers

Computes formula weight as the exact sum of IUPAC CIAAW 2021 standard atomic weights with the Hill formula and interval elements. Salts and hydrates use label notation (e.g. Na2HPO4.7H2O). With a lighter parentFormula, reports parent fraction, shortfall, and counter-ion mass.

The reply's result carries these fields (each measured number carries its unit, or a withheld notice when a rule applies):

- `formula` (string, required)
- `hillFormula` (string, required)
- `formulaWeight` (number, unit `g/mol`, required)
- `formulaWeightExact` (string, required)
- `formulaWeightDisplayed` (string, required)
- `intervalElements` (array of string, required)
- `dotAdducts` (array of object, optional)
  - `at` (integer, required)
  - `multiplier` (number, unit `1`, required)
  - `adduct` (string, required)
- `parent` (object, optional)
  - `formula` (string, required)
  - `hillFormula` (string, required)
  - `formulaWeight` (number, unit `g/mol`, required)
  - `formulaWeightExact` (string, required)
  - `dotAdducts` (array of object, optional)
    - `at` (integer, required)
    - `multiplier` (number, unit `1`, required)
    - `adduct` (string, required)
  - `salt` (object, required, or withheld)
    - `parentFraction` (number, unit `1`, required)
    - `shortfall` (number, unit `1`, required)
    - `counterIonMass` (number, unit `g/mol`, optional)
- `notes` (array of object, optional)
  - `id` (string, required)
  - `text` (string, required)
- `flags` (array of object, optional)
  - `id` (string, required)
  - `text` (string, required)
  - `paths` (array of string, required)

**Limits:**

- The stock, dilution and buffer calculations here are not for dosing or clinical preparation.
- It computes from the inputs it receives. It does not check the person's data, design or sample.
- Every computed number a reply returns, other than an integer or an exact decimal, is rounded once to 12 significant figures: to the nearest, a change of at most 5 × 10⁻¹² of its value, except that a lower bound is rounded down and an upper bound up, a change of less than 1 × 10⁻¹¹; the method computes, and decides any pass or fail, on the unrounded value.

> Research and education software; not for diagnosis or treatment decisions.
>
> Not medical advice. Nothing here is advice about any medicine, treatment or condition, and nothing here is an assessment of any person's variant, sample or molecule. Decisions made with it are yours.

## What this page can and cannot show

Weakest level among this tool's methods: Checked against a reference. Reference kind not recorded for 2 of 2 methods.

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.

[Open Drybench Calc](https://www.drybench.com/calculators/app) · [Drybench Calc: methods and checks](https://www.drybench.com/methods/calculators) · [What the levels mean](https://www.drybench.com/methods/levels) · [Every assistant tool](https://www.drybench.com/methods/tools)

## Inputs

An omitted input takes the default its description states; the reply's `inputsReceived` shows what was given. Any input not listed here is refused.

- `formula` (string, required): Molecular formula of what is weighed.
- `parentFormula` (string, optional): Optional molecular formula of the parent compound.

## What it withholds or refuses

A refusal, a withheld value or another named status is an answer: the reply gives the reason and no number in its place; an absent value is not zero. Invalid input means nothing ran.

- `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). (`formula-mass@1.3.0`)
- `MISSING_ARGUMENT`: No formula is given. (`formula-mass@1.3.0`)
- `MISSING_ARGUMENT`: Neither a formula nor a formula weight is given. (`stock-salt-purity@1.1.3`)
- `needs: inputs`: The concentration or volume the mode reads is missing (status incomplete). (`stock-salt-purity@1.1.3`)
- `needs: mass`: Modes volume and concentration without the mass weighed (status incomplete). (`stock-salt-purity@1.1.3`)
- `needs: purity`: Purity at or below 0, or above 100 percent (status incomplete). (`stock-salt-purity@1.1.3`)
- `INVALID_UNIT`: A quantity's unit is not one the mode reads. (`stock-salt-purity@1.1.3`)
- `OUT_OF_RANGE`: A concentration, volume or mass given at or below zero, in any mode (since 1.1.0; 1.0.0 answered a negative concentration with a negative mass). (`stock-salt-purity@1.1.3`)
- `INVALID_FORMULA`: The formula or the parent formula cannot be read by formula-mass; since 1.1.3, through formula-mass\@1.3.0, a formula starting with a digit (13CH4) among them, which 1.1.2 weighed as 13 × CH4. (`stock-salt-purity@1.1.3`)
- `magnitude`: The mass, volume, concentration or parent-equivalent mass is outside the normal range of a double (status refused, no number; since 1.1.2: 1.1.1 gave 0 g for a true 1e-200 g). (`stock-salt-purity@1.1.3`)

## How to cite a number from it

Every reply carries a cite line. It names, in order: the tool and the server version; each method the call went through, with its version and level (and the limit beside a level where the method's record narrows it); the receipt, the first 12 characters of the hashes of the arguments and of the result; and the address where its methods are described. Quote it with any number taken from the reply.

The receipt identifies a computation; it is not a signature. It holds no time, so the same arguments on the same server and method versions give the same receipt, and anyone can call the tool again and compare; a later method version can change the output hash.

### An example

The values asked and the values answered, computed by this tool when this page was built:

**Asked with**

- `formula`: C29H31N7O.CH4O3S
- `parentFormula`: C29H31N7O

It answered (`computed`):

- `formula`: C29H31N7O.CH4O3S
- `hillFormula`: C30H35N7O4S
- `formulaWeight`: 589.7 g/mol
- `formulaWeightExact`: 589.715
- `formulaWeightDisplayed`: 589.72

The reply carries more values than are shown here.

Its cite line:

```cite
calc_formula_mass, server 1.0.0; formula-mass@1.3.0 (Checked against a reference); stock-salt-purity@1.1.3 (Checked against a reference); receipt ee48dbe6546a/dfe05a58f5e3; methods https://www.drybench.com/methods/calculators; page https://www.drybench.com/methods/tools/calc-formula-mass. Quote this line with any number taken from this reply.
```

## Methods

Every method and reference the tool's replies cite, with its version and level. A reply names the methods that call went through.

### Formula weight from the molecular formula

- **Method:** `formula-mass@1.3.0`
- **Level:** Checked against a reference. Reference kind: not recorded. This level uses the apps' wider definition on the levels page.
- **Reference:** Prohaska T et al. Standard atomic weights of the elements 2021 (IUPAC Technical Report). Pure Appl Chem 2022;94:573-600. doi:10.1515/pac-2019-0603; ciaaw.org, read 6 October 2026. [doi:10.1515/pac-2019-0603](https://doi.org/10.1515/pac-2019-0603)
- **How it 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).
- 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.
- [Method, sources and checks](https://www.drybench.com/methods/m/formula-mass)
- [On Drybench Calc's methods page: Molarity and stocks](https://www.drybench.com/methods/calculators#molarity-and-stocks)

### Stock mass with salt form, hydrate and purity

- **Method:** `stock-salt-purity@1.1.3`
- **Level:** Checked against a reference. Reference kind: not recorded. This level uses the apps' wider definition on the levels page.
- **How it was checked:** Checked against Python's exact rational arithmetic (fractions.Fraction) to nine significant figures on 31 fixtures (6 October 2026).
- What was not checked: The 1.1.0 refusals and parent rule are unit-tested and have two hand cases (a negative concentration; NaCl with parent KCl), not a published case set. No published case set names stock-salt-purity\@1.1.0. Its 31 cases in stored reference values name the method by an older label ("mass-for-molarity") and are not tied to this version yet. The defaults of mode (mass) and purity (100 percent) are not echoed as unstated in the reply (the audit's finding 7). Dried-basis purity and water content are not handled: the method takes purity as given. 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.
- [Method, sources and checks](https://www.drybench.com/methods/m/stock-salt-purity)
- [On Drybench Calc's methods page: Molarity and stocks](https://www.drybench.com/methods/calculators#molarity-and-stocks)

No independent scientist has yet reviewed these checks. [What the levels mean](https://www.drybench.com/methods/levels).

## Changes to its methods

- [2026-11-25 · formula-mass\@1.3.0](https://www.drybench.com/methods/corrections#2026-11-25-formula-mass130-1)
- [2026-11-25 · stock-salt-purity\@1.1.3](https://www.drybench.com/methods/corrections#2026-11-25-stock-salt-purity113-1)

## Where it runs

**Hosted here.** The hosted MCP connection serves this tool, as does the local MCP server. The hosted connection can be paused, or a tool withheld from it, at any time; its own refusals (413, a request too large; 429, too many requests; 503, the service unavailable) are not the tool's answers and carry no receipt.

## Methods and checks

- [Drybench Calc: methods and checks](https://www.drybench.com/methods/calculators)
- [Reference checks: Drybench Calc](https://www.drybench.com/methods/calculators/checks)
- [What the levels mean](https://www.drybench.com/methods/levels)
- [Every assistant tool](https://www.drybench.com/methods/tools)
