Dihybrid Cross Punnett Square Calculator
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
A dihybrid cross Punnett square calculator works out the expected genotypic and phenotypic ratios for offspring when two traits are inherited together. You enter the genotypes of the two parents (for two genes, each with two alleles), and the calculator generates the 4×4 Punnett square and gives you the ratio of each genotype and phenotype. The result is based on Mendel’s law of independent assortment, so it applies when the two genes are on different chromosomes or far apart on the same chromosome.
Formula
The dihybrid cross calculator uses the same logic as a hand-drawn Punnett square. For each parent, you first determine the four possible gamete combinations. If the parent is heterozygous for both genes (AaBb), the gametes are AB, Ab, aB, and ab. If a parent is homozygous for one or both genes, the number of unique gametes drops. The calculator then crosses every gamete from parent 1 with every gamete from parent 2, producing a 4×4 grid of offspring genotypes. Each cell is equally likely, so the ratio of genotypes is simply the count of each unique genotype divided by 16.
For the phenotypic ratio, you need to know which alleles are dominant. In the classic dihybrid cross, A is dominant over a, and B is dominant over b. An offspring shows the dominant phenotype for a trait if it has at least one dominant allele (AA or Aa). The recessive phenotype appears only when the genotype is homozygous recessive (aa or bb). The calculator applies this rule to count phenotypes.
Worked Example
Using the default values, both parents are heterozygous for both genes: AaBb × AaBb. This is the classic dihybrid cross you see in textbooks.
Step 1: Determine the gametes for each parent. AaBb produces four gametes: AB, Ab, aB, ab. The other parent also produces AB, Ab, aB, ab.
Step 2: Set up the 4×4 grid. The rows are parent 1’s gametes, the columns are parent 2’s gametes.
Step 3: Fill in each cell by combining the alleles. For example, the top-left cell is AB × AB = AABB. The top-right cell is AB × Ab = AABb, and so on.
Step 4: Count the genotypes. The 16 cells produce:
- AABB: 1
- AABb: 2
- AAbb: 1
- AaBB: 2
- AaBb: 4
- Aabb: 2
- aaBB: 1
- aaBb: 2
- aabb: 1
That gives a genotypic ratio of 1:2:1:2:4:2:1:2:1.
Step 5: Count phenotypes. With A dominant and B dominant:
- Both dominant (A_ B_): AABB, AABb, AaBB, AaBb = 9
- First dominant, second recessive (A_ bb): AAbb, Aabb = 3
- First recessive, second dominant (aa B_): aaBB, aaBb = 3
- Both recessive (aabb): 1
The phenotypic ratio is 9:3:3:1, which is the classic result for a dihybrid cross of two heterozygotes.
When to Use a Dihybrid Cross Calculator
Use this calculator when you are studying inheritance of two traits at once and you know the parents’ genotypes. It is common in high school and college biology, genetics labs, and breeding projects where you want to predict the likelihood of a certain combination of traits in offspring. For example, in pea plants, you might track seed shape (round vs. wrinkled) and seed color (yellow vs. green). If both parents are heterozygous for both traits (RrYy), the calculator gives the 9:3:3:1 ratio.
The calculator is also useful for reverse problems: if you observe a phenotypic ratio in offspring, you can work backward to infer the parents’ genotypes. A 9:3:3:1 ratio strongly suggests both parents are heterozygous for both genes, assuming independent assortment and complete dominance.
How to Read the Results
The genotypic ratio lists every unique genotype and how many times it appears out of 16. The phenotypic ratio groups those genotypes by the physical trait they produce. For a dihybrid cross, the phenotypic ratio is usually expressed as four numbers (e.g., 9:3:3:1), but the genotypic ratio has nine categories because there are nine possible genotypes.
Remember that these are probabilities, not guarantees. If you have a small number of offspring, the actual counts may deviate from the ratio due to chance. The larger the sample, the closer the observed numbers should match the expected ratio.
Common Mistakes and Limitations
- Assuming independent assortment for linked genes: The 9:3:3:1 ratio only holds if the two genes are on different chromosomes or far apart on the same chromosome. If they are close together on the same chromosome, they are linked and will not assort independently, so the ratio will be different.
- Forgetting to account for dominance: The phenotypic ratio depends on which alleles are dominant. If you have incomplete dominance or codominance, the phenotype categories change. For example, if A is incompletely dominant, Aa would be a third phenotype, not the same as AA.
- Mixing up gamete combinations: When writing gametes, each gamete must have one allele from each gene. A common mistake is to write AB and ab only, forgetting the recombinant types Ab and aB.
- Using the calculator for more than two genes: This tool is specifically for two genes. For three or more genes, the number of gametes and the size of the Punnett square grows exponentially, and you would need a different approach.
Alternatives to a Punnett Square
For more complex crosses, geneticists often use the forked-line method (also called the branch diagram) or probability rules. The forked-line method breaks the cross into single-gene crosses and multiplies the probabilities. For a dihybrid cross, you can treat each gene separately: Aa × Aa gives a 3:1 phenotypic ratio, and Bb × Bb gives a 3:1 ratio. Multiplying the fractions gives (3/4 + 1/4) × (3/4 + 1/4) = 9/16 : 3/16 : 3/16 : 1/16, which is the same 9:3:3:1.
Another alternative is to use a chi-square test after collecting data to see if observed offspring ratios fit the expected ratio. That is a statistical tool, not a prediction tool, but it is often used alongside Punnett squares in genetics labs.
Frequently Asked Questions
What is the difference between a monohybrid and dihybrid cross? A monohybrid cross tracks one gene, while a dihybrid cross tracks two genes simultaneously. The monohybrid cross of two heterozygotes gives a 3:1 phenotypic ratio, while the dihybrid cross gives 9:3:3:1 if both genes assort independently.
Can I use this calculator for linked genes? No, the calculator assumes independent assortment. If the genes are linked, the offspring ratios will not follow the 9:3:3:1 pattern. You would need to know the recombination frequency and use a different method.
What does the genotypic ratio 1:2:1:2:4:2:1:2:1 mean? It means that in a cross of two AaBb parents, out of 16 offspring, on average 1 will be AABB, 2 will be AABb, 1 will be AAbb, 2 will be AaBB, 4 will be AaBb, 2 will be Aabb, 1 will be aaBB, 2 will be aaBb, and 1 will be aabb.
How do I enter genotypes with different alleles? The calculator uses letters A/a for the first gene and B/b for the second gene. You can type any letter, but the calculator treats uppercase as dominant and lowercase as recessive. For example, you can enter Rr for round/wrinkled and Yy for yellow/green.
What if one parent is homozygous dominant for both traits? If one parent is AABB and the other is AaBb, the calculator will still work. The gametes for AABB are only AB, so the Punnett square will be 1×4 instead of 4×4, and the resulting ratios will be different. The calculator handles that automatically.
Why is the phenotypic ratio 9:3:3:1 and not something else? Because each trait has a 3:1 dominant-to-recessive ratio, and the two traits are independent. Multiplying (3:1) × (3:1) gives 9:3:3:1. The 9 represents both dominant traits, the two 3s represent one dominant and one recessive, and the 1 represents both recessive.
Related
Formula used
in a | Parent 1 gene 1 | - | Aa | 0 in b | Parent 1 gene 2 | - | Bb | 0 in c | Parent 2 gene 1 | - | Aa | 0 in d | Parent 2 gene 2 | - | Bb | 0 out square | Punnett square | - | 1 | 0 out gen | Genotypic ratio | - | 1 | 0 out phen | Phenotypic ratio | - | 1 | 0
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.