When two traits are inherited together, such as seed shape and seed colour in Mendel’s peas, a single Punnett square becomes a 16-box grid. This calculator does the bookkeeping for a dihybrid cross: choose the genotype of each parent for two genes and read the probability of each phenotype, the chance of a double heterozygote and the expected number of offspring in each class.
How the calculation works
Each parent passes on one allele per gene; the chance it is the dominant one is 1 for AA, ½ for Aa and 0 for aa.
- P(offspring is aa) = (1 − chance from parent 1) × (1 − chance from parent 2)
- P(dominant phenotype for A) = 1 − P(aa), and the same for B
- P(A_B_) = P(A dominant) × P(B dominant); the other classes follow in the same way
- P(AaBb) = P(Aa) × P(Bb)
- Expected count = probability × number of offspring
The two genes are assumed to assort independently with complete dominance.
Example
Cross two parents that are AaBb (the default). Each gene gives a dominant phenotype with probability 0.75. So A_B_ is 0.75 × 0.75 = 56.25 %, A_bb and aaB_ are each 18.75 %, and aabb is 6.25 %: the 9 : 3 : 3 : 1 ratio. With 160 offspring you expect 90 dominant for both traits and 10 recessive for both. A quarter (25 %) of the offspring are AaBb themselves.
Why it matters
The ratio is the signature of two unlinked genes, and a departure from it is a clue. Geneticists use it to test whether genes are linked, and breeders use it to plan how many plants or animals they need to raise to get a rare double-recessive. A 1-in-16 class needs about 48 offspring to be 95 % sure of at least one.
Good to know
If one parent is homozygous dominant for a gene, every offspring shows the dominant trait for that gene, so the ratio collapses. A test cross of an AaBb with an aabb gives 1 : 1 : 1 : 1. Real counts scatter around the expected numbers, so use a chi-square test to decide whether a result fits the ratio. This tool is for education.
In practice
Enter the genotypes you suspect for a pair of parents and compare the expected counts with what you observe. If the double-recessive class is far larger or smaller than predicted, the genes may be linked or a genotype may be lethal.
Related tools
The Punnett square calculator handles one gene, the Hardy-Weinberg calculator follows allele frequencies in a population, and the chi-square calculator tests a result against the expected ratio.