Four letters, two per gene, like AaBb or AAbb. Case sets dominance, so A is dominant and a is recessive.
The square
Why 9:3:3:1 falls out
The ratio is not something to memorise on its own. It is just two independent 3:1 ratios multiplied together.
Cross Aa x Aa and three quarters of the offspring show the dominant trait. Do the same for Bb x Bb. If the two genes assort independently, the chance of showing both dominants is 3/4 x 3/4 = 9/16. Showing the first but not the second is 3/4 x 1/4 = 3/16, the reverse is another 3/16, and showing neither is 1/4 x 1/4 = 1/16.
That is also why the square has 16 boxes but only 9 distinct genotypes. Several gamete pairings land on the same genotype, and AaBb turns up four separate times.
The assumption doing the work is independent assortment. It holds when the two genes sit on different chromosomes, or far enough apart on the same one. Genes close together are linked, travel together into gametes, and give far more parental combinations than 9:3:3:1 predicts. That deviation is not an error, it is how chromosome maps were built.
Finding the gametes
Take one allele from each gene, in every combination. AaBb gives AB, Ab, aB and ab. AABb gives only AB and Ab, because the first gene has nothing to vary.
Quick check: a genotype heterozygous at n genes makes 2n distinct gametes. Two heterozygous genes give four, which is why the square is 4 x 4.
Common questions
Why is a dihybrid cross 9:3:3:1?
Because two independent 3:1 ratios multiply. Three quarters show the first dominant trait and three quarters the second, so 3/4 x 3/4 = 9/16 show both, 3/4 x 1/4 = 3/16 show each single one, and 1/4 x 1/4 = 1/16 show neither.
How do I find the gametes for AaBb?
Take one allele from each gene in every combination: AB, Ab, aB and ab. A useful check is that a genotype heterozygous at n genes produces 2 to the power n distinct gametes, so two heterozygous genes give four.
How many boxes does a dihybrid Punnett square have?
Sixteen, because each parent makes four gamete types. Those 16 boxes contain only 9 distinct genotypes, since several combinations produce the same one. AaBb alone appears four times.
What does independent assortment actually assume?
That the two genes end up in gametes independently of each other, which is true when they sit on different chromosomes or far apart on the same one. Genes close together on the same chromosome are linked, and their ratios deviate from 9:3:3:1. That deviation is how linkage was discovered.
What is a dihybrid test cross?
Crossing the unknown with a fully recessive aabb individual. If the unknown is AaBb you get a 1:1:1:1 ratio, which reveals the gamete proportions directly, because the recessive parent contributes nothing that can mask anything.
Can I use a dihybrid square for linked genes?
Not reliably. The 16-box square assumes independent assortment. Linked genes produce far more parental combinations than recombinant ones, and the deviation is used to estimate map distance rather than being an error to correct.
Related tools
Punnett square calculator, for monohybrid crosses and other letter schemes.
Blood type Punnett square, for ABO codominance and Rh.
Hardy-Weinberg calculator, for allele frequencies across a population.
Sources
Mendel's law of independent assortment and the 9:3:3:1 dihybrid ratio follow the standard treatment in Griffiths et al., Introduction to Genetic Analysis. The square assumes complete dominance at both loci and independent assortment. Incomplete dominance, codominance, epistasis and linkage all change the phenotype ratio while leaving the genotype ratio intact.
Looking for eye colour? Eye color Punnett square runs the classic square and then explains why it does not reliably predict a real child, since eye colour is polygenic.