Dihybrid Cross Calculator
A dihybrid cross follows two genes at once. When both parents are heterozygous for both genes (AaBb × AaBb), each makes four kinds of gametes (AB, Ab, aB, ab), the 4×4 Punnett square has 16 equally likely boxes, and the offspring phenotypes come out in a 9 : 3 : 3 : 1 ratio, assuming complete dominance and independent assortment.
This dihybrid cross calculator works for any pair of genotypes. It lists the gametes, draws the Punnett square, and gives genotype and phenotype ratios as fractions and percentages.

How to use the Dihybrid Cross Calculator
- Under Gene 1 and Gene 2, type a Letter for each gene (A and B by default). The uppercase letter is the dominant allele and the lowercase letter is the recessive allele.
- Optionally type the Dominant trait and Recessive trait for each gene, such as Round and Wrinkled. The results then use those names.
- Choose the Parent 1 genotype and Parent 2 genotype for each gene: homozygous dominant (AA), heterozygous (Aa) or homozygous recessive (aa).
- Press Calculate. You get each parent's gametes, the 4×4 Punnett square, every genotype with its probability, and the phenotype ratio.
Dihybrid cross formula
Each gamete carries one allele of each gene. When the genes assort independently, the probability of any offspring type is the product of the single-gene probabilities, which is why the 16 boxes of a Punnett square and the multiplication shortcut always agree.
| Term | Meaning |
|---|---|
| Allele | One version of a gene; A (dominant) or a (recessive) |
| Genotype | The pair of alleles for each gene, such as AaBb |
| Phenotype | The visible trait; with complete dominance AA and Aa look the same |
| A_ | Shorthand for "AA or Aa", that is, the dominant phenotype |
| Gamete | A sex cell carrying one allele of each gene, such as Ab |

Common dihybrid crosses
| Cross | Phenotype ratio | Genotype ratio |
|---|---|---|
| AaBb × AaBb | 9 : 3 : 3 : 1 | 1 : 2 : 1 : 2 : 4 : 2 : 1 : 2 : 1 |
| AaBb × aabb (test cross) | 1 : 1 : 1 : 1 | 1 : 1 : 1 : 1 |
| AaBb × Aabb | 3 : 3 : 1 : 1 | 1 : 1 : 2 : 2 : 1 : 1 |
| AaBB × Aabb | 3 : 1 | 1 : 2 : 1 |
| AABB × aabb | all A_B_ | all AaBb |
| AAbb × aaBB | all A_B_ | all AaBb |
Genotype ratios list genotypes in the order AABB, AABb, AAbb, AaBB, AaBb, Aabb, aaBB, aaBb, aabb, skipping any that cannot occur.
Example: Mendel's round and yellow peas
In garden peas, round seed shape (R) is dominant to wrinkled (r), and yellow seed color (Y) is dominant to green (y). Mendel crossed plants that were heterozygous for both genes, RrYy × RrYy. To reproduce it, enter the letters R and Y, the trait names Round, Wrinkled, Yellow and Green, and choose Rr and Yy for both parents.
- Each parent makes four gametes in equal proportions: RY, Ry, rY and ry.
- The 4×4 Punnett square has 16 equally likely boxes and 9 different genotypes.
- Seed shape alone is 3/4 round and 1/4 wrinkled; seed color alone is 3/4 yellow and 1/4 green.
- Multiplying gives 9/16 round yellow (56.25%), 3/16 round green (18.75%), 3/16 wrinkled yellow (18.75%) and 1/16 wrinkled green (6.25%): a 9 : 3 : 3 : 1 ratio.
Mendel's counts were 315 round yellow, 108 round green, 101 wrinkled yellow and 32 wrinkled green, 556 in total. The 9 : 3 : 3 : 1 expectation for 556 offspring is 312.75, 104.25, 104.25 and 34.75, very close to what he observed.

