IUPAC Nucleotide Ambiguity Codes Explained (Full Table)
5 min read ยท Updated June 10, 2026
Sooner or later you hit a sequence full of letters that aren't A, C, G or T โ an R here, a Y there, a run of Ns. These are IUPAC ambiguity codes, a standard shorthand for 'one of several possible bases' at a position. This guide is a quick reference to what each one means and where they come from.
Why ambiguity codes exist
A single letter sometimes has to stand for more than one base. It might be a position that varies across a population (a SNP), an uncertain base call from sequencing, or a deliberately degenerate position in a primer or a binding-site consensus. Rather than guess, the IUPAC codes record exactly which bases are possible at that spot.
The two-base codes
- R = A or G (puRine)
- Y = C or T (pYrimidine)
- S = G or C (Strong, three H-bonds)
- W = A or T (Weak, two H-bonds)
- K = G or T (Keto)
- M = A or C (aMino)
The three- and four-base codes
- B = C, G or T (not A)
- D = A, G or T (not C)
- H = A, C or T (not G)
- V = A, C or G (not T)
- N = A, C, G or T (aNy base)
Complements of ambiguity codes
When you take a reverse complement, each ambiguity code maps to another code, not just AโT and GโC. R (A/G) complements to Y (T/C), W and S are self-complementary, K complements to M, and the three-base codes pair up BโV and DโH, while N stays N. A reverse-complement tool has to handle the whole alphabet to be correct.
- R โ Y, K โ M, B โ V, D โ H
- S โ S, W โ W, N โ N (self-complementary)
Where you'll meet them
- Degenerate PCR primers designed to amplify a family of related sequences.
- Restriction enzyme recognition sites with variable positions (e.g. HinfI, G^ANTC).
- Consensus/binding-site motifs written as a single degenerate string.
- Sequencing reads, where N marks a base the basecaller couldn't determine.
Frequently asked questions
- What does N mean in a DNA sequence?
- N is the IUPAC code for any base โ A, C, G or T. It often marks a position where the base is unknown (an ambiguous sequencing call) or deliberately variable (as in a degenerate primer).
- What is the complement of R in a reverse complement?
- R (A or G) complements to Y (T or C). Ambiguity codes have their own complements: KโM, BโV, DโH, while S, W and N are self-complementary.