Audited ·Last updated 29 Jul 2026·6 citations·Tier 1·0 uses

Dihybrid Cross Calculator

Free dihybrid cross calculator. Enter two parent genotypes for two genes and get the 16-cell Punnett square, 9:3:3:1 ratio and expected offspring counts.

Dihybrid Cross Calculator

Four letters: the first two are gene 1, the last two are gene 2. UPPERCASE is dominant, lowercase recessive. AaBb, AABb, aabb, RrYy all work. The two genes must use different letters.
Same two genes, in the same order as parent 1. Enter aabb for a testcross. Swapping the two parents cannot change the answer.
Turns the probabilities into expected counts. Leave at 16 to read the 9:3:3:1 ratio directly; set it to your real progeny total (Mendel used 556 seeds) before running a chi-square test. Expected counts are deliberately NOT rounded to whole offspring — chi-square needs the unrounded value.
offspring
Dominant at both genes (A_B_)
56.25
Percentage of offspring showing the dominant phenotype at both genes — the 9 in 9:3:3:1 for a heterozygote × heterozygote cross, which is 9/16 = 56.25%. The underscore means 'either allele', so A_ covers both AA and Aa.
Dominant gene 1, recessive gene 2 (A_bb)
18.75
Recessive gene 1, dominant gene 2 (aaB_)
18.75
Recessive at both genes (aabb)
6.25
Expected A_B_ offspring
9
Expected A_bb offspring
3
Expected aaB_ offspring
3
Expected aabb offspring
1
Phenotype ratio
9 A_B_ : 3 A_bb : 3 aaB_ : 1 aabb
Genotype ratio
1 AABB : 2 AABb : 1 AAbb : 2 AaBB : 4 AaBb : 2 Aabb : 1 aaBB : 2 aaBb : 1 aabb
Distinct gametes from parent 1
4
Distinct gametes from parent 2
4
Distinct offspring genotypes
9

Background.

A dihybrid cross follows two genes at once. This calculator takes both parents' genotypes at two independently assorting genes, enumerates all sixteen cells of the 4×4 Punnett square, and returns the probability of each of the four visible classes, the reduced genotype and phenotype ratios, and the expected number of offspring in each class for a progeny total you choose.

The defining result is the 9:3:3:1 phenotypic ratio. Cross two double heterozygotes — AaBb × AaBb — and 56.25 % of offspring show the dominant phenotype at both genes, 18.75 % are dominant at the first and recessive at the second, 18.75 % are recessive at the first and dominant at the second, and 6.25 % are recessive at both. Underneath, nine distinct genotypes appear in the 1:2:1:2:4:2:1:2:1 pattern, because a 1:2:1 monohybrid ratio at one gene multiplied by a 1:2:1 at the other gives nine combinations.

That multiplication is the whole idea, and it is why the page also reports gamete counts. Mendel's second law — independent assortment — says the allele a gamete receives at one gene tells you nothing about the allele it receives at the other. A parent heterozygous at both genes therefore makes four genetically different gametes in equal numbers, a parent heterozygous at one gene makes two, and a double homozygote makes one. Two parents making four gametes each produce a sixteen-cell grid, and every cell is equally likely, so each probability is an exact sixteenth. You can shortcut the whole grid with the product rule: P(A_) = 3/4 and P(B_) = 3/4, so P(A_B_) = 3/4 × 3/4 = 9/16. The calculator enumerates the grid and its test suite checks the answer against that multiplication, so the two routes are known to agree.

The expected-count outputs exist because a dihybrid ratio is almost always the setup for a statistical test rather than the end of the problem. Enter your real progeny total and you get the expectations a chi-square goodness-of-fit test needs. They are reported unrounded on purpose: Mendel's famous 556 seeds give expectations of 312.75, 104.25, 104.25 and 34.75, and rounding those to whole seeds changes the resulting chi-square value. His observed counts were 315 round yellow, 108 round green, 101 angular yellow and 32 angular green, which gives χ² = 0.470 on three degrees of freedom against a 5 % critical value of 7.815 — a very comfortable fit.

