Dihybrid Cross Solver: Genetics Punnett Square Calculator
A dihybrid cross calculator predicts offspring genotypes and phenotype ratios for two inherited traits, generating a Punnett square from Mendelian genetics.
Dihybrid Cross Solver
Instructions
Enter the genotypes for two parents in the format AaBb.
Capital letters represent dominant alleles, lowercase letters represent recessive alleles.
The calculator will generate a Punnett square and phenotype ratios.
Punnett Square Results
| AB | Ab | aB | ab | |
|---|---|---|---|---|
| AB | AABB | AABb | AaBB | AaBb |
| Ab | AABb | AAbb | AaBb | Aabb |
| aB | AaBB | AaBb | aaBB | aaBb |
| ab | AaBb | Aabb | aaBb | aabb |
Phenotype Ratios
Documentation
What Is a Dihybrid Cross Calculator?
A dihybrid cross calculator predicts the genotypes and phenotypes of offspring when two parents differ in two genes. It builds a Punnett square automatically and shows the ratio of resulting traits. Biology students, teachers, and breeders use it to check dihybrid cross problems without drawing the grid by hand.
What Is a Dihybrid Cross?
A dihybrid cross tracks how two genes pass from parents to offspring at the same time. Gregor Mendel first worked this out in the 1860s while crossing pea plants that differed in seed shape and seed color.
A few terms explain how it works.
- Allele: one version of a gene. A capital letter (A, B) marks a dominant allele. A lowercase letter (a, b) marks a recessive allele.
- Genotype: an organism's genetic makeup, written as a letter combination such as AaBb.
- Phenotype: the trait an organism actually shows. A dominant allele hides a recessive one, so AA and Aa look the same.
- Homozygous: both alleles at a gene match (AA or aa).
- Heterozygous: the two alleles at a gene differ (Aa).
How to Calculate a Dihybrid Cross
A dihybrid cross relies on independent assortment: during gamete formation, the alleles of one gene separate independently of the alleles of the other gene. This lets each parent's alleles combine freely.
- Write down each parent's genotype, such as AaBb.
- List the possible gametes. A parent always produces four gamete types in a dihybrid cross, one for each combination of its two gene alleles. A heterozygous parent (AaBb) produces four different gametes: AB, Ab, aB, ab. A homozygous parent (AABB) also produces four gametes, but they are all identical: AB, AB, AB, AB.
- Build a 4×4 Punnett square. Place one parent's four gametes across the top and the other parent's four gametes down the side, then fill in each of the 16 cells with the combined genotype.
- Count phenotypes. Group the 16 offspring by which traits they display, then convert each group to a fraction of 16.
For two heterozygous parents (AaBb × AaBb), this produces the classic phenotype ratio:
- 9/16 show both dominant traits (A_B_)
- 3/16 show the dominant trait 1 and recessive trait 2 (A_bb)
- 3/16 show the recessive trait 1 and dominant trait 2 (aaB_)
- 1/16 show both recessive traits (aabb)
The underscore stands for "either allele," since it does not change the phenotype.
This 9:3:3:1 ratio is also the product of two separate 3:1 ratios: 3/4 × 3/4 = 9/16 for both dominant, 3/4 × 1/4 = 3/16 for each single-dominant case, and 1/4 × 1/4 = 1/16 for both recessive.
Example 1: Heterozygous × Heterozygous (AaBb × AaBb)
Both parents produce four gamete types: AB, Ab, aB, ab.
| AB | Ab | aB | ab | |
|---|---|---|---|---|
| AB | AABB | AABb | AaBB | AaBb |
| Ab | AABb | AAbb | AaBb | Aabb |
| aB | AaBB | AaBb | aaBB | aaBb |
| ab | AaBb | Aabb | aaBb | aabb |
Phenotype ratio:
- A_B_ (both dominant): 9/16 (56.25%)
- A_bb (dominant 1, recessive 2): 3/16 (18.75%)
- aaB_ (recessive 1, dominant 2): 3/16 (18.75%)
- aabb (both recessive): 1/16 (6.25%)
Example 2: Homozygous Dominant × Homozygous Recessive (AABB × aabb)
Each parent is homozygous, so each produces only one distinct gamete: AB for parent 1 and ab for parent 2. Because the calculator always lists four gametes per parent, that single gamete simply repeats four times: AB, AB, AB, AB and ab, ab, ab, ab. The Punnett square is still a 4×4 grid of 16 cells, but every cell holds the same genotype.
| ab | ab | ab | ab | |
|---|---|---|---|---|
| AB | AaBb | AaBb | AaBb | AaBb |
| AB | AaBb | AaBb | AaBb | AaBb |
| AB | AaBb | AaBb | AaBb | AaBb |
| AB | AaBb | AaBb | AaBb | AaBb |
Every offspring is AaBb and shows both dominant traits.
Phenotype ratio:
- A_B_ (both dominant): 16/16 (100%)
Example 3: Heterozygous × Homozygous Dominant (AaBb × AABB)
Parent 1 (AaBb) produces four different gametes: AB, Ab, aB, ab. Parent 2 (AABB) is homozygous, so its single gamete type, AB, repeats four times: AB, AB, AB, AB. The result is still a 4×4, 16-cell grid, with each of parent 1's four gametes paired against AB four times, so each row repeats across all four columns.
| AB | AB | AB | AB | |
|---|---|---|---|---|
| AB | AABB | AABB | AABB | AABB |
| Ab | AABb | AABb | AABb | AABb |
| aB | AaBB | AaBB | AaBB | AaBB |
| ab | AaBb | AaBb | AaBb | AaBb |
Four distinct genotypes appear, each in 4 of the 16 cells: AABB, AABb, AaBB, and AaBb. Every one of them carries at least one dominant allele at each gene, so every offspring shows both dominant traits.
Phenotype ratio:
- A_B_ (both dominant): 16/16 (100%)
How to Use This Calculator
- Enter each parent's genotype in the format AaBb: capital letters for dominant alleles, lowercase for recessive, with the first pair for gene 1 and the second pair for gene 2.
- The calculator checks that each genotype has four letters, that each gene's two letters match (Aa, not Ax), and that both parents refer to the same two genes.
- It then displays the 4×4 Punnett square and the phenotype ratio.
- Use the copy button to save the grid and ratio as text.
Uses of Dihybrid Cross Calculations
Biology courses use dihybrid crosses to teach probability and Mendelian inheritance. Plant and animal breeders use the same math to predict which trait combinations will appear in offspring before running an actual cross. Genetic counselors use the underlying principle, independent assortment, to explain inheritance risk for two unrelated conditions. Researchers use it to set expected ratios before comparing them with experimental data.
The Punnett square is one of several ways to solve the same problem. A probability calculation multiplies the chance of each trait separately, for example 3/4 × 3/4 = 9/16 for two dominant traits in an AaBb × AaBb cross. A branching diagram or forked-line method reaches the same numbers by tracing each gene's outcomes as separate branches. All three methods rely on the same rule of independent assortment and give identical ratios when the two genes sit on different chromosomes.
Real inheritance sometimes departs from this model. Genes located near each other on the same chromosome are inherited together more often than independent assortment predicts, a pattern called linkage. Some gene pairs interact so that one gene masks another's effect, called epistasis. This calculator assumes two unlinked genes with complete dominance, the standard classroom case.
History
Gregor Mendel, an Augustinian friar, ran the first documented dihybrid cross experiments on pea plants in the 1860s, tracking seed shape and seed color together. His 1866 paper described the resulting 9:3:3:1 ratio and led to what is now called the law of independent assortment. Mendel's work went largely unnoticed until 1900, when Hugo de Vries, Carl Correns, and Erich von Tschermak independently rediscovered the same patterns, launching modern genetics. Thomas Hunt Morgan's later experiments with fruit flies showed that genes on the same chromosome do not always assort independently, revealing the exception of genetic linkage.
Frequently Asked Questions
What is a dihybrid cross? A dihybrid cross is a cross between two organisms that tracks two genes at once. Crossing two double heterozygotes (AaBb × AaBb) produces offspring in a 9:3:3:1 phenotype ratio when both genes show complete dominance.
Why is the ratio 9:3:3:1? It comes from combining two independent 3:1 ratios, one for each gene: 3/4 × 3/4 = 9/16 for both dominant traits, 3/4 × 1/4 = 3/16 for each single-dominant combination, and 1/4 × 1/4 = 1/16 for both recessive traits.
What is the difference between genotype and phenotype? Genotype is the set of alleles an organism carries, such as AaBb. Phenotype is the trait that genotype produces, such as showing the dominant version of both traits.
Does a dihybrid cross always produce four different gametes per parent? A parent always produces four gamete slots in the Punnett square method. A heterozygous parent's four gametes are genuinely different (AB, Ab, aB, ab). A homozygous parent's four gametes are identical copies of one type (for example AB, AB, AB, AB), which is why homozygous crosses collapse to a single repeated genotype even though the grid still has 16 cells.
Can this calculator handle linked genes or codominance? No. It assumes the two genes are on different chromosomes and assort independently, and that each gene shows complete dominance. Linked genes and codominant or incompletely dominant alleles produce different ratios than the ones this tool calculates.
Does this work for human traits? The same math applies to any two genes with simple dominant-recessive inheritance, including some human traits. Most human traits, however, involve more than one gene or are shaped by environment, so this simple model will not capture them accurately.
References
- Klug, W. S., Cummings, M. R., Spencer, C. A., & Palladino, M. A. (2019). Concepts of Genetics (12th ed.). Pearson.
- Pierce, B. A. (2017). Genetics: A Conceptual Approach (6th ed.). W.H. Freeman.
- Mendel, G. (1866). "Experiments on Plant Hybridization." Proceedings of the Natural History Society of Brünn.
- National Human Genome Research Institute. "Dihybrid Cross." genome.gov/genetics-glossary/Dihybrid-Cross