Transcription & Translation (Codon) Calculator
Convert a DNA sequence into mRNA and then into a protein, translate an mRNA sequence directly in any reading frame, or work backward from a protein to every codon that could have encoded it — with a base-by-base strand view, a color-coded codon breakdown, and the full genetic code table on hand.
Background
Genetic information flows from DNA to mRNA (transcription) to protein (translation). Every step depends on reading the sequence in the right direction and the right three-letter groups — get the strand, the direction, or the reading frame wrong, and the whole translation comes out different.
How to use this calculator
- Choose DNA → mRNA → Protein for the full pipeline: pick whether you've entered the template or coding strand, and translation starts at the first AUG automatically.
- Choose mRNA → Protein when you already have the mRNA and just need to translate a specific reading frame.
- Choose Protein → Codons to see every codon that could have coded for a given amino acid sequence.
- Always type sequences 5′ to 3′ (left to right) — the standard convention this calculator assumes throughout.
How transcription & translation work
RNA polymerase reads the DNA template strand 3′→5′ and builds mRNA 5′→3′, antiparallel and complementary to it — so mRNA is the reverse complement of the template (with U instead of T).
The coding (sense) strand already has the same sequence and direction as the mRNA — converting it just means swapping every T for a U, no reversing needed.
Translation starts at an AUG codon (which codes for Methionine) and reads every following triplet in that same frame until it hits a stop codon (UAA, UAG, or UGA), which doesn't code for any amino acid.
The same stretch of mRNA read starting one or two bases later — a different reading frame — produces a completely different, unrelated set of codons.
The genetic code is degenerate: most amino acids are coded for by more than one codon, so going backward from protein to mRNA never gives just one possible sequence.
Formula & Equations Used
Template → mRNA: mRNA (5'→3') = reverse complement of the template strand, with U replacing T
Coding strand → mRNA: mRNA (5'→3') = coding strand (5'→3'), with U replacing T
Codons per amino acid: read the mRNA in non-overlapping groups of 3 nucleotides, starting at the start codon (or chosen reading frame)
Number of possible mRNAs for a protein: the product of the number of synonymous codons available for every amino acid in the sequence
Example Problems & Step-by-Step Solutions
Example 1 — Template strand to protein
Template (5′→3′): CTA TTT GGC CAT.
Step 1: Reverse-complement with U instead of T: mRNA = AUG GCC AAA UAG.
Step 2: AUG is right at the start (Met), then GCC (Ala), then AAA (Lys), then UAG — a stop codon.
Result: Met-Ala-Lys, then translation halts at the stop codon.
Example 2 — Reading frame changes everything
mRNA: AUG GCC AAA UAG, read starting one base later instead: A UGG CCA AAU AG.
Step: Frame 1 gives Met-Ala-Lys-STOP. Frame 2 regroups into entirely different codons (UGG, CCA, AAU...) coding for completely different amino acids.
Result: the reading frame is not optional information — it changes the protein entirely.
Example 3 — A premature stop codon
mRNA: AUG GCC UAA AAA UAG.
Step: Translation reads AUG (Met), GCC (Ala), then hits UAA — a stop codon — and halts immediately.
Result: Met-Ala only. Everything after the premature stop is never translated, even though more sequence follows.
Example 4 — Reverse translation
Protein: Met-Ala-Val-Lys.
Step: Met → AUG only. Ala → 4 codons. Val → 4 codons. Lys → 2 codons.
Result: 1 × 4 × 4 × 2 = 32 different mRNA sequences could all encode this exact same 4-amino-acid protein.
The Genetic Code (mRNA codons)
| 1st \ 3rd | U | C | A | G |
|---|---|---|---|---|
| U | UUU Phe UUC Phe | UCU Ser UCC Ser | UAU Tyr UAC Tyr | UGU Cys UGC Cys |
| UUA Leu UUG Leu | UCA Ser UCG Ser | UAA Stop UAG Stop | UGA Stop UGG Trp | |
| C | CUU/CUC/CUA/CUG Leu CCU/CCC/CCA/CCG Pro CAU/CAC His, CAA/CAG Gln CGU/CGC/CGA/CGG Arg | |||
| A | AUU/AUC/AUA Ile, AUG Met (Start) ACU/ACC/ACA/ACG Thr AAU/AAC Asn, AAA/AAG Lys AGU/AGC Ser, AGA/AGG Arg | |||
| G | GUU/GUC/GUA/GUG Val GCU/GCC/GCA/GCG Ala GAU/GAC Asp, GAA/GAG Glu GGU/GGC/GGA/GGG Gly | |||
Frequently Asked Questions
Why do I need to know if I have the template or coding strand?
The coding strand already reads the same as the mRNA (just with U instead of T), but the template strand is the mirror-image, reverse complement of that. Treating a template strand as if it were the coding strand is one of the most common mistakes in this topic — it produces a completely wrong mRNA.
Why does translation start at AUG specifically?
AUG is the only codon for Methionine, and by convention it's also the universal start signal. Every protein (before any later processing) begins translation at an AUG, read in whichever frame that AUG happens to fall in.
What happens to the mRNA after a stop codon?
Nothing gets translated from it — the ribosome releases the finished protein chain right at the stop codon, regardless of how much mRNA sequence follows. That's exactly why a premature stop codon (a type of nonsense mutation) truncates a protein.
Are stop codons the same as "no amino acid"?
Yes — a stop codon doesn't code for an amino acid at all. It's read by release factors, not a tRNA, which is what signals the ribosome to end translation and release the finished polypeptide.
Why are there 64 codons but only 20 amino acids?
The genetic code is degenerate — most amino acids are specified by more than one codon (up to 6, for leucine, serine, and arginine). Only methionine and tryptophan have just a single codon each. The 3 remaining codons are stop signals.
Can this calculator translate real, long genes?
It's built for classroom-length problems (up to about 30 codons, or 25 amino acids in reverse mode) so the visuals stay clear and readable. Very long sequences are better suited to dedicated bioinformatics software.