Codon Count Calculator

The genetic code is read in triplets: every three nucleotide bases form one codon, which specifies an amino acid or a start or stop signal. This calculator works out how many complete codons are in a sequence of a given base length, how many leftover bases remain if the length is not a multiple of three, and the maximum number of amino acids the codons could encode. Enter the number of bases to see the codon breakdown.

0.00
0.00
0.00

Codon count formula

complete codons = floor(bases / 3)
leftover bases = bases mod 3
max amino acids = complete codons - 1 (final codon assumed stop)

Each codon is three bases, so the codon count is the base count divided by three, dropping any remainder. The leftover is the modulo. Subtracting one accounts for a terminating stop codon, which does not add an amino acid.

Worked example

For a 300-base sequence: complete codons = floor(300 / 3) = 100, leftover bases = 300 mod 3 = 0. Assuming the final codon is a stop codon, the maximum number of amino acids is 100 - 1 = 99.

Codon count: frequently asked questions

What is a codon?

A codon is a sequence of three consecutive nucleotides in messenger RNA or DNA that specifies a single amino acid during protein synthesis, or signals the start or stop of translation. Because each codon is three bases long, the genetic code is described as a triplet code. With four possible bases at each of three positions, there are 4 cubed = 64 possible codons.

How do you count codons from a sequence length?

Divide the number of nucleotide bases by three, taking the whole-number (integer) part. A 300-base sequence contains 300 / 3 = 100 codons. Any remainder (one or two leftover bases that do not complete a triplet) does not form a codon. This calculator reports both the codon count and the number of leftover bases.

How many amino acids does a coding sequence produce?

A continuous coding sequence translates into one amino acid per codon, but the stop codon does not add an amino acid. So a sequence of complete codons that ends in a stop codon produces one fewer amino acid than the codon count. This calculator reports the codon count; whether the final codon is a stop codon depends on the specific sequence.

Why are leftover bases important?

If a sequence length is not a multiple of three, the leftover one or two bases indicate the reading frame does not divide evenly into codons. In real biology, an insertion or deletion that is not a multiple of three causes a frameshift mutation, changing every downstream codon. Checking for leftover bases is a quick way to confirm a sequence is in frame.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 19 June 2026. See our methodology.