Skip to main content
Peptide Calculator

Molecular Formula Calculator

Sums the free amino acid formula for each residue and removes (n-1) waters for the peptide bonds to output the peptide's molecular formula. Educational reference, not medical or dosing advice.

Molecular & Mass

Calculator inputs

One-letter amino acid codes only (A-Y). Spaces and line breaks are ignored.

This is a mathematical and laboratory reference tool. It does not diagnose, treat or recommend a dose, and it is not medical advice.

The molecular formula calculator returns the elemental composition of a peptide, the plain Hill order string such as C52H83N15O18S, derived from the sequence rather than typed in.

It is the answer to the question a chemist asks first: how many of each atom are in this thing. Elemental composition feeds elemental analysis, combustion analysis checks, isotope labelling designs, and any calculation where you need atom counts rather than a lump mass.

It is derived from the same residue table the molecular weight calculators use, but along a different route. The masses are a weighted sum; the formula is a literal count.

A count and a weighted sum are different arithmetic

The formula and the molecular weight answer two different questions, and this site computes both from the same residue table. The formula asks how many atoms there are, which is integer counting with nothing to approximate. The molecular weight asks what that collection weighs, which is a weighted sum over tabulated values. Neither is derived from the other, so when the two agree they are corroborating each other, and when they disagree a fault has been located rather than one calculation restated in different notation. Neither route passes through the other, and that is the property which makes the pair worth having at all.

That is also why a formula is the right answer to some questions and useless for others. Composition analysis measures carbon, hydrogen, nitrogen and sulfur by combustion and compares the measured percentages against theoretical ones computed from a formula, so a formula is an input to that comparison rather than a side result. An isotope labelling design needs to know how many nitrogen atoms are available to label. A mass cannot supply either of those, and cannot be supplied by them either, because many different formulas share a mass to the precision any balance resolves.

The distinction is easy to lose in practice, because the two answers are usually requested together and either can stand in for the other in a hurry. The mass to moles calculator needs a molar mass, and the molar mass comes from the residue table rather than from the formula, so a reader who has worked out the atom counts still has one step left. Working both routes and comparing is not wasted effort, because the comparison is what catches a mistyped residue in a long sequence. The two answers also constrain each other in a useful direction, since a formula whose implied mass is far from the derived one cannot be rescued by adjusting a digit, while a small discrepancy in a long chain usually can.

Hill order is more than a formatting rule

Hill order puts carbon first, hydrogen second and every remaining element in alphabetical order of symbol, which for a peptide means nitrogen, oxygen and then sulfur. It looks like typography, and it is, but it is typography with a job to do: it is a sorting rule, which makes two formulas comparable by eye. Written in Hill order, two structures can be compared element by element without knowing either name. Written in any other order, the reader has to sort first. The ordering also makes an element that has gone missing easy to spot, because a gap in the expected run of symbols stands out in a way that a miscounted subscript does not.

The five elements printed here are the five the twenty standard residues can contribute, so a peptide formula produced by this page can only ever contain carbon, hydrogen, nitrogen, oxygen and sulfur. A count of zero is omitted rather than printed, and a count of one is written as a bare symbol with no subscript. The useful consequence is that a formula containing no sulfur is a statement about the sequence rather than an omission: it means the chain contains neither cysteine nor methionine. The same logic applies to the other four counts, each of which is fixed by the residues actually present and cannot be varied independently of them.

Reading a formula for what it leaves out is easier once the per residue contributions are known. The amino acid composition calculator counts residues by type, which is a different question from counting atoms, and the peptide length calculator returns the residue count that the water arithmetic depends on. Where a formula and a residue count disagree about the same sequence, the fault is in the sequence rather than in either calculation. Both of those counts come from the same typed string that produced the formula, so a discrepancy is a prompt to re-read it rather than a reason to doubt the arithmetic.

Rebuilding the mass from the formula as a check

The strongest use of a molecular formula is as an independent reconstruction of the mass, because the arithmetic runs the other way round. Take five alanine residues. Five free alanines are C15H35N5O10, and the four bonds between them remove four waters, giving C15H27N5O6. Multiplying those counts by the standard average atomic weights, 180.165 for carbon, 27.214 for hydrogen, 70.034 for nitrogen and 95.996 for oxygen, sums to 373.409. The residue route gives 373.40928, the same figure to the limit of what both routes can carry. Nothing in that reconstruction was taken from the residue table, which is the whole reason for running it.

When the two reconstructions disagree, the formula side tends to be the more informative one, because it names which element is unaccounted for. A formula one oxygen and two hydrogens heavier than the mass implies points at a different bond arrangement or an unreported modification rather than at a typo in a table. The average molecular weight calculator performs the residue route and the monoisotopic mass calculator performs the same route on the other isotope convention, so a disagreement between a formula and a mass narrows the fault to the sequence or to an unmodelled piece of chemistry.

What the formula never contains