The honest limits belong here rather than at the bottom of the page. This model is exact only when the two genes assort independently, which in practice means they sit on different chromosomes or far enough apart on the same one that crossing over shuffles them freely. Genes that are physically close are linked: the combinations the parents already had turn up more often than 9:3:3:1 predicts and the recombinant ones turn up less, sometimes dramatically so. A departure from 9:3:3:1 in real data is usually evidence of linkage or of epistasis — one gene masking the other, which converts the ratio into 9:7, 12:3:1, 13:3 or 15:1 depending on the mechanism — rather than evidence that the arithmetic went wrong. Lethal alleles remove a class before it can be counted, and reduced penetrance moves individuals out of the class their genotype puts them in.

A note on Mendel's own luck is worth carrying, because the textbook version is a simplification. Introductory texts often say all seven of his traits sit on separate chromosomes. The molecular work does not support that: Reid and Ross, writing in Genetics in 2011, place the seven genes on only five of the pea's seven linkage groups, with the stem-length and pod-form genes about 12.6 map units apart on the same one — genuinely linked. Mendel appears simply not to have run a detailed dihybrid analysis on that particular pair. Below the widget you will find the full derivation, the worked example step by step, how to read a testcross, what a chi-square test does with these numbers, and where the independent-assortment assumption stops being safe.

What is dihybrid cross calculator?

A dihybrid cross is a mating tracked at two genes simultaneously, conventionally written with two letters — one per gene — such as AaBb × AaBb. Each parent carries two alleles at each gene, and under Mendel's law of independent assortment the allele passed on at one gene is chosen independently of the allele passed on at the other. A parent heterozygous at both genes therefore produces four kinds of gamete (AB, Ab, aB, ab) in equal proportions; arranging four gametes against four gametes gives the sixteen-cell Punnett square that defines the dihybrid case.

The classic result is the 9:3:3:1 phenotypic ratio, which appears whenever both parents are heterozygous at both genes and both genes show complete dominance. Nine sixteenths of offspring are dominant at both genes, three sixteenths dominant at the first and recessive at the second, three sixteenths the reverse, and one sixteenth recessive at both. Beneath that lie nine genotype classes in a 1:2:1:2:4:2:1:2:1 pattern — the product of a 1:2:1 at each gene. The underscore notation used throughout, as in A_B_, means 'either allele at that position', so A_ covers AA and Aa alike, which is exactly the ambiguity complete dominance creates.

Two other crosses are worth naming because they answer different questions. A dihybrid testcross pairs an individual of unknown genotype with a double recessive (aabb). The tester contributes only ab gametes, so every offspring's phenotype reveals directly which gamete the unknown parent supplied, and the progeny ratio is a direct readout of that parent's gamete frequencies. A 1:1:1:1 testcross result means the two genes assorted independently; anything else is the standard evidence for linkage, and the deviation is what a recombination frequency is calculated from. A cross with one homozygous parent — AABb × AaBb, say — produces fewer than nine genotype classes and a phenotype ratio other than 9:3:3:1, which this calculator handles the same way, by enumerating the grid rather than by assuming the textbook answer.

How to use this calculator.

  1. Write each parent's genotype as four letters: the first two are gene 1, the last two are gene 2. Uppercase is the dominant allele, lowercase the recessive one, and the two genes must use different letters — AaBb, RrYy, AABb, aabb.
  2. Enter parent 1 and parent 2 using the same two genes in the same order. If you enter BbAa for parent 2 after AaBb for parent 1, the calculator will ask you to reorder rather than guess.
  3. Set the offspring count. Leave it at 16 to read the ratio straight off the expected counts as 9, 3, 3 and 1. Set it to your real progeny total when you are preparing a chi-square test.
  4. Read the four phenotype percentages: dominant at both genes, dominant at gene 1 only, dominant at gene 2 only, and recessive at both. They always add to exactly 100 %.
  5. Use the expected counts as the E values in χ² = Σ (O − E)² / E, with three degrees of freedom for four classes. Do not round them first — the unrounded expectation is the correct one.
  6. Check the gamete-type counts to see how much heterozygosity each parent actually has: 4 means heterozygous at both genes, 2 at one, 1 at neither.
  7. For a testcross, enter aabb as parent 2. The progeny ratio then reads out parent 1's gamete frequencies directly, which is how linkage is detected and recombination frequency measured.
  8. For one gene use the Punnett square calculator; for three, the trihybrid cross calculator, which uses the forked-line method because a 64-cell grid is impractical to draw.

