Skip to content

Mass and m/z of a modified peptide

ms_peptide_mass

Works out the formula, monoisotopic mass and m/z of a peptide with stated termini and modifications.

Runs
On the server
Level
Checked against a reference: pyteomics 5.0.2 (an older NIST table, within a computed tolerance; a check of composition and arithmetic); a second implementation in Python by a separate agent of the same model family (peptide-mass-3.json)
Ask your assistant

What it is

Returns a peptide's formula, monoisotopic mass and [M+zH] or [M-zH] m/z, with stated termini and formula modifications. Use when a peptide's precursor m/z is to be predicted at one or more charges, and its ion formula passed on. Not for a protein mass to weigh out: use `seq_protein_properties`; for other adducts, use `ms_ion_mz` on its formula; for fragments, use `ms_peptide_fragments`; for a formula, use `calc_formula_mass`. Refuses B, Z and X and charged groups; termini, polarity and charge 1 to 100 are required.

Field: Analytical chemistry.

What it does

You give

  • sequence (required): The peptide in one-letter codes, N to C (U selenocysteine, O pyrrolysine, J leucine or isoleucine). Leading and trailing white space is removed before the pattern is checked.
  • modifications (required): Modifications; an empty list for none.
  • nTerm (required): The N-terminal group as a formula: "H" for a free amine, "C2H3O" for acetyl. Leading and trailing white space is removed before the pattern is checked.
  • cTerm (required): The C-terminal group as a formula: "OH" for a free acid, "NH2" for an amide. Leading and trailing white space is removed before the pattern is checked.
  • 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, on stated termini and stated signed-formula modifications (no default termini, alkylation or named modification); ions [M±zH] only, by protons (m(¹H) − mₑ), other adducts through ms_ion_mz; a modification may not take its own residue below zero atoms; B and Z are refused as ambiguous and X as unknown; constants and bound as ms_ion_mz.
  • 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

  • B (D or N) or Z (E or Q): the two readings differ in mass.
  • X or any other letter with no residue formula.
  • a modification at a position outside the sequence.
  • a modification with neither add nor remove.
Every input, with its units5 inputs
  • sequence (required): The peptide in one-letter codes, N to C (U selenocysteine, O pyrrolysine, J leucine or isoleucine). Leading and trailing white space is removed before the pattern is checked.
  • modifications (required): Modifications; an empty list for none.
  • nTerm (required): The N-terminal group as a formula: "H" for a free amine, "C2H3O" for acetyl. Leading and trailing white space is removed before the pattern is checked.
  • cTerm (required): The C-terminal group as a formula: "OH" for a free acid, "NH2" for an amide. Leading and trailing white space is removed before the pattern is checked.
  • ions (required): The ions to compute, at least one.
Every refusal, with its code10 refusals
CodeWhen
AMBIGUOUS_RESIDUEB (D or N) or Z (E or Q): the two readings differ in mass.
RESIDUE_NOT_IN_TABLEX or any other letter with no residue formula.
MODIFICATION_OUTSIDE_SEQUENCEa modification at a position outside the sequence.
EMPTY_MODIFICATIONa modification with neither add nor remove.
NEGATIVE_ATOM_COUNTa modification takes its own residue below zero atoms of an element.
CHARGED_FORMULAa terminus or a modification has a charge written in it.
FORMULA_UNREADABLEa terminus or a modification is not a formula.
ELEMENT_NOT_IN_TABLEa terminus or a modification names an element with no representative composition.
MONOISOTOPE_NOT_FIXEDa terminus or a modification names an element whose most abundant isotope is not fixed (lead).
REMOVES_ABSENT_ATOMSan [M-zH] ion removes more hydrogens than the peptide has.

The calculation

The method's equations, constants and worked example.

Mass and m/z of a modified peptidepeptide-mass@1.0.2

Equation 1

[P] = [N] + [M] + [C], [M] the residue formulas and their modifications (add − remove), [N] and [C] the terminal groups

M = monoisotopic mass of [P] as in ion-mz. The cited page uses [M] for the residue sum and implies the precursor [N] + [M] + [C] without printing it: Drybench's construction from its fragment formulae. Modifications at one position are summed before the negative-count check

SymbolMeaning
[P]the peptide's formula, as element counts
[M]the residue formulas and their modifications, as element counts
[N]the N-terminal group, as element counts
[C]the C-terminal group, as element counts
Mmonoisotopic mass, Da

Source 1.

Equation 2

m/z = (M + q x (m(1H) - m(e))) / z, q = +z for [M+zH]z+ and -z for [M-zH]z-. A proton is taken as m(1H) − m(e), the hydrogen atom less one electron: Drybench's construction