How to read the result
- Punnett square: rows are parent 1's gametes, columns are parent 2's gametes, and every box has a 1/16 chance. A homozygous parent still gets four rows or columns; some are simply identical (AABb makes AB, Ab, AB, Ab).
- Genotypes vs. phenotypes: AaBb × AaBb produces 9 genotypes but only 4 phenotypes, because AA and Aa look the same under complete dominance.
- Probabilities, not guarantees: the ratio describes the chance for each offspring. A litter or family of 4 will rarely split exactly 9 : 3 : 3 : 1; large numbers, like Mendel's 556 offspring, come close.
- Two 3 : 1 ratios: the 9 : 3 : 3 : 1 ratio is simply (3 : 1) × (3 : 1). Any dihybrid result can be checked by multiplying the two single-gene results.
Assumptions and limitations
- Complete dominance at both genes. With incomplete dominance (pink snapdragons from red and white parents) or codominance, the heterozygote has its own phenotype and the ratios change.
- Independent assortment. Genes on different chromosomes sort independently. Genes close together on the same chromosome tend to be inherited together, so a 9 : 3 : 3 : 1 prediction does not apply.
- No gene interaction. Epistasis, where one gene masks another, turns 9 : 3 : 3 : 1 into modified ratios such as 9 : 3 : 4.
- Every genotype is assumed to survive equally, and sex-linked genes are not modeled.
Common mistakes
- Putting two alleles of the same gene in one gamete. "Aa" is not a gamete; each gamete has one A-gene allele and one B-gene allele.
- Using 9 : 3 : 3 : 1 for every dihybrid cross. It applies only to AaBb × AaBb. A test cross gives 1 : 1 : 1 : 1, and crosses with homozygous parents give fewer classes.
- Mixing up genotype and phenotype ratios. The 1 : 2 : 1 : 2 : 4 : 2 : 1 : 2 : 1 genotype ratio collapses into the 9 : 3 : 3 : 1 phenotype ratio.
- Writing the recessive allele first. Write Aa, not aA, so identical genotypes are easy to spot and count.
For other ratio and percentage work, the Percentage Calculator converts any fraction from the results, such as 3/16, into a percent.
Frequently asked questions
What is the ratio of a dihybrid cross?
For two parents that are heterozygous for both genes (AaBb × AaBb), the phenotype ratio is 9 : 3 : 3 : 1 and the genotype ratio is 1 : 2 : 1 : 2 : 4 : 2 : 1 : 2 : 1. Other parent genotypes give other ratios, such as 1 : 1 : 1 : 1 for a test cross.
How many gametes can an AaBb parent make?
Four, in equal proportions: AB, Ab, aB and ab. A parent that is homozygous for one gene, such as AABb, makes only two different gametes (AB and Ab).
What is a dihybrid test cross?
A cross between an individual of unknown genotype and one that is homozygous recessive for both genes (aabb). If the unknown parent is AaBb and the genes assort independently, the offspring appear in a 1 : 1 : 1 : 1 ratio.
Why does a dihybrid Punnett square have 16 boxes?
Each parent can contribute 4 gametes, so there are 4 × 4 = 16 equally likely combinations. Each box has a probability of 1/16, or 6.25%.
When does a dihybrid cross not give 9 : 3 : 3 : 1?
When the parents are not both AaBb, when the genes are linked on the same chromosome, when dominance is incomplete, or when the genes interact (epistasis).
Sources and references
- 12.3 Laws of Inheritance (Biology 2e) — OpenStax, Rice University
- 12.2 Characteristics and Traits (Biology 2e) — OpenStax, Rice University
- Gregor Mendel and the Principles of Inheritance — Nature Education (Scitable)
- 2.5 The Dihybrid Test Cross (Introduction to Genetics) — Thompson Rivers University Open Press
Formulas and content last reviewed on October 13, 2026. Last updated October 13, 2026. Results are estimates for general information only. Spotted a problem? Tell us and we will check it.