A dihybrid cross tracks two genes at once instead of one, turning a simple 2x2 Punnett square into a 4x4 grid of 16 possible offspring. This calculator builds that grid automatically from any two parent genotypes, tallies the exact genotype and phenotype ratios, and breaks down the gamete-formation step so you can see exactly where the 4 gametes per parent come from.
How the 4x4 grid is built
Each parent's two-gene genotype splits into gametes during meiosis. Under independent assortment, a heterozygous AaBb parent doesn't just produce 2 gamete types like a monohybrid parent — it produces 4: AB, Ab, aB, and ab, one for every combination of an allele from gene A with an allele from gene B. A dihybrid Punnett square lines up one parent's 4 gametes across the top and the other parent's 4 gametes down the side, filling in all 4x4=16 cells with the offspring genotype formed by combining that row's and column's gamete.
Genotype ratio vs. phenotype ratio
The genotype ratio counts every exact allele combination in the 16-cell grid — for AaBb x AaBb that's 9 distinct genotype classes in a 1:2:2:4:1:2:1:2:1 ratio. The phenotype ratio groups those genotypes by which traits are actually visible: since a single dominant allele at each gene is enough to mask the recessive one, many different genotypes collapse into the same phenotype class, simplifying the 9-way genotype split down to just 4 phenotype classes.
Why two independent 3:1 splits give 9:3:3:1
A dihybrid cross between two double heterozygotes is really two independent monohybrid crosses happening at once. Gene A alone gives a 3:1 dominant-to-recessive split; gene B alone gives its own 3:1 split. Because the genes assort independently, you multiply the two ratios together: 3x3=9 (dominant at both), 3x1=3 (dominant at A only), 1x3=3 (dominant at B only), and 1x1=1 (recessive at both) — the classic 9:3:3:1. But this only holds when both parents are heterozygous at both genes; if either parent is homozygous at one gene, that gene stops segregating and the ratio collapses to something simpler, like the 1:1 result of a cross where one parent is AABb instead of AaBb.