Home / Learn / Biology / Mendel's pea gardenTool #L58 (formerly #1124)

Mendel's pea garden: monohybrid and dihybrid crosses with random offspring, 3:1 and 9:3:3:1

Cross tall and short pea plants, or round yellow and wrinkled green seeds, and grow 20, 100 or 1000 random children. Compare the counts with 3 : 1 and 9 : 3 : 3 : 1, see the Punnett square, and at Class 12 level add incomplete dominance, codominance (ABO) and a chi-square check.

Keep it one tap away for everyday use.

Bookmark Mendel's pea garden?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. Parents
  2. Grow
  3. Count
  4. Check
Nothing is uploadedWorks offline once open
Level
Cross

Children

Download

Punnett square

Eggs down the side, pollen across the top. Each box is one equally likely child.

Try this

  • Cross pure tall with pure short. Every child is tall: where did "short" go? Now press F1 × F1.
  • Grow 20 children a few times, then 1000. Why is the 3 : 1 ratio clearer with more children?
  • Use a test cross to find out whether a tall plant is TT or Tt.
  • Class 12: cross two pink snapdragons. Why are there three colours, not two?

Check yourself

Fresh questions every time. Type fractions like 1/4 or decimals. Nothing is saved.

    What it does

    Gregor Mendel crossed pea plants and counted their children, and found that traits are passed on as pairs of “factors” (we now call them alleles of a gene). This garden lets you repeat his experiments in seconds:

    • Height (one gene, a monohybrid cross): T for tall is dominant over t for short.
    • Seeds (two genes, a dihybrid cross): R round over r wrinkled, and Y yellow over y green.
    • At Class 12 level, two more: snapdragon flowers, where neither allele is dominant (red × white gives pink), and ABO blood groups, where A and B are both seen together (codominance) and O is recessive.

    Pick two parents, choose how many children to grow, and the page draws them, counts each kind, and shows the ratio you would expect. Each child gets one allele from each parent at random, so your counts wobble around the expected ratio, just as Mendel’s did. It fits Class 10 Science: heredity (Mendel’s experiments, dominant and recessive traits, monohybrid and dihybrid crosses) and Class 12 Biology: principles of inheritance and variation (incomplete dominance, codominance, multiple alleles and testing ratios). Draw any cross up to four genes with punnett square, test your own counts with mendelian chi-square test, see where the genes sit in the cell explorer, and follow alleles in a whole population with hardy-Weinberg tester.

    How to use it

    1. Pick the level and the cross.
    2. Pick the parents from the lists, or tap a quick cross: pure × pure (the P generation), F1 × F1 (to get the F2), or a test cross with the recessive parent.
    3. Pick how many children (20, 100 or 1000). Grow again makes a fresh random batch.
    4. Read the counts. The table shows each look (phenotype), how many you got, the expected chance and the expected count. The line below gives the expected genotypes.
    5. Punnett square: the parents’ gametes and every equally likely child.
    6. Class 12: chi-square check. χ² = Σ (O − E)² ÷ E with your counts filled in, the degrees of freedom and the p-value. If p is 0.05 or more, your counts fit the expected ratio.
    7. Check yourself gives fresh questions each time. Type fractions like 1/4 or decimals.

    Worked example

    Tap Pure tall × pure short (TT × tt): every child is Tt and tall. Now tap F1 × F1 (Tt × Tt). The Punnett square shows TT, Tt, Tt and tt, so the expected ratio is 3 tall : 1 short, and with 100 children you expect 75 and 25. A typical run gives something like 77 : 23. At Class 12 level the page works out χ² = (77 − 75)² ÷ 75 + (23 − 25)² ÷ 25 = 0.053 + 0.160 = 0.213 with 1 degree of freedom, p = 0.644: a good fit. For seeds, F1 × F1 (RrYy × RrYy) gives the famous 9 : 3 : 3 : 1.

    Tips

    • Small numbers mislead. With 20 children, 3 : 1 often looks like 2 : 1 or 4 : 1. Grow 1000 to see the ratio settle.
    • A p-value below 0.05 happens about 1 time in 20 even when the ratio is right. Grow again before you decide.
    • A test cross with tt shows what a tall plant hides: if any child is short, the tall parent was Tt.

    FAQ

    Why does F1 show only one parent’s trait? The dominant allele hides the recessive one in Tt. The recessive trait comes back in the F2 when a child gets t from both parents.

    Why are pink snapdragons 1 : 2 : 1, not 3 : 1? With incomplete dominance the heterozygote looks different, so each genotype has its own look.

    Is this real data? No, the children are made by the computer from the rules. Use it to see how chance and ratios work.

    Where the numbers come from

    • Mendel's laws of segregation and independent assortment, incomplete dominance and ABO codominance are standard genetics; the crosses are written by fibub and checked in the tests against a brute-force Python enumeration with exact fractions.
    • Chi-square p-values use the regularised incomplete gamma function, checked against standard critical values (3.841 for 1 degree of freedom, 7.815 for 3) and Mendel's own published seed counts as a worked case.
    • Allele letters and trait names (tall/short, round/wrinkled, yellow/green peas, red/white snapdragons) are general textbook knowledge. Drawings are fibub's own. Nothing you enter is stored or sent anywhere.

    Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

    Last updated 2026-11-09.

    Change log for Mendel's pea garden

    1. Add #1124 Mendel's pea garden Details on GitHub

    Every change to fibub

    Related tools

    Punnett square #T202 Draw a Punnett square for 1 to 4 genes (complete, incomplete and codominant dominance, ABO blood groups, X-linked traits) and get the genotype and phenotype ratios as exact fractions. Use the branch method for up to 6 genes, the binomial rule for several children, and a Bayes table for carrier risk in a family. For learning, not genetic counselling. Mendelian chi-square test #T203 Check whether the offspring of a cross fit a Mendelian ratio such as 3:1, 1:2:1, 9:3:3:1, 9:3:4, 12:3:1, 15:1, 1:1, 1:1:1:1 or your own. Get expected counts, chi-square, degrees of freedom, the p-value, which classes drive the result, a warning for small expected counts, and an exact binomial or multinomial test. Hardy-Weinberg tester #T206 Test whether one sample's genotype counts fit Hardy-Weinberg proportions. Gives allele frequencies, observed and expected heterozygosity, the inbreeding coefficient F, chi-square with optional continuity correction, and the exact test (two-sided and one-sided), with a de Finetti diagram. Also handles three or more alleles by chi-square. Cell explorer #L57 Tap the parts of a plant cell, an animal cell and a bacterium to see what each one does, zoom in, compare the three cells in a table and work out how much the drawing is magnified. Class 9 and Class 11 levels, with quick questions. Central dogma lab #L59 See a gene's coding strand, template strand, mRNA and amino acids codon by codon with the standard genetic code. Tap a base to change, insert or delete it, and find out whether the change is silent, missense, nonsense or a frameshift. Natural selection #L60 Birds eat the moths they can see. Turn the bark dark with soot or light with clean air and watch dark and light moths rise and fall over 60 generations, with chance (drift) in small populations and, at Class 12 level, p, q and a Hardy-Weinberg check. Cell division #L66 Step through mitosis and meiosis with a few coloured chromosomes, see the chromosome number and DNA amount at every stage, shuffle the meiosis line-up, and count dividing cells in a virtual onion root tip to find the mitotic index. Flower pollination #L149 Tap the parts of a flower cut down the middle (sepal, petal, anther, filament, stigma, style, ovary, ovule) to learn each job, play find-the-part, and step from self- or cross-pollination to fertilisation, seed and fruit. Class 12 adds double fertilisation. Floral formula #L243 Choose a flower's symmetry and sex, type its sepals, petals, stamens and carpels (free or joined, in groups such as 1+2+(2)), tick stamens on the petals and pick the ovary position. Get the floral formula in proper notation and a floral diagram drawn from it, with the mustard, pea, potato and lily families ready to explore. Life cycle wheel #L245 Step round the life cycle of a green alga, a moss, a fern, a pine and a flowering plant (and a human for comparison) on a wheel coloured haploid (n) and diploid (2n), with meiosis and fertilisation marked. See which generation dominates, whether fertilisation needs water, and why the patterns are called haplontic, haplo-diplontic and diplontic. Double fertilisation stepper #L287 Step through the ovule: the megaspore mother cell, meiosis, three mitoses to the 7-celled, 8-nucleate embryo sac, then the pollen tube, two male gametes, syngamy (zygote, 2n) and triple fusion (endosperm, 3n). A ploidy counter gives chromosome numbers for pea, onion, maize, rice or wheat. Pedigree analyser #L288 Tap the people in a three-generation family tree to mark who has a trait, and see at once which inheritance patterns fit: autosomal dominant or recessive, X-linked dominant or recessive, or Y-linked. Each ruled-out pattern gives the family that breaks it, and the tree marks who must be a carrier. Made-up teaching families only.

    Also related: Polygenic traits, Meselson-Stahl experiment, Geological time, Sex determination