Several things real material carries never appear in a formula derived from a sequence. A disulfide bond between two cysteines removes two hydrogen atoms, which is 2.016 Da on the average convention and 2.01565 on the monoisotopic one, and nothing in this calculation removes them. Bound solvent, a trifluoroacetate counter ion and any excipient in a lyophilised vial are absent as well. None of these is an error in the arithmetic; they are facts the sequence does not encode. A string that happens to contain two cysteines does not say whether they are joined, so the same sequence yields two formulas and two masses depending on something the formula itself has no way to express.

Terminal state is the other omission, and it surprises people more often than the counter ion does. A cyclised N terminus and an amidated C terminus both change the atom counts, not only the mass, so a formula computed from a bare sequence stops matching as soon as either end is capped. The modification mass calculator carries the mass shifts for the common in chain modifications and the molar mass cross check calculator is how you find out whether the difference being chased is chemistry or an error, and the summation behind the whole exercise is set out in molecular weight and peptide calculations .

How this calculator works

Each of the twenty standard amino acids has a known free molecular formula. A peptide of n residues starts as n free amino acids, which totals n formulas, and then loses n minus 1 water molecules to form the n minus 1 peptide bonds.

So the calculation is: add every residue formula together, then subtract n minus 1 times the formula of water, which is H2O. Adding the water at the end and subtracting it per residue are the same operation written two ways.

The result is then written in Hill order, which is carbon first, hydrogen second, and every other element in alphabetical order of symbol.

The formulas

  • formula = sum of residue formulas - (n - 1) x H2O

    n
    the number of residues in the chain
    H2O
    one water, removed at each of the n-1 peptide bonds

    For a single free amino acid, n is 1, so no water is removed and the free formula comes straight back.

Worked example

Elemental composition of glycylglycine (GG)

Illustrative example. The numbers are chosen to make the arithmetic easy to check. They are not a dose, a protocol or a recommendation.

Given

Sequence
GG (2 residues)
Glycine free formula
C2H5NO2
Water
H2O
  1. Add both free amino acids
    Substitution
    C2H5NO2 + C2H5NO2
    Result
    C4H10N2O4
  2. Subtract one water for the single peptide bond
    Substitution
    C4H10N2O4 - H2O
    Result
    C4H8N2O3

What this shows

Glycylglycine is C4H8N2O3. Substituting those atom counts into the standard atomic weights gives 132.12 g/mol, which is the same number the average molecular weight calculator returns for the same sequence.

Understanding the inputs

Amino acid sequence
One letter codes for the standard twenty residues, no separators.

Understanding the results

Molecular formula
The elemental composition in Hill order. Element symbols with no subscript mean a count of one, so a terminal nitrogen appears as a bare N.

Units explained

Hill order
Carbon, then hydrogen, then all remaining elements alphabetically by symbol. The standard way a molecular formula is written when carbon is present.
Free amino acid formula
The formula of the monomer, before any water is lost to peptide bond formation.

Common mistakes

  • Forgetting to subtract the waters. A ten residue peptide has nine peptide bonds, so leaving the waters in inflates the hydrogen count by eighteen and the oxygen count by nine.
  • Counting residues from a sequence that includes a terminal modification. Cyclised or amidated termini change the formula as well as the mass.

Important limitations

  • Only the twenty standard residues are supported. D amino acids have the same formula as their L forms, but selenocysteine and pyrrolysine do not appear in the standard table and are rejected.
  • Bound solvent, counter ions and salts are not represented. A peptide trifluoroacetate salt has a different formula from the free base.

Frequently asked questions

What does the molecular formula calculator compute?

It derives the elemental composition (C, H, N, O, S counts) of a peptide from its sequence and displays it as a condensed formula string, for example C11H21N3O4.

How is the peptide molecular formula derived?

The calculator sums the elemental formula of each amino acid in its free (unbound) form using Lehninger reference values, then subtracts the H2 and O lost from each of the n-1 peptide bonds formed when the residues are joined into a chain.

How do I use the molecular formula calculator?

Enter a sequence in one letter amino acid codes. The calculator returns the formula string alongside the residue count.

What elements does the molecular formula calculator cover?

Carbon, hydrogen, nitrogen, oxygen and sulfur, the five elements present in the 20 standard amino acids. It does not add elements from non-standard residues, metals, or attached modifications.

Why does a single residue formula subtract nothing on this calculator?

With one residue there are zero peptide bonds (n-1 = 0), so the formula is exactly the free amino acid’s own formula with nothing subtracted.

What if my sequence contains lowercase letters or numbers on the molecular formula calculator?

The parser accepts only the 20 standard uppercase one letter codes; anything else is reported as an invalid character rather than guessed at.

Can I use the molecular formula calculator for a modified peptide?

No, it reflects the unmodified backbone only. A modification such as acetylation or amidation changes the elemental formula, which this calculator does not track; use it as the base formula before manually accounting for known modifications.

Is the molecular formula calculator free to use?

Yes, entirely client side with no data leaving your browser.

Learn more