Mendelian Genetics Calculator — Punnett Square and Inheritance Ratios
Gregor Mendel's experiments with pea plants in the 1860s established the mathematical laws of inheritance. The Punnett square is the standard tool for predicting offspring genotypes and phenotypes from a genetic cross. The Mendelian genetics calculator on PublicSoftTools generates Punnett squares for monohybrid and dihybrid crosses and calculates genotype and phenotype ratios automatically.
Mendel's Laws of Inheritance
| Law | Principle | Example |
|---|---|---|
| Law of Segregation (First Law) | Each organism has two alleles for each gene; these separate during gamete formation, so each gamete carries one allele. | A plant heterozygous for flower colour (Pp) produces two types of gametes: P and p, in equal proportions. |
| Law of Independent Assortment (Second Law) | Alleles for different genes are distributed to gametes independently of each other (applies to genes on different chromosomes). | A PpYy plant produces PY, Py, pY, and py gametes in equal proportions (9:3:3:1 phenotype ratio in F2). |
| Law of Dominance | When an organism is heterozygous for a trait, only the dominant allele is expressed in the phenotype. | A Pp plant has purple flowers — P dominates p. Only pp plants have white flowers. |
How to Use the Mendelian Genetics Calculator
- Open the Mendelian genetics calculator.
- Select cross type: monohybrid (one gene) or dihybrid (two genes).
- Enter the parent genotypes using standard notation: uppercase for dominant allele (e.g., A), lowercase for recessive (e.g., a). Example: Aa × Aa for a monohybrid cross.
- Optionally, enter the trait descriptions (what A represents, what a represents, e.g., A = tall, a = short).
- Click Calculate. The tool draws the Punnett square and displays genotype frequencies, phenotype ratios, and probability of each outcome.
Genetic Cross Ratios
| Cross type | Genotype ratio | Phenotype ratio | Notes |
|---|---|---|---|
| Pp × Pp (monohybrid) | PP : Pp : pp = 1 : 2 : 1 | Dominant : recessive = 3 : 1 | Classic F2 ratio from two heterozygous parents |
| Pp × pp (testcross) | Pp : pp = 1 : 1 | Dominant : recessive = 1 : 1 | Testcross reveals unknown parent genotype; used in genetics research |
| PP × pp (complete dominance) | All Pp | All dominant (purple) | All F1 offspring heterozygous and show dominant trait |
| PpYy × PpYy (dihybrid) | 9 genotype classes (PPYY, PPYy, PPyy, etc.) | P_Y_ : P_yy : ppY_ : ppyy = 9 : 3 : 3 : 1 | Requires 4×4 Punnett square; P = purple/white, Y = round/wrinkled |
| Incomplete dominance (e.g., Rr × Rr) | RR : Rr : rr = 1 : 2 : 1 | Red : Pink : White = 1 : 2 : 1 (no 3:1 ratio) | Heterozygote shows intermediate phenotype; common in flower colour |
| Codominance (e.g., I^A I^B) | I^A I^A : I^A I^B : I^B I^B | Type A : Type AB : Type B | Both alleles expressed simultaneously; ABO blood type example |
Key Genetic Terminology
Alleles, genotype, and phenotype
An allele is one version of a gene. Most diploid organisms have two alleles for each gene — one inherited from each parent. The genotype is the genetic makeup (e.g., Pp). The phenotype is the observable trait expressed (e.g., purple flowers).
Notation convention: dominant alleles are represented by uppercase letters; recessive alleles by the same letter in lowercase. A dominant allele masks the recessive allele when present (in PP or Pp genotypes).
Homozygous and heterozygous
A homozygous dominant organism (PP) has two identical dominant alleles. A homozygous recessive organism (pp) has two identical recessive alleles. A heterozygous organism (Pp) has one dominant and one recessive allele and shows the dominant phenotype.
Dominant and recessive
An allele is dominant if its phenotype is expressed when present in one or two copies (PP or Pp). An allele is recessive if its phenotype is only expressed when present in two copies (pp). Dominant/recessive is a relationship between alleles of the same gene — it describes which allele's effect is seen, not which allele is "better" or more common in the population.
Building a Punnett Square
For a monohybrid cross (Pp × Pp):
- Write the gametes of Parent 1 across the top: P and p
- Write the gametes of Parent 2 down the side: P and p
- Fill each cell by combining the column letter and row letter: PP, Pp, Pp, pp
- Count genotypes: 1 PP : 2 Pp : 1 pp
- Count phenotypes: 3 purple (PP or Pp) : 1 white (pp)
For a dihybrid cross (PpYy × PpYy), the Punnett square is 4×4 = 16 cells. Each parent produces 4 gamete types (PY, Py, pY, py). The classic 9:3:3:1 phenotype ratio results from these crosses when both genes follow complete dominance.
Extensions Beyond Simple Mendelian Genetics
Incomplete dominance
When neither allele is fully dominant, the heterozygote shows an intermediate phenotype. Snapdragon flower colour is a classic example: RR = red, Rr = pink, rr = white. The phenotype ratio is 1:2:1 (not 3:1), matching the genotype ratio.
Codominance
Both alleles are expressed simultaneously in the heterozygote. The best-known human example is ABO blood type: I^A and I^B alleles are codominant — people with I^A I^B genotype have blood type AB, expressing both A and B antigens.
Sex-linked inheritance
Genes on the X chromosome (X-linked genes) follow different inheritance patterns. Males (XY) are hemizygous — they have only one copy of X-linked genes, so a single recessive allele on the X chromosome is expressed. This is why X-linked recessive conditions (colour blindness, haemophilia) are more common in males: females (XX) need two copies of the recessive allele to express the condition.
Linked genes and recombination
Mendel's Second Law (Independent Assortment) applies only to genes on different chromosomes. Genes located close together on the same chromosome tend to be inherited together (genetic linkage). Crossing over during meiosis can separate linked genes — the frequency of recombination is proportional to the physical distance between genes (used to build genetic maps).
Mendel's Pea Plant Traits
Mendel chose seven traits in garden peas (Pisum sativum), each controlled by a single gene with two alleles:
- Seed colour: yellow (Y) dominant over green (y)
- Seed shape: round (R) dominant over wrinkled (r)
- Pod colour: green (G) dominant over yellow (g)
- Pod shape: inflated (I) dominant over constricted (i)
- Flower colour: purple (P) dominant over white (p)
- Flower position: axial dominant over terminal
- Plant height: tall (T) dominant over short (t)
Fortunately for Mendel, the seven genes he studied happened to be on different chromosomes (or far enough apart to segregate independently), allowing clean 9:3:3:1 ratios in dihybrid crosses. Had he chosen linked genes, his results would have been far more complicated to interpret.
Common Questions
What does a testcross tell you?
A testcross crosses an organism with an unknown genotype against a homozygous recessive individual (pp or aabb). If the unknown is homozygous dominant (PP), all offspring show the dominant phenotype. If the unknown is heterozygous (Pp), offspring appear in a 1:1 ratio (dominant : recessive). The testcross reveals the underlying genotype that phenotype alone cannot distinguish.
What is the probability of a recessive genetic condition in offspring?
If both parents are carriers of a recessive condition (Aa × Aa), there is a 25% (1 in 4) chance of an affected child (aa) per pregnancy, a 50% chance of a carrier (Aa), and a 25% chance of a non-carrier dominant (AA). This probability applies independently to each pregnancy — having three carrier children does not increase or decrease the probability for the fourth child.
Is Mendelian genetics the whole story?
No. Many traits are polygenic — controlled by multiple genes (height, skin colour, intelligence). Others are influenced by environment. Epistasis occurs when one gene modifies the expression of another. Maternal effects, genomic imprinting, and epigenetics add further complexity. Mendelian genetics describes the inheritance of single-gene traits well but is a simplified model for most complex traits.
Calculate Genetic Crosses
Enter parent genotypes to generate a Punnett square and calculate genotype and phenotype ratios for any monohybrid or dihybrid cross.
Open Mendelian Genetics Calculator