GenerateRandomSearch

Dihybrid Cross Generator

Crossing one gene is a square of four cells and a ratio most people can recall without working anything out. Crossing two at once is a different exercise: each parent makes four kinds of gamete instead of two, the square has sixteen cells, and the famous nine-three-three-one only appears when both parents happen to carry one of each allele. This draws a cross of that kind at random, from real characters of real organisms, fills the square, and asks one question about what the offspring should look like. The answer is counted off the cells rather than quoted, and before it is shown it is checked against the same figure worked out the other way round — crossing each gene on its own and multiplying.

What this generator does

Picks two characters of one organism, picks a genotype for each parent, writes out the four gametes each parent can make, and fills all sixteen cells of the square. It then counts the genotypes and the appearances straight from those cells and poses one question about them. The single-gene version of this is the Punnett square generator next door, which has four cells, takes the two parents from you rather than drawing them, and describes offspring only as dominant or recessive; here the appearances are the real ones — round and wrinkled, roan and red — and a gene may be one where the heterozygote looks like neither parent.

How to use this tool

  1. Choose which organism's characters to use, and what kind of cross you want.
  2. Press the button. The two genes and the two parents are drawn for you.
  3. Work through the sixteen cells, or use the shortcut and multiply the two single-gene answers.
  4. Press Show the answer to check, and read the line underneath for where it came from.
  5. Type a seed if a whole class needs the identical question.

Understanding the controls

Traits
Mendel's seven pea characters and four fruit-fly characters are all completely dominant, so the heterozygote is indistinguishable from the homozygous dominant and a self-cross gives nine-three-three-one. The third option pairs a gene that is not fully dominant — a snapdragon's flower colour, a shorthorn's coat, an Andalusian's plumage — with a second gene of the same organism, and that changes the arithmetic: three visible classes for that gene instead of two.
Cross
Any cross draws both parents, with the restriction that both genes must actually vary among the offspring. F1 self-cross fixes both parents as carrying one of each allele, which is the cross that produces the ratio everyone is taught. Test cross fixes one parent as doubly recessive, which is what you would actually breed to find out whether an animal that looks dominant is carrying a hidden allele.
Seed (optional)
Type anything and the same cross and the same question come back, which is how everyone in a room can be set the identical problem or how a question can be recovered later. The seed is for repeatability; it is not a secret and carries no cryptographic strength.

Common use cases

  • Setting a genetics starter or exit ticket with a different cross for every attempt
  • Practising the sixteen-cell square before meeting one in an exam
  • Showing why multiplying two four-cell answers gives the same result as counting sixteen cells
  • Covering incomplete dominance and codominance, where the heterozygote looks like neither parent
  • Handing the identical question to a second class later, from its seed

How this generator works

Each parent contributes one allele of each gene to a gamete, so a parent carrying one of each allele at both genes makes four kinds, and a parent homozygous at a gene still occupies the same number of rows — that repetition is what keeps every cell of the square equally likely, and it is why the square is always sixteen cells whoever the parents are. Which cross gets drawn is not left to chance entirely. A cross is only worth setting if both genes actually vary among the offspring, and drawing freely and discarding the rest would throw away eight or nine draws in ten: measured across every possible pair of parents, only one in nine has both genes varying for the completely dominant sets, and five in twenty-seven for the partly dominant ones. So the rule is applied while the parents are chosen rather than afterwards, and nothing is ever discarded. A test cross is the exception: its first parent is certain to carry one of each allele at one gene only, so in about eight test crosses in nine the other gene comes out the same in every offspring — which is what a test cross of a true-breeding parent looks like. The answer is then counted from the finished cells, and checked against the same quantity derived a completely different way — cross each gene on its own, and multiply the two four-cell answers together. One computation counts sixteen cells; the other multiplies two fractions. They agree on every cross the controls can produce, which was confirmed by walking all 2,430 of them.

Randomness and fairness

Which two characters are used, and which genotype each parent carries, come from your browser's cryptographic random source, drawn from the combinations in which both genes vary. Giving a seed replaces that source with a repeatable one so the same question comes back; the seed is for repeatability, not cryptographic strength.

For how randomness is produced across the whole site, see how Generate Random works.

Limitations and good to know

  • Two genes, and they are assumed to assort independently — on different chromosomes, or far enough apart on one. Linked genes do not give these ratios at all, and nothing here models them.
  • The ratios are what you would expect, not what sixteen actual offspring will be. Mendel needed 556 plants to get close; a litter of eight will not look like nine-three-three-one and should not.
  • Sex linkage, lethal alleles, multiple alleles beyond a pair, epistasis and genes with more than two alleles are all outside what a square of this kind can show.
  • The characters are the textbook ones, chosen because their inheritance really is this simple. Most traits of most organisms are not, and human eye colour in particular is not a single gene with two alleles whatever a worksheet says.
  • There are 468 different crosses available across the three trait sets and three cross types, so a class working through a long sheet will meet a repeat. The question asked about each one varies further, but the cross itself will come round again.

Privacy and your data

The cross is drawn, the square filled and the answer counted entirely in your browser. Nothing you type as a seed, and no question built from it, leaves the device.

Frequently asked questions

Where does nine-three-three-one come from?
From two genes each giving three-to-one, multiplied together. Three quarters of the offspring show the first dominant character and a quarter do not; independently, three quarters show the second and a quarter do not. Multiply those out and you get nine sixteenths showing both, three sixteenths each showing one, and one sixteenth showing neither. Counting the sixteen cells gives the same thing, which is the point of filling the square.
Why does the square always have sixteen cells, even when a parent is homozygous?
Because the cells have to stay equally likely. A parent that is RRYy makes only two genuinely different gametes, RY and Ry, but it makes each of them twice as often as a parent carrying one of each allele would, so each gets two rows. Collapsing the square to the different gametes would make the cells unequal and the counts wrong.
What is the difference between incomplete dominance and codominance?
In both the heterozygote looks different from either homozygote, which is what changes the visible ratio from three-to-one to one-two-one. The difference is what you see. With incomplete dominance the two blend: a red snapdragon and a white one give pink. With codominance both show at once without blending — a shorthorn with one red allele and one white has red hairs and white hairs, which reads as roan from a distance but is not a third pigment.
What is a test cross for?
To find out what an individual is carrying when you cannot see it. Something showing a dominant character might have two dominant alleles or one of each, and no amount of looking will tell you. Cross it with a doubly recessive partner and the offspring answer the question: any recessive offspring at all means the parent was carrying a hidden recessive allele.
Why do real counts never match the ratio exactly?
Because the ratio is a probability, not a quota. Mendel's own dihybrid results were 315, 108, 101 and 32 plants against an expectation of 312.75, 104.25, 104.25 and 34.75 — close, but not equal, and only that close because he counted 556 plants. A class counting sixteen fruit flies should expect to be some way off.