The formula.

P(A_B_) = P(A_) × P(B_) = ¾ × ¾ = 9⁄16

Two rules do all the work: segregation within a gene, and independence between genes.

Segregation says a parent passes on exactly one of its two alleles at each gene, each with probability ½. Independent assortment says the choice at gene 1 carries no information about the choice at gene 2. Multiplying the two gives a parent's gamete list: allele from gene 1 (2 options) × allele from gene 2 (2 options) = four gametes, each with probability ¼. Those four are counted with multiplicity, so a parent AABb makes AB, Ab, AB, Ab — four gametes but only two distinct types, which is what the gamete-type outputs report.

Fertilisation pairs one gamete from each parent independently, so the 4 × 4 grid has 16 equally likely cells and

P(genotype g) = (cells equal to g) ⁄ 16

For AaBb × AaBb the nine genotypes appear 1, 2, 1, 2, 4, 2, 1, 2, 1 times, totalling 16.

Under complete dominance an offspring shows the dominant phenotype at a gene whenever it carries at least one uppercase allele there, so the four visible classes come out as

A_B_ = 9⁄16 = 56.25 % A_bb = 3⁄16 = 18.75 % aaB_ = 3⁄16 = 18.75 % aabb = 1⁄16 = 6.25 %

The same four numbers fall out of the product rule without any grid: P(A_) = ¾ and P(B_) = ¾ per gene, so P(A_B_) = ¾ × ¾ = 9⁄16, P(A_bb) = ¾ × ¼ = 3⁄16, and so on. The code counts cells and its tests multiply per-gene probabilities, and the two are required to agree — that is the cross-check, not a coincidence.

Expected counts scale linearly: E(class) = P(class) × offspring total. For 556 offspring the four expectations are 312.75, 104.25, 104.25 and 34.75, summing back to exactly 556.

ROUNDING STAGE. Rounding happens **only at the final return**, to ten decimal places, on values that are already exact rationals with denominator 16. Nothing is rounded part-way through, and expected counts are deliberately not rounded to whole offspring, because χ² = Σ (O − E)² / E is sensitive to that rounding: using 313 instead of 312.75 for Mendel's data changes the statistic in the third decimal place, and using rounded expectations for small classes changes it much more.

WHERE THE MODEL BREAKS. Independent assortment is a physical claim about chromosomes, not a mathematical identity. It holds when the two genes are on different chromosomes, or far enough apart on the same chromosome that crossing over separates them in half of meioses. When two genes sit close together they are linked: gametes carrying the parental allele combinations are over-represented and recombinant gametes under-represented, so the observed ratio shifts away from 9:3:3:1 toward the parental classes. Epistasis is a different failure — the genes assort independently but one masks the other's phenotype, turning 9:3:3:1 into 9:7, 12:3:1, 13:3 or 15:1 by merging visible classes. Lethal alleles delete a class outright, and reduced penetrance moves individuals into the wrong visible class. In every one of these cases the grid arithmetic is still correct; the mapping from genotype to phenotype, or the independence assumption, is what has failed.

INVALID DOMAIN. There is no singularity — the denominator is the constant 16, never a user value. The calculator rejects, field by field: a genotype that is not four letters, a gene whose two characters are different letters, both genes written with the same letter, any non-letter character, parents listing different genes or the same genes in a different order, and a negative or non-finite offspring count. An offspring count of zero is legal and returns four zero expectations.

A worked example.

Example

