Dihybrid cross calculator

Choose each parent’s genotype for two traits. You instantly get the gametes, a colour-coded 4×4 Punnett square and the genotype and phenotype ratios of the offspring.

♀ Mother
♂ Father
Quick set:
Name your traits (optional)
A/a
B/b
Phenotype ratio
Genotype ratio
Cross

Phenotypes

Gametes

Punnett square

Columns are the mother's (♀) gametes, rows the father's (♂). Cells are coloured by phenotype.

Genotypes

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).

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 trait names instead of A and B?

Yes. Open “Name your traits” and type the dominant and recessive forms (for example Purple / White flowers). The phenotype tables, Punnett square tooltips and CSV export all use your names.

Does this calculator handle linked genes, incomplete dominance or sex-linked traits?

No. It assumes complete dominance and independent assortment (genes on different chromosomes, or far enough apart that they assort independently) — the model taught in introductory Mendelian genetics. Linked or sex-linked genes need recombination frequencies or X/Y-specific alleles that change the ratios.

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