Codon Translation Calculator — DNA or RNA to Protein
Translate DNA or RNA to a peptide using NCBI genetic code tables 1, 2, 5 and 11, in any of the three forward reading frames. Handles IUPAC ambiguity codes.
Codon Translation Calculator
Background.
This codon translation calculator turns a DNA or RNA sequence into a peptide, one triplet at a time, using the genetic code table you choose from NCBI's published set. It handles the three forward reading frames, accepts FASTA and IUPAC ambiguity codes, and reports how many codons it read, how many stops it hit and where the first one is — reading straight through internal stops rather than truncating, so you can see the whole frame.
Two choices drive the answer, and both are on the page rather than hidden in defaults. The first is the reading frame. Crick, Barnett, Brenner and Watts-Tobin established in 1961 that the code is read as non-overlapping triplets from a fixed starting point, which is exactly why a one-base shift is catastrophic rather than minor. In the example loaded into the widget, frame 1 gives MAIVMGR*KGAR* and frame 2 gives WPL*WAAERVPD — twelve positions, not one of them shared.
The second choice is the table, and it matters more than most people expect. The standard code is NCBI table 1. Table 2, the vertebrate mitochondrial code, differs at four codons: AGA and AGG become stops instead of arginine, AUA becomes methionine instead of isoleucine, and UGA becomes tryptophan instead of a stop. Run the loaded example under table 2 and the internal stop at codon 8 becomes a tryptophan, turning a truncated seven-residue product into a full twelve-residue one from the identical sequence. Table 5, the invertebrate mitochondrial code, makes AGA and AGG serine instead of stops. Table 11, the bacterial, archaeal and plant plastid code, has amino acid assignments identical to table 1 and differs only in which codons are permitted to initiate — so if you select it and the peptide does not change, that is correct behaviour, not a bug.
Ambiguity codes are resolved where they can be. A codon containing an N or an R is expanded into every concrete codon it could represent; if all of them encode the same amino acid the answer is that amino acid, so CTN gives leucine and GGN gives glycine. Only when the possibilities span more than one amino acid does the position become X. That resolution is table-dependent too: MGR is unambiguously arginine under table 1, but under table 2 it spans arginine and stop, so it becomes X.
Be clear about what this is. Once you have named a table, the mapping from codon to amino acid is deterministic and exact — it is a lookup, not an estimate. Choosing the table, however, is a biological claim about the organism and the organelle, and NCBI's own notes record exceptions beyond the four tables offered here: Osawa and colleagues catalogue CUN as threonine in some yeasts and AAA as asparagine in platyhelminths and echinoderms, among others. Beyond that, this page does not find genes, does not locate the true initiation codon, does not splice introns, and does not model selenocysteine or pyrrolysine recoding, ribosomal frameshifting, stop-codon readthrough or RNA editing. It tells you what the table says. It does not tell you what a cell makes.
What is codon translation calculator?
The genetic code is the mapping from nucleotide triplets to amino acids used during translation. There are 64 possible triplets and 20 standard amino acids plus a stop signal, so the code is degenerate: most amino acids are specified by more than one codon. Leucine, serine and arginine have six codons each; methionine and tryptophan have one each. The first assignment was made by Nirenberg and Matthaei in 1961, who showed that poly(U) directs the synthesis of polyphenylalanine and therefore that UUU codes for phenylalanine.
The code is read in non-overlapping triplets from a fixed starting point — the finding of Crick, Barnett, Brenner and Watts-Tobin's 1961 frameshift experiments. That is why there are three forward reading frames for any sequence, and three more on the complementary strand, and why inserting or deleting a single base destroys everything downstream of it while inserting three leaves the rest of the frame intact.
The code is very nearly universal but not entirely. NCBI maintains a numbered set of translation tables covering the documented variants, and this page implements four of them: the standard table 1, the vertebrate mitochondrial table 2, the invertebrate mitochondrial table 5, and the bacterial, archaeal and plant plastid table 11. Each table is defined by two 64-character strings — one giving the amino acid for each codon in a fixed TCAG ordering, one marking which codons may serve as initiation codons — and both are reproduced here verbatim from NCBI's set as revised on 23 September 2024. Naming the table alongside a translated sequence is not pedantry: a mitochondrial gene translated with the standard table will appear to be riddled with premature stops that do not exist.
How to use this calculator.
- Paste your sequence. DNA or RNA both work, plain text or FASTA, upper or lower case; headers, whitespace, numbering and gap characters are stripped for you.
- Choose a reading frame. Frame 1 is right if your sequence starts at the A of a start codon — which it does if you copied a CDS feature from a database record.
- Choose the genetic code table. Leave it on 1 for nuclear genes of essentially any organism. Switch to 2 for vertebrate mitochondrial genes, 5 for invertebrate mitochondrial genes, 11 for bacteria, archaea and plastids.
- Read the peptide. An asterisk marks a stop codon and the calculator keeps going past it, so a mid-sequence asterisk in frame 1 usually means you are in the wrong frame, on the wrong strand, or using the wrong table.
- Check the trailing-bases count. In frame 1 it should be zero for a complete coding sequence; 1 or 2 means your sequence is not a whole number of codons.
- Check the interpretation line. It tells you whether the first codon is a documented initiation codon for the table you picked, which is a quick sanity check on the frame.
- If you need a reverse frame, reverse-complement the sequence first using the DNA to mRNA converter linked below, then translate the result in frames 1 to 3.
- If you see an X, the codon contained ambiguity codes spanning more than one amino acid. That is an honest 'undetermined', not an error — resolve the ambiguity in your sequence if you need a definite residue.
The formula.
A genetic code table is stored as two 64-character strings and the codon is turned into an index. NCBI orders the 64 codons by treating T, C, A, G as digits 0 to 3: the index is 16 times the first base plus 4 times the second plus the third. So TTT is index 0, ATG is index 35, AGA is index 46 and GGG is index 63. The amino acid is simply the character at that index in the table's AAs string; the character at the same index in the Starts string is M if that codon may initiate translation, an asterisk if it is a stop, and a hyphen otherwise.
The four tables implemented here are transcribed verbatim from NCBI's set, revision 23 September 2024. Table 1 (standard) is FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG. Table 2 (vertebrate mitochondrial) differs at exactly four positions: index 14 (TGA) becomes W instead of *, index 34 (ATA) becomes M instead of I, and indices 46 and 47 (AGA and AGG) become * instead of R. Table 5 differs at the same four positions but makes AGA and AGG serine rather than stops. Table 11 is character-for-character identical to table 1 in its amino acid assignments; only its Starts string differs.
Reading frames follow directly from the triplet rule. For frame f the calculator discards the first f−1 bases, then reads complete triplets: the number of codons is the floor of the remaining length divided by three, and whatever is left over, 0 or 1 or 2 bases, is reported separately rather than padded or silently dropped. A structural identity holds for every input: three times the codon count, plus the trailing bases, plus f−1, equals the sequence length exactly.
Ambiguity codes are expanded rather than guessed. A codon such as CTN represents four concrete codons — CTT, CTC, CTA, CTG — and because all four encode leucine, the answer is leucine. GGN is glycine for the same reason, MGR is arginine under table 1 because AGA, AGG, CGA and CGG are all arginine, and TAR is a stop because TAA and TAG both are. When the expansion spans more than one amino acid the position is reported as X, the IUPAC symbol for an undetermined residue. Note that this resolution depends on the table: MGR is arginine under table 1 but spans arginine and stop under table 2, so it becomes X there.
Rounding: there is none, anywhere in this calculator. Every numeric output is an exact integer count — codons read, stop codons, first-stop position, trailing bases — and every sequence output is a string. No floating-point arithmetic is performed at any stage, so there is no rounding stage to declare and no precision to lose.
Invalid input is refused rather than repaired. An empty box raises a field error. A character outside the NC-IUB nucleotide alphabet raises an error naming it, rather than being silently dropped — dropping one base would shift every codon after it and produce a plausible-looking wrong peptide. A frame that leaves fewer than three usable bases raises an error, because there is no codon to translate. Sequences longer than 50,000 nucleotides are refused.
A worked example.
Take the 39-nucleotide coding sequence ATGGCCATTGTAATGGGCCGCTGAAAGGGTGCCCGATAG and translate it in frame 1. Under the standard table it splits into thirteen codons — ATG GCC ATT GTA ATG GGC CGC TGA AAG GGT GCC CGA TAG — giving MAIVMGR*KGAR*: methionine, alanine, isoleucine, valine, methionine, glycine, arginine, then a stop at codon 8, then lysine, glycine, alanine, arginine and a final stop at codon 13. Two stop codons, the first at position 8, no trailing bases. A stop in the middle of what looks like a clean open reading frame is a red flag, and it is the reason to check the table. Now switch the table to 2, the vertebrate mitochondrial code, changing nothing else. Codon 8 is TGA, which table 1 calls a stop and table 2 calls tryptophan, so the peptide becomes MAIVMGRWKGAR* — one stop instead of two, the first now at position 13, and a full twelve-residue product where the standard table saw a seven-residue fragment. Nothing about the DNA changed; the only difference is the biological claim about where the gene lives. Table 5 gives the same answer here because it also reads UGA as tryptophan, while table 11 gives MAIVMGR*KGAR*, identical to table 1, because table 11 differs from the standard code only in which codons may initiate. As a final check on the frame, the interpretation line confirms that the opening ATG is a documented initiation codon; shift to frame 2 and the peptide becomes WPL*WAAERVPD, which shares no residue at any position with the frame-1 answer and leaves two trailing bases — exactly what a wrong frame looks like.
Frequently asked questions.
Why does my mitochondrial gene appear full of premature stop codons?
I selected table 11 and the peptide did not change. Is that a bug?
How do I translate the reverse strand?
What does an X in the peptide mean?
Why does the calculator keep translating past a stop codon?
Does this tell me what protein an organism actually makes?
References& sources.
- [1]NCBI, 'The Genetic Codes', compiled by Elzanowski, A. & Ostell, J., National Center for Biotechnology Information Taxonomy resource. Table set last updated 23 September 2024. Source of the four translation tables implemented here, transcribed verbatim — table 1 (Standard), table 2 (Vertebrate Mitochondrial), table 5 (Invertebrate Mitochondrial) and table 11 (Bacterial, Archaeal and Plant Plastid), each as a 64-character amino-acid string plus a 64-character initiation-codon string in TCAG index order. Also the source of the listed differences from table 1, of the note that GenBank defaults to transl_table=1 without displaying it, and of the note that UGA codes at low efficiency for Trp in Bacillus subtilis. Retrieved 2026-07-29.
- [2]Osawa, S., Jukes, T. H., Watanabe, K. & Muto, A. (1992). 'Recent evidence for evolution of the genetic code.' Microbiological Reviews 56(1): 229–264. Independent second authority consulted as a cross-check on the mitochondrial tables: states the vertebrate mitochondrial deviations — AUA (Ile) to Met, UGA (stop) to Trp, AGA and AGG (Arg) to stop — codon for codon, in agreement with NCBI table 2, and records that UGA codes for tryptophan in essentially all non-plant mitochondria. Also the source for the on-page statement that further organism-specific exceptions exist beyond the four tables offered, including CUN as Thr in some yeasts and AAA as Asn in platyhelminths and echinoderms. Open access via PubMed Central. Retrieved and read 2026-07-29.
- [3]Nirenberg, M. W. & Matthaei, J. H. (1961). 'The dependence of cell-free protein synthesis in E. coli upon naturally occurring or synthetic polyribonucleotides.' Proceedings of the National Academy of Sciences USA 47(10): 1588–1602. The experiment that made the first codon assignment — poly(U) directs the synthesis of polyphenylalanine, so UUU codes for phenylalanine. Used as an independent test fixture: this calculator must translate a poly-T sequence to a poly-phenylalanine peptide under every table implemented. Listed bibliographically.
- [4]Crick, F. H. C., Barnett, L., Brenner, S. & Watts-Tobin, R. J. (1961). 'General nature of the genetic code for proteins.' Nature 192: 1227–1232. doi:10.1038/1921227a0. The frameshift experiments establishing that the code is read as non-overlapping triplets from a fixed starting point — the reason a reading-frame selector is necessary and the reason a single-base shift produces an unrelated peptide rather than a similar one. Listed bibliographically.
- [5]NC-IUB — Nomenclature Committee of the International Union of Biochemistry (1985). 'Nomenclature for incompletely specified bases in nucleic acid sequences: recommendations 1984.' European Journal of Biochemistry 150: 1–5, and simultaneously in Nucleic Acids Research 13: 3021–3030, Biochemical Journal 229: 281–286, and three further journals in 1986. The ambiguity alphabet this calculator expands when a codon contains R, Y, S, W, K, M, B, D, H, V or N. Read on the official IUBMB nomenclature site. Retrieved 2026-07-29.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 682 calculators remain free
- No billing is enabled