Mendel's own two-character experiment, reproduced end to end. He crossed peas differing in seed shape and seed colour, self-pollinated the F1, and harvested 556 F2 seeds. Take A = round (dominant over angular/wrinkled) and B = yellow (dominant over green); the F1 plants are all AaBb, so the F2 comes from AaBb × AaBb. Each parent makes four gamete types — AB, Ab, aB, ab — which the calculator reports as 4 distinct gametes for each parent. Crossing four against four fills sixteen equally likely cells. Counting them gives nine genotype classes in the ratio 1 AABB : 2 AABb : 1 AAbb : 2 AaBB : 4 AaBb : 2 Aabb : 1 aaBB : 2 aaBb : 1 aabb, which sums to 16. Grouping those nine genotypes by what you can actually see gives the four phenotype classes: 9 cells are dominant at both genes (56.25 %), 3 are round but green (18.75 %), 3 are angular but yellow (18.75 %), and 1 is angular and green (6.25 %). The phenotype ratio output reads 9 A_B_ : 3 A_bb : 3 aaB_ : 1 aabb, and the four percentages add to exactly 100. Scaling to 556 seeds gives the expected counts: 312.75 round yellow, 104.25 round green, 104.25 angular yellow and 34.75 angular green, which add back to 556.00 exactly. Mendel's actual counts, as printed in the peer-reviewed 2016 Genetics translation of his 1866 paper, were 315 round yellow, 108 round green, 101 angular yellow and 32 angular green. Feeding those against the expectations above gives χ² = (315−312.75)²/312.75 + (108−104.25)²/104.25 + (101−104.25)²/104.25 + (32−34.75)²/34.75 = 0.0162 + 0.1349 + 0.1013 + 0.2176 = 0.470, on three degrees of freedom. The 5 % critical value is 7.815, so the fit is excellent and there is no evidence against independent assortment for this pair of genes. Notice that this only works because the expectations were not rounded first — using 313, 104, 104 and 35 instead changes the statistic. Finally, one contrast worth trying. Change parent 2 to aabb and the calculator switches to a testcross: parent 2 now makes just 1 gamete type, all four phenotype classes come out at 25 %, and the ratio becomes 1 : 1 : 1 : 1. That flat ratio is exactly what makes a testcross the standard tool for detecting linkage — any departure from 1:1:1:1 in real testcross progeny is measured directly as a recombination frequency.

parent2 GenotypeAaBb
parent1 GenotypeAaBb
offspring Count556

Frequently asked questions.

