# Monoisotopic mass and ion m/z of a formula

`ms_ion_mz` · Runs: On the server · Level: Checked against a reference: molmass 2026.11.1 (its own AME2020 copy, ion-mz-1.json) and pyteomics 5.0.2 (an older NIST table, within a computed tolerance); a second implementation in Python by a separate agent of the same model family (ion-mz-3.json at 1.0.0, ion-mz-5.json at 1.0.1)

Works out the monoisotopic mass of a formula and the m/z of each stated ion.

Research and education software; not medical advice, and not for diagnosis or treatment decisions. It computes from the inputs it receives. It does not check the person's data, design or sample.

[Catalogue](https://www.drybench.com/mcp/catalogue) / [Mass spectrometry](https://www.drybench.com/mcp/catalogue/mass-spectrometry)

[Ask your assistant](https://www.drybench.com/mcp/connect)

```cite
Monoisotopic mass and ion m/z of a formula (ms_ion_mz), Drybench MCP server 1.0.0; ion-mz@1.0.2 (Checked against a reference); https://www.drybench.com/mcp/tools/ms-ion-mz
```

## What it is

Returns a formula's monoisotopic mass and each stated ion's m/z, from AME2020 atomic masses. Use when an ion's m/z is to be predicted from a formula, with adducts, multimers, charge and labels stated. Not for a mass to weigh out: use \`calc\_formula\_mass\`; from a structure, use \`molecule\_descriptors\`; for isotope peaks, use \`ms\_isotope\_pattern\`; against a measurement, use \`ms\_mass\_error\`; from a sequence, use \`ms\_peptide\_mass\`. Refuses a charged formula and lead; charge 1 to 100 and polarity are required.

Field: [Analytical chemistry](https://www.drybench.com/mcp/catalogue/mass-spectrometry).

## What it does

**You give**

- `formula` (required): The neutral molecule's elemental formula, e.g. C8H10N4O2 or CuSO4·5H2O; no charge. Leading and trailing white space is removed before the pattern is checked.
- `labels` (required): Isotope labels; an empty list for none.
- `ions` (required): The ions to compute, at least one.

No request is recorded for this tool.

**Limits**

- Research arithmetic: each number follows from the formula, sequence or values you give, by the method and any constants named on the tool, and describes those inputs rather than the sample or instrument they came from.
- It is not an identification, a validated quantification or a check of an instrument, and it is not for diagnosis or treatment decisions.
- Monoisotopic only: each element's most abundant isotope in the IUPAC 2009 representative composition, refused where it can change within CIAAW 2024 (lead), plus stated labels; added and removed atoms are monoisotopic and the charge is applied by removing or adding electrons; the bound is from the atomic-mass constants only and excludes measurement; above about 10–20 kDa the monoisotopic peak is usually not observed (estimate); for the average mass use calc\_formula\_mass.
- 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.

**It will not answer when**

- the formula, an added or a removed group has a charge written in it: the charge belongs to the ion.
- a symbol that is no element, an empty formula, a zero count or multiplier, an unclosed bracket or any other parse error.
- an element with no representative isotopic composition (technetium and the like).
- an element whose most abundant isotope can change within its CIAAW 2024 range (lead).

### Every input, with its units

3 inputs

- `formula` (required): The neutral molecule's elemental formula, e.g. C8H10N4O2 or CuSO4·5H2O; no charge. Leading and trailing white space is removed before the pattern is checked.
- `labels` (required): Isotope labels; an empty list for none.
- `ions` (required): The ions to compute, at least one.

### Every refusal, with its code

8 refusals

| Code | When |
| --- | --- |
| `CHARGED_FORMULA` | the formula, an added or a removed group has a charge written in it: the charge belongs to the ion. |
| `FORMULA_UNREADABLE` | a symbol that is no element, an empty formula, a zero count or multiplier, an unclosed bracket or any other parse error. |
| `ELEMENT_NOT_IN_TABLE` | an element with no representative isotopic composition (technetium and the like). |
| `MONOISOTOPE_NOT_FIXED` | an element whose most abundant isotope can change within its CIAAW 2024 range (lead). |
| `LABEL_EXCEEDS_COUNT` | more labelled atoms than the formula has of that element, or a label on an element the formula lacks. |
| `NUCLIDE_NOT_IN_TABLE` | a labelled nuclide AME2020 does not tabulate. |
| `ESTIMATED_MASS` | a labelled nuclide whose AME2020 mass is marked estimated (#), not measured. |
| `REMOVES_ABSENT_ATOMS` | an ion removes monoisotopic atoms it does not have (labelled atoms counted apart), or nothing is left. |

## The calculation

The method's equations, constants and worked example.

### [Monoisotopic mass and ion m/z of a formula](https://www.drybench.com/methods/m/ion-mz/1.0.2)

`ion-mz@1.0.2`

**Equation 1**

```text
M = sum over elements of n_i x m(monoisotope of i) + sum over labels of n_l x m(labelled nuclide), each label replacing that many atoms of its element
```

| Symbol | Meaning |
| --- | --- |
| `M` | monoisotopic neutral mass, Da |
| `n_i` | count of element i |
| `n_l` | count of a labelled nuclide |
| `m(nuclide)` | AME2020 atomic mass of the neutral atom, Da |

Source 1.

**Equation 2**

```text
m/z = (k x M + m(added atoms) - m(removed atoms) - q x m(e)) / z, with q = +z for a positive ion and -z for a negative one: m/z is the ion's mass over the unified atomic mass unit divided by its charge number (IUPAC 2013, entry 356)
the ion's mass as k x M plus added less removed atoms, less q electrons, is Drybench's construction, binding energies not modelled. The reply's unit Th is the thomson, which entry 356's Note 3 deprecates
it is kept as the label of that dimensionless quotient
```

| Symbol | Meaning |
| --- | --- |
| `k` | multimer |
| `z` | charge number |
| `q` | signed charge |
| `M` | monoisotopic neutral mass, Da |
| `m(e)` | electron mass, Da |
| `m/z` | m/z, the dimensionless quotient of IUPAC 2013 entry 356 (the name 'mass-to-charge ratio' is deprecated there), Th |

Source 2.

**Equation 3**

```text
electrons = sum over the ion's atoms of atomic number Z, less q (q = +z for a positive ion, -z for a negative one)
oddElectron is true when that count is odd
```

| Symbol | Meaning |
| --- | --- |
| `electrons` | the ion's electron count |
| `Z` | atomic number of each atom |
| `q` | signed charge |

**Equation 4**

```text
bound = (k x sum n_i u_i + sum over added and removed atoms of u + z x u(m(e))) / z, summed linearly
reported rounded up to two significant figures (toward larger magnitude at the second significant figure)
```

| Symbol | Meaning |
| --- | --- |
| `u_i` | AME2020 uncertainty of the nuclide, Da |
| `bound` | bound from the atomic-mass constants only, Th |

Source 1.

**Equation 5**

```text
bound(M) = sum over atoms of n_i x u_i, summed linearly from the AME2020 uncertainties, rounded up to two significant figures (toward larger magnitude at the second significant figure)
the ion's bound adds the added and removed atoms' u and z x u(m(e)) and divides by z
```

| Symbol | Meaning |
| --- | --- |
| `u_i` | AME2020 uncertainty of the nuclide of atom i, Da |
| `n_i` | count of that nuclide |
| `u(m(e))` | standard uncertainty of the electron mass (the constant's stated uncertainty), Da |

Source 1.

| Constant | Value | From |
| --- | --- | --- |
| AME2020 atomic masses and uncertainties, every nuclide the file tabulates, with its estimated (#) mark `m(nuclide)` | a table of values, part of the method | Source 1 |
| electron mass `m(e)` | 0.0005485799090441 Da | Source 3 |
| each element's most abundant isotope: the argmax of its IUPAC 2009 representative composition, kept only where it keeps its lead across the CIAAW 2024 ranges (lead fails) `monoisotope` | a table of values, part of the method | Source 4 |
| the 2024 ranges against which each monoisotope's lead is checked `CIAAW 2024 ranges` | a table of values, part of the method | Source 5 |

A definition, not a model: the equation states what the quantity means. A different convention gives a different number.

**Worked example**

Worked example: one case of ion-mz\@1.0.2, 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 = C8H10N4O2
- ions\[0\].multimer = 1
- ions\[0\].add = H
- ions\[0\].charge = 1
- ions\[0\].polarity = positive
- ions\[1\].multimer = 1
- ions\[1\].add = Na
- ions\[1\].charge = 1
- ions\[1\].polarity = positive
- ions\[2\].multimer = 1
- ions\[2\].add = K
- ions\[2\].charge = 1
- ions\[2\].polarity = positive
- ions\[3\].multimer = 1
- ions\[3\].add = NH4
- ions\[3\].charge = 1
- ions\[3\].polarity = positive
- ions\[4\].multimer = 2
- ions\[4\].add = H
- ions\[4\].charge = 1
- ions\[4\].polarity = positive
- ions\[5\].multimer = 1
- ions\[5\].add = H2
- ions\[5\].charge = 2
- ions\[5\].polarity = positive
- ions\[6\].multimer = 1
- ions\[6\].add = H3
- ions\[6\].charge = 3
- ions\[6\].polarity = positive

**Steps**

1. carbon = 96 Da, from formula; by equation 1.
2. hydrogen = 10.078250 Da, from formula; by equation 1.
3. nitrogen = 56.012296 Da, from formula; by equation 1.
4. oxygen = 31.989829 Da, from formula; by equation 1.
5. M = 194.08038 Da, from carbon, hydrogen, nitrogen, oxygen; by equation 1; gives monoisotopicMass.
6. h-less-electron = 1.0072765 Da, from ions\[0\].add; by equation 2.
7. mz = 195.08765 Th, from M, h-less-electron, ions\[0\].charge; by equation 2; gives ions\[0\].mz.

The working, as the case writes it:

```text
M = 8 x 12 + 10 x 1.007825031898 + 4 x 14.00307400425 + 2 x 15.99491461926 = 194.080375574 Da (AME2020)
[M+H]+ = M + 1.007825031898 - 0.0005485799090441 = 195.087652026 Th, reported 195.087652 Carry the AME2020 values in full
the printed partials are rounded and can differ in the last reported decimal.
```

**Answer**

- monoisotopicMass = 194.08038 Da
- ions\[0\].mz = 195.08765 Th

Where these values came from: our own exact-arithmetic script and a hand-worked case; exact decimal on AME2020 masses (mass\_1.mas20.txt) and CODATA 2022 m\_e, by this script.

At build the tool returned this answer within the tolerance the file states: masses and m/z equal at the reported decimals (absolute 1e-9 Da or Th on the rounded values); bounds, decimals, formulas, parity, statuses and codes exact.

Who worked this case: not recorded.

## Sources

1. Wang M, Huang WJ, Kondev FG, Audi G, Naimi S. The AME 2020 atomic mass evaluation (II). Tables, graphs and references. Chin Phys C 2021;45:030003 Used for: Monoisotopic mass and ion m/z of a formula. At: table mass\_1.mas20.txt, column ATOMIC MASS (micro-u) and its uncertainty, every nuclide. **Read in full, 10 November 2026**
2. Murray KK, Boyd RK, Eberlin MN, Langley GJ, Li L, Naito Y. Definitions of terms relating to mass spectrometry (IUPAC Recommendations 2013). Pure Appl Chem 2013;85:1515-1609 Used for: Monoisotopic mass and ion m/z of a formula. At: p. 1570-1571, section entry 356, m/z: the ion's mass over the unified atomic mass unit, divided by its charge number (regardless of sign); Note 3, the thomson (Th) deprecated. **Read in full, 14 November 2026**
3. Mohr PJ, Newell DB, Taylor BN, Tiesinga E. CODATA recommended values of the fundamental physical constants: 2022 (NIST web table), electron mass in u Used for: Monoisotopic mass and ion m/z of a formula. At: table electron mass in u, value and standard uncertainty. **Read in full, 11 November 2026**
4. Coursey JS, Schwab DJ, Tsai JJ, Dragoset RA. Atomic Weights and Isotopic Compositions (NIST), whose compositions are Berglund M, Wieser ME, Isotopic compositions of the elements 2009, Pure Appl Chem 2011;83:397-410, as NIST states Used for: Monoisotopic mass and ion m/z of a formula. At: table Isotopic Composition column, every element. **Read in full, 10 November 2026**
5. CIAAW (IUPAC Commission on Isotopic Abundances and Atomic Weights), Isotopic Compositions of the Elements Used for: Monoisotopic mass and ion m/z of a formula. At: table Representative isotopic composition, every element. **Read in full, 10 November 2026**

Read by AI-assisted sessions. No person has checked these readings.

## How it is checked

**Level:** Checked against a reference.

**Checked against:** Our own exact-arithmetic script and a hand-worked case; a reference program this project wrote itself, second implementation (Python 3.13), 2026-11-14, exact rationals (Python fractions) on the exact value of each input double, each output rounded once to the nearest double; not an outside program.

**Cases:** No case set is linked to this version.

**Not checked:** One session wrote the first script and the engine; a second implementation in Python by a separate agent of the same model family agrees on 132 cases at 1.0.1, and another on 67 at 1.0.0; no measured spectrum was compared; above about 10 to 20 kDa the monoisotopic peak is usually not observed (Drybench's estimate); the ion's mass is Drybench's construction (IUPAC 2013 entry 356 defines m/z only); a count with a leading zero (C06) is refused as FORMULA\_UNREADABLE, white space inside a formula is ignored, and a label whose mass number is the monoisotope's (one 12C on C6H6) leaves the formula and every mass as without it, each with no case; an empty add or remove string, refused as INVALID\_STRING, has no case. A formula starting with a digit (13CH4) is refused FORMULA\_UNREADABLE since 1.0.2, through formula-mass 1.3.0, with no case in this method's fixtures; the refusal is covered by stored reference values and unit tests only.

No independent scientist has yet reviewed this.

### Changes to its methods

1 change

- [25 November 2026, ion-mz\@1.0.2](https://www.drybench.com/methods/corrections#2026-11-25-ion-mz102-1): In 1.0.2, through formula-mass 1.3.0, a formula starting with a digit is now refused (FORMULA\_UNREADABLE); every other output is unchanged, and every pinned output hash is the same.