the cited page says only that protons are added. It is 1.46e-8 u below the CODATA 2022 proton mass, and at a rounding boundary the difference can move the sixth decimal by one (ion-mz-1#c3h8os-protonated: 93.036862 here, 93.036863 with the proton mass).

SymbolMeaning
zcharge number
qsigned charge
Mmonoisotopic mass of the peptide, Da
m(1H)AME2020 mass of 1H, Da
m(e)electron mass, Da
m/zm/z, the dimensionless quotient of IUPAC 2013 entry 356 (the name 'mass-to-charge ratio' is deprecated there), Th

Source 1.

Equation 3

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

SymbolMeaning
electronsthe ion's electron count
Zatomic number of each atom
qsigned charge

Equation 4

bound(m/z) = (bound(M) + z x (u(1H) + u(m(e)))) / z, bound(M) summed linearly over the peptide's atoms as peptide-composition gives it

rounded up to two significant figures (toward larger magnitude at the second significant figure)

SymbolMeaning
bound(M)the peptide's mass bound, Da
u(1H)AME2020 uncertainty of 1H, Da
u(m(e))standard uncertainty of the electron mass, Da
zcharge number

Source 2.

ConstantValueFrom
AME2020 atomic masses and uncertainties, stored as integers in units of 1e-12 u: the file's micro-u value times one million; divide the stored integer by 10^12 for u m(nuclide)a table of values, part of the methodSource 2
electron mass m(e)0.0005485799090441 DaSource 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) monoisotopea table of values, part of the methodSource 4

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 peptide-mass@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

  • sequence = GGG
  • nTerm = H
  • cTerm = OH
  • ions[0].charge = 1
  • ions[0].polarity = positive
  • ions[1].charge = 2
  • ions[1].polarity = positive

Steps

  1. carbon = 72 Da, from sequence; by a rule this method's record does not list as an equation.
  2. hydrogen = 11.086075 Da, from sequence, nTerm, cTerm; by a rule this method's record does not list as an equation.
  3. nitrogen = 42.009222 Da, from sequence; by a rule this method's record does not list as an equation.
  4. oxygen = 63.979658 Da, from sequence, cTerm; by a rule this method's record does not list as an equation.
  5. M = 189.07496 Da, from carbon, hydrogen, nitrogen, oxygen; by a rule this method's record does not list as an equation; gives monoisotopicMass.
  6. h-less-electron = 1.0072765 Da, from ions[0].polarity; by equation 2.
  7. mz1 = 190.08223 Th, from M, h-less-electron, ions[0].charge; by equation 2; gives ions[0].mz.
  8. mz2 = 95.544754 Th, from M, h-less-electron, ions[1].charge; by equation 2; gives ions[1].mz.

The working, as the case writes it:

G residue = glycine C2H5NO2 - H2O = C2H3NO

x 3 = C6H9N3O3

+ H + OH = C6H11N3O4 (Hill C6H11N3O4). [M] = 6 x 12 (12C, AME2020 by definition) + 11 x 1.007825031898 (1H) + 3 x 14.00307400425 (14N) + 4 x 15.99491461926 (16O) = 189.074956 Da, bound 2.2e-09 Da. m(1H) - m(e) = 1.007825031898 - 0.0005485799090441 (CODATA 2022) = 1.0072764519889559 Da. [M+H]+ = [M] + (m(1H) - m(e)) = 190.082232 Th

[M+2H]2+ = ([M] + 2(m(1H) - m(e)))/2 = 95.544754 Th

each to 6 decimals, half away from zero, the bound rounded up to two significant figures. Carry the AME2020 values in full

the printed partials are rounded and can differ in the last reported decimal.

Answer

monoisotopicMass = 189.07496 Da

ions[0].mz = 190.08223 Th

ions[1].mz = 95.544754 Th

Where these values came from: our own exact-arithmetic script and a hand-worked case; exact decimal on AME2020 masses 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, counts, formulas, statuses and codes exact.

Sources

  1. Matrix Science, Mascot help: Peptide fragmentation (formulae for fragment ion m/z, after Roepstorff and Fohlman 1984, doi:10.1002/bms.1200111109, and Johnson et al. 1987, doi:10.1021/ac00148a019)

    Used for: Mass and m/z of a modified peptide. At: section Formulae to Calculate Fragment Ion m/z values.

    Read in full, 11 November 2026
  2. 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: Mass and m/z of a modified peptide. At: table mass_1.mas20.txt, column ATOMIC MASS (micro-u) and its uncertainty, every nuclide.

    Read in full, 10 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: Mass and m/z of a modified peptide. 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: Mass and m/z of a modified peptide. At: table Isotopic Composition column, every element.

    Read in full, 10 November 2026

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 50 cases; no measured spectrum was compared; average mass is not given (seq_protein_properties gives a protein's); named modifications are not offered (the caller states formulas). A formula starting with a digit (13H as a terminus) 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.

Changes to its methods1 change
  • 25 November 2026, peptide-mass@1.0.2: 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.