Why is the dihybrid ratio 9:3:3:1?
Because two independent 3:1 ratios multiply. At each gene separately, a heterozygote × heterozygote cross gives 3/4 dominant and 1/4 recessive. If the two genes assort independently, the joint probabilities are simply the products: 3/4 × 3/4 = 9/16 dominant at both, 3/4 × 1/4 = 3/16 dominant at the first only, 1/4 × 3/4 = 3/16 dominant at the second only, and 1/4 × 1/4 = 1/16 recessive at both. Multiply through by 16 and you have 9:3:3:1. The 4×4 Punnett square is the same calculation drawn out: four gamete types from each parent give sixteen equally likely cells, and counting them gives 9, 3, 3 and 1. OpenStax's Biology 2e states the multiplication explicitly as '(3/4) × (3/4) = 9/16', which is the check this calculator's test suite runs against its own cell counting.
How many gametes and genotypes does a dihybrid cross produce?
For n genes at which a parent is heterozygous, it makes 2ⁿ distinct gamete types, and a cross between two such parents produces 3ⁿ genotype classes from 4ⁿ Punnett-square cells. Mendel derived those three series himself for n differing characters. A double heterozygote is n = 2, so 4 gamete types, 9 genotype classes and 16 cells. A parent heterozygous at only one of the two genes makes 2 gamete types, and a double homozygote makes 1 — which is why a testcross parent (aabb) contributes no variation at all and lets the other parent's gametes show through. The calculator reports the distinct gamete count for each parent and the number of genotype classes that actually occur, so you can see the effect of homozygosity directly.
What is a dihybrid testcross and what does it tell you?
A testcross pairs an individual whose genotype you do not know with a double recessive, aabb. Because the tester can only contribute ab gametes, each offspring's phenotype is a direct readout of which gamete the unknown parent supplied — there is no dominance to hide anything. If the unknown parent is AaBb and the two genes assort independently, the four phenotype classes come out at 25 % each, a 1:1:1:1 ratio, which this calculator returns when you enter aabb as parent 2. Any departure from 1:1:1:1 in real testcross progeny is the classical evidence for linkage, and the proportion of recombinant offspring is the recombination frequency, measured in map units where 1 % recombinants equals 1 centimorgan.
What happens to the ratio if the two genes are linked?
The ratio shifts toward the combinations the parents already carried. Linked genes sit close together on the same chromosome, so crossing over separates them in fewer than half of meioses; gametes carrying the parental allele combinations become more common than 25 % each and recombinant gametes less common. The tighter the linkage, the larger the excess. In a dihybrid F2 that inflates the class matching the parental configuration and shrinks the others, so a strongly linked pair can look nothing like 9:3:3:1. The right response is not to distrust the calculator but to run a testcross, measure the recombination frequency directly, and treat the deviation as data. Independent assortment is a physical claim about chromosome behaviour, not a mathematical identity — this calculator assumes it, and says so.
Were all of Mendel's seven traits really on separate chromosomes?
No, and this is a point where the textbook simplification and the molecular literature disagree, so both are worth stating. OpenStax's Biology 2e says 'all the genes he examined are either on separate chromosomes or are sufficiently far apart as to be statistically unlinked'. Reid and Ross, in Genetics 189(1):3–10 (2011), report from the molecular characterisation that the seven traits occupy only five of the pea's seven linkage groups, and that the stem-length gene (le) and the pod-form gene (v) lie about 12.6 map units apart on linkage group III — genuinely linked. Their explanation is that Mendel simply did not perform a detailed dihybrid analysis on that pair, so linkage never surfaced in his data. This page follows Reid and Ross, because it is primary molecular literature and specific about which pair and how far apart. It changes nothing about the arithmetic; it changes what one can honestly claim about why the arithmetic worked for him.
What is epistasis and how does it change the 9:3:3:1 ratio?
Epistasis is one gene masking another's phenotype. The genes still assort independently, so the underlying 9:3:3:1 genotype grouping is unchanged, but some of the four visible classes become indistinguishable and merge. Recessive epistasis — where a homozygous recessive at one gene hides everything at the other — merges classes into 9:3:4. Dominant epistasis gives 12:3:1. Duplicate recessive epistasis, where either gene alone can produce the recessive phenotype, gives 9:7. Duplicate dominant genes, where either gene alone suffices, give 15:1. All of these sum to 16, which is the diagnostic: if your observed classes total sixteen parts but are not 9:3:3:1, you are almost certainly looking at epistasis rather than linkage. This calculator reports the underlying non-epistatic classes; combining them is the biology you add on top.
Why are the expected counts not whole numbers?
Because rounding them would corrupt a chi-square test, which is the main reason to want them. The expectation for a class is its probability times the progeny total, and 9/16 of 556 is 312.75, not 313. The chi-square statistic χ² = Σ (O − E)² / E divides by E and squares a difference that is often only a few units, so a quarter of a unit in E is not negligible — and for the smallest class, where E is 34.75, rounding matters more still. Real offspring obviously come in whole numbers; the expectation is a mean over hypothetical repetitions of the experiment, and means are not integers. Round only at the end, when reporting, and never before the statistic is computed.
How do I run a chi-square test on my own dihybrid data?
Enter your parents' genotypes and your real total number of scored offspring, take the four expected counts, and compute χ² = Σ (O − E)² / E across the four classes, where O is your observed count. Compare it to the chi-square distribution with 3 degrees of freedom — four classes minus one, because the total is fixed by your data rather than estimated. The 5 % critical value is 7.815 and the 1 % value is 11.345. A statistic below the critical value means your data are consistent with the model; above it means something in the model is wrong, and the usual candidates are linkage, epistasis, a lethal allele, or scoring error. Mendel's 556 seeds give χ² = 0.470, comfortably consistent. Two cautions: the test needs reasonably large expected counts in every class, conventionally at least five, and passing it is not proof the model is right — only that these data do not contradict it.
Can I use a dihybrid cross to predict a human family's traits?
Almost never usefully. Two-gene Mendelian analysis is a good model for a laboratory organism with defined strains, controlled crosses and hundreds of offspring, and a poor model for a human family with a handful of children and unknown genotypes. Most visible human traits — height, skin colour, eye colour, hair texture — are polygenic, influenced by many genes plus environment, and are not captured by any Punnett square. Even genuinely single-gene conditions in humans add complications this model does not have: unknown parental genotypes, population-specific allele frequencies, reduced penetrance, new mutations, and the information already contained in the family's history. Those require Bayesian updating rather than cell counting. A dihybrid cross calculator is a teaching and research-planning tool; for a real family question the right source is a clinical geneticist or a certified genetic counsellor.
Does the order of the two parents matter?
No. Fertilisation pairs one gamete from each parent independently, so the grid transposes when you swap the parents but every cell count stays the same. The calculator's test suite pins this: swapping parent 1 and parent 2 leaves all four phenotype percentages, both ratio strings and the genotype class count identical, with only the two gamete-type counts exchanging places because they describe the parents themselves. The one situation where parent order genuinely matters in real genetics is outside this model entirely: genomic imprinting, where the expression of an allele depends on whether it came from the mother or the father, and mitochondrial inheritance, which is maternal only. Neither can be represented by a Punnett square.

References& sources.

  1. [1]Abbott S. & Fairbanks D. J. (2016). Experiments on Plant Hybrids by Gregor Mendel. Genetics 204(2):407–422. doi:10.1534/genetics.116.195198. Peer-reviewed modern English translation of Mendel (1866) published by the Genetics Society of America. Source for the two-character experiment — 556 seeds, 315 round yellow, 101 angular yellow, 108 round green, 32 angular green — and for the 2ⁿ / 3ⁿ / 4ⁿ series. Open access, not paywalled. Retrieved 2026-07-29.
  2. [2]OpenStax, Biology 2e, section 12.3 'Laws of Inheritance'. Rice University, 2018, CC BY 4.0. Independent derivation of the same result by the product rule: 'the proportion of round and yellow F2 offspring is expected to be (3/4) × (3/4) = 9/16', and the 4 × 4 Punnett square giving '16 equally likely genotypic combinations' and 'a phenotypic ratio of 9 round/yellow:3 round/green:3 wrinkled/yellow:1 wrinkled/green'. Free, openly licensed. Retrieved 2026-07-29.
  3. [3]Reid J. B. & Ross J. J. (2011). Mendel's genes: toward a full molecular characterization. Genetics 189(1):3–10. doi:10.1534/genetics.111.132118. Places Mendel's seven traits on only five of the seven pea linkage groups, with le and v roughly 12.6 map units apart on linkage group III, and concludes 'an element of luck was involved with his choice of characters'. This page follows Reid & Ross where it conflicts with the textbook account — see the FAQ on Mendel's chromosomes. Open access via PMC. Retrieved 2026-07-29.
  4. [4]OpenStax, Biology 2e, section 13.1 'Chromosomal Theory and Genetic Linkage'. Rice University, 2018, CC BY 4.0. Source for the linkage mechanism — 'linked genes disrupt Mendel's predicted outcomes' and recombination frequency correlating with genetic distance — and, in its account of Mendel's traits, the simplification this page records as conflicting with Reid & Ross (2011). Free, openly licensed. Retrieved 2026-07-29.
  5. [5]MedlinePlus Genetics, US National Library of Medicine. Inheritance Patterns, page last updated 19 April 2021. Source for the classical inheritance-mode definitions used in the scope statements, and for the position that most visible human traits are not single-gene. Free. Retrieved 2026-07-29.
  6. [6]Gulani A. & Weiler T. Genetics, Autosomal Recessive. StatPearls, NCBI Bookshelf ID NBK546620, last update 1 May 2023. Source for the per-gene 25 % / 50 % / 25 % monohybrid figures that this page multiplies together, and for the product-rule statement '50% x 50% = 25%'. Free full text. Retrieved 2026-07-29.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 682 calculators remain free
  • No billing is enabled
Coming soon