Dihybrid cross calculator

Choose each parent’s genotype for two traits. You instantly get the gametes, a color-coded 4×4 Punnett square, the genotype and phenotype ratios, and the working behind them. Use your own letters, or switch a gene to incomplete dominance, codominance, ABO blood type or X-linked.

♀ Mother
♂ Father
Quick set:
Examples:
Genes: letters, inheritance patterns and trait names
Gene 1
Gene 2

Aa Bb × Aa Bb: 16 boxes, phenotype ratio 9:3:3:1, genotype ratio 1:2:1:2:4:2:1:2:1.

Phenotype ratio9:3:3:1
Genotype ratio1:2:1:2:4:2:1:2:1
CrossAa Bb × Aa Bb

Model: gene 1: complete dominance; gene 2: complete dominance. Genes assort independently (unlinked). Every gamete combination is equally likely, and probabilities are per offspring, not a promise for any one family or litter.

Phenotypes

Gametes

♀ Mother AB 1/4 Ab 1/4 aB 1/4 ab 1/4
♂ Father AB 1/4 Ab 1/4 aB 1/4 ab 1/4

Punnett square

Columns are the mother's (♀) gametes, rows the father's (♂). Cells are tinted by phenotype; hover or tap a cell for its name.

PhenotypeCountProbability
Yellow seed, Round seed9/1656.3%
Yellow seed, Wrinkled seed3/1618.8%
Green seed, Round seed3/1618.8%
Green seed, Wrinkled seed1/166.3%

Genotypes

♂ \ ♀ABAbaBab
ABAABBAABbAaBBAaBb
AbAABbAAbbAaBbAabb
aBAaBBAaBbaaBBaaBb
abAaBbAabbaaBbaabb

Show the working

  1. The mother is AaBb. Each gamete gets one allele from each gene. With 2 heterozygous genes, that makes 4 different gametes (22), listed in FOIL order: AB, Ab, aB, ab.
  2. The father is AaBb. Each gamete gets one allele from each gene. With 2 heterozygous genes, that makes 4 different gametes (22), listed in FOIL order: AB, Ab, aB, ab.
  3. Fill the square. 4 mother gametes × 4 father gametes = 16 boxes. Each box joins one gamete from each parent and is equally likely, so each box is a 1/16 chance.
  4. Count the genotypes. 9 different genotypes appear: AABB × 1, AABb × 2, AAbb × 1, AaBB × 2, AaBb × 4, Aabb × 2, aaBB × 1, aaBb × 2, aabb × 1. Simplified, the genotype ratio is 1:2:1:2:4:2:1:2:1.
  5. Group by phenotype. Yellow seed, Round seed: 9/16 = 56.3%; Yellow seed, Wrinkled seed: 3/16 = 18.8%; Green seed, Round seed: 3/16 = 18.8%; Green seed, Wrinkled seed: 1/16 = 6.3%. The phenotype ratio is 9:3:3:1.
  6. Check with the product rule. Work each gene on its own (gene 1: Yellow seed 3/4, Green seed 1/4; gene 2: Round seed 3/4, Wrinkled seed 1/4), then multiply. For example, Yellow seed, Round seed: 3/4 × 3/4 = 9/16. The square and the product rule always agree when genes assort independently.

Chance of a specific offspring

Choose what you want for each gene (leave others as "any"). The calculator counts the matching boxes and shows the same answer with the product rule.

GenotypePhenotypeCountProbability
AABBYellow seed, Round seed1/166.3%
AABbYellow seed, Round seed2/1612.5%
AAbbYellow seed, Wrinkled seed1/166.3%
AaBBYellow seed, Round seed2/1612.5%
AaBbYellow seed, Round seed4/1625%
AabbYellow seed, Wrinkled seed2/1612.5%
aaBBGreen seed, Round seed1/166.3%
aaBbGreen seed, Round seed2/1612.5%
aabbGreen seed, Wrinkled seed1/166.3%

How to use the calculator

  1. Pick genotypes. For each parent, set trait 1 (A/a) and trait 2 (B/b) to homozygous dominant, heterozygous or homozygous recessive.
  2. Read the ratios. The phenotype and genotype ratios update as you change any dropdown — there is no button to press.
  3. Check your working. Compare the gametes and Punnett square with your own by-hand answer, box by box.
  4. Save or share. Copy a link that reopens the exact same cross, download the tables as CSV for a worksheet, or print a clean copy.

Worked example: Mendel’s peas

Seed colour (yellow A dominant over green a) and seed shape (round B dominant over wrinkled b) sit on different chromosomes, so they assort independently.

Mendel’s actual counts (315 : 108 : 101 : 32) sit very close to that 9:3:3:1 prediction, which is how he inferred independent assortment.

Need one gene or three? Try the monohybrid calculator (2×2 square) or the trihybrid calculator (8×8 square, 64 combinations).

Turning the boxes into percentages? See genotypic and phenotypic ratios as percentages and fractions. New to the letters? Start with how to write genotypes.

Frequently asked questions

What does a dihybrid cross calculator do?

It takes the genotypes of two parents for two genes, lists every gamete each parent can make, combines them in a 4×4 Punnett square and counts how often each offspring genotype and phenotype appears. The result is the same as working the square by hand, without the arithmetic slips.

Why is the classic dihybrid ratio 9:3:3:1?

When both parents are heterozygous for two independently assorting genes (AaBb × AaBb), each gene alone gives a 3:1 phenotype ratio. Multiplying the two independent ratios — (3:1) × (3:1) — gives 9:3:3:1 across the 16 boxes. See our dihybrid cross explanation for a worked example.

What is the genotype ratio of AaBb × AaBb?

1:2:1:2:4:2:1:2:1 — nine different genotypes, from AABB (1/16) through AaBb (4/16) to aabb (1/16). The genotype table below the Punnett square lists each one with its probability.

What is a dihybrid test cross?

Crossing an individual that shows both dominant traits with a homozygous recessive (aabb) partner. If the unknown parent is AaBb, the offspring appear in a 1:1:1:1 ratio. Use the “Test cross” preset above to see it.

Can I use my own letters and trait names instead of A and B?

Yes. Open “Genes: letters, inheritance patterns and trait names”, change each gene’s letter (for example T for tall) and type the dominant and recessive forms (for example Purple / White flowers). The phenotype tables, Punnett square tooltips, working and CSV export all use your names.

Does this calculator handle incomplete dominance, codominance, blood types or sex-linked traits?

Yes. Open “Genes: letters, inheritance patterns and trait names” to set each gene to complete dominance, incomplete dominance, codominance or ABO blood type, and to make one gene X-linked (results are then split into daughters and sons). It doesn’t model linked genes: it assumes genes assort independently. For the other exceptions, see beyond Mendelian inheritance, and for a fuller sex-linked example try the cat coat color calculator.

How do I find the gametes for a dihybrid cross?

Use the FOIL method: pair the First, Outer, Inner and Last alleles. For AaBb that gives AB, Ab, aB and ab. The calculator shows each parent’s gametes and their frequencies above the Punnett square. More detail in how to build a dihybrid Punnett square.

From the blog