Dihybrid Cross Calculator

Sixteen boxes give 9:3:3:1 — but only if the two genes assort independently.

Clear
Phenotype ratio9 : 3 : 3 : 1A B A bb aa B aa bb
Genotype ratio4 : 2 : 2 : 2 : 2 : 1 : 1 : 1 : 1
Boxes in the square164 gametes by 4
Genes involved2
Genotype AaBb4 in 1625% — A B
Genotype AABb2 in 1612.5% — A B
Genotype AaBB2 in 1612.5% — A B
Genotype Aabb2 in 1612.5% — A bb
Genotype aaBb2 in 1612.5% — aa B
Genotype AABB1 in 166.25% — A B
Genotype AAbb1 in 166.25% — A bb
Genotype aaBB1 in 166.25% — aa B
Genotype aabb1 in 166.25% — aa bb
Gametes from the first parentAB, Ab, aB, ab
This ratio assumes the genes assort independently. Genes on the same chromosome and close together are linked, and the real offspring then resemble the parents far more often than these figures allow.

The formula

gametes are one allele per gene; offspring are every pairing of one gamete from each parent

The ratios are results, not rules

This page builds the square from first principles for any number of genes: it works out every gamete each parent can make, pairs them all, and tallies what comes out. The familiar 3:1, 9:3:3:1 and 27:9:9:9:3:3:3:1 are not written into the code anywhere — they emerge from the counting, which is the only honest way to present them.

Independent assortment is an assumption

The dihybrid ratio requires the two genes to assort independently, which is true only if they sit on different chromosomes or far enough apart on the same one. Genes close together are linked and inherited together far more often than chance allows, and the observed ratio then departs from 9:3:3:1 in a way that measures how close they are. Mendel's seven pea traits happened to assort independently, which was a considerable piece of luck.

Complete dominance is also an assumption

The phenotype counts here assume one allele completely masks the other. Where dominance is incomplete the heterozygote looks like neither parent and the phenotype ratio becomes 1:2:1, matching the genotypes. Where both alleles show, as in AB blood type, the same thing happens for a different reason.

Ratios are expectations, not promises

Every genetic ratio on these pages is a probability distribution, not a guarantee. A 3:1 cross does not produce three dominant offspring for every recessive one in a litter of four — it produces each offspring independently with a three-quarters chance. Small families depart from the expected ratio routinely, and that is the reason Mendel needed thousands of pea plants rather than dozens.