Free to Use

🧬 Genetics Calculator

Calculate inheritance patterns, Punnett squares, and allele frequencies. Analyze monohybrid and dihybrid crosses with genotype/phenotype ratios and Hardy-Weinberg equilibrium.

Dominant / Recessive alleles for trait 1
Dominant / Recessive alleles for trait 2
Total count of dominant alleles in the population
Total count of recessive alleles in the population
Number of AA individuals (optional, overrides allele counts)

Real-World Genetics Examples

🧬 Monohybrid Cross — Pea Plant Flower Color

Problem: In pea plants, purple flowers (P) are dominant over white flowers (p). If two heterozygous (Pp) plants are crossed, what are the expected genotype and phenotype ratios of the offspring?

Solution: Using a Punnett square for a Pp × Pp monohybrid cross:

Parent 1 gametes: P, p  |  Parent 2 gametes: P, p

Punnett square: PP, Pp, Pp, pp

Genotype ratio: 1 PP : 2 Pp : 1 pp

Phenotype ratio: 3 Purple : 1 White

This 3:1 phenotypic ratio is characteristic of a monohybrid cross between two heterozygotes, as first described by Gregor Mendel.

🧬🧬 Dihybrid Cross — Seed Shape and Color

Problem: In pea plants, round seeds (R) are dominant over wrinkled (r), and yellow seeds (Y) are dominant over green (y). If two plants heterozygous for both traits (RrYy) are crossed, what is the expected phenotypic ratio?

Solution: Using a 4×4 Punnett square for a RrYy × RrYy dihybrid cross:

Each parent produces 4 gamete types: RY, Ry, rY, ry

Phenotype ratio: 9 Round-Yellow : 3 Round-Green : 3 Wrinkled-Yellow : 1 Wrinkled-Green

The classic 9:3:3:1 ratio emerges when both parents are heterozygous for both traits, demonstrating Mendel's Law of Independent Assortment.

📊 Hardy-Weinberg Equilibrium — Cystic Fibrosis

Problem: In a population of 10,000 people, 1 in 2,500 has cystic fibrosis (an autosomal recessive disorder). What are the allele frequencies and carrier frequency?

Solution: q² = 1/2500 = 0.0004

q = √0.0004 = 0.02 (2% recessive allele frequency)

p = 1 − q = 0.98 (98% dominant allele frequency)

Carrier frequency (2pq) = 2 × 0.98 × 0.02 = 0.0392 ≈ 3.9%

This means about 392 out of 10,000 people are carriers (heterozygous) for cystic fibrosis, even though only 4 have the disease.

🧬 Incomplete Dominance — Snapdragon Flower Color

Problem: In snapdragons, red flowers (R) and white flowers (r) show incomplete dominance, producing pink flowers in heterozygotes (Rr). If a red (RR) and a white (rr) snapdragon are crossed, what are the offspring?

Solution: Using a Punnett square for RR × rr:

All offspring are Rr (Pink)

Genotype ratio: 0 RR : 4 Rr : 0 rr

Phenotype ratio: 0 Red : 4 Pink : 0 White

In incomplete dominance, the heterozygous phenotype is intermediate between the two homozygous phenotypes, creating a 1:2:1 phenotypic ratio in F2 generations.

Genetics Formulas & Guide

Monohybrid Cross (Single Trait)

Aa × Aa → 1 AA : 2 Aa : 1 aa
Genotype ratio: 1:2:1 — Phenotype ratio: 3:1 (if complete dominance)

A monohybrid cross examines the inheritance of a single gene with two alleles. Each parent contributes one allele per gamete. The Punnett square has 4 cells (2×2). Under complete dominance, the phenotypic ratio is typically 3:1 (dominant:recessive).

Dihybrid Cross (Two Traits)

AaBb × AaBb → 9 A_B_ : 3 A_bb : 3 aaB_ : 1 aabb
Phenotype ratio: 9:3:3:1 (with complete dominance for both traits)

A dihybrid cross examines the inheritance of two genes simultaneously. Each parent produces 4 gamete combinations (e.g., AB, Ab, aB, ab). The Punnett square has 16 cells (4×4). The classic 9:3:3:1 ratio demonstrates Mendel's Law of Independent Assortment.

Hardy-Weinberg Equilibrium

p + q = 1   and   p² + 2pq + q² = 1
Allele frequency and genotype frequency equations

Where p is the frequency of the dominant allele (A), q is the frequency of the recessive allele (a), is the frequency of homozygous dominant (AA), 2pq is the frequency of heterozygous (Aa), and is the frequency of homozygous recessive (aa).

Key Genetics Concepts

📌 Dominant vs Recessive

A dominant allele (uppercase) masks the effect of the recessive allele (lowercase) when both are present. For a recessive trait to be expressed, the individual must inherit two recessive alleles (homozygous recessive).

📌 Genotype vs Phenotype

Genotype is the genetic makeup (e.g., AA, Aa, aa). Phenotype is the observable trait (e.g., purple or white flowers). Individuals with AA and Aa genotypes have the same phenotype if A is dominant over a.

📌 Homozygous vs Heterozygous

Homozygous means having two identical alleles (AA or aa). Heterozygous means having two different alleles (Aa). Heterozygotes are also called carriers if the recessive allele causes a genetic disorder.

📌 Law of Independent Assortment

Genes for different traits are inherited independently of each other during gamete formation, provided they are on different chromosomes or far apart on the same chromosome. This creates the 9:3:3:1 dihybrid ratio.

How to Use the Punnett Square

1
Identify parental genotypes: Determine the alleles each parent carries for the trait(s) of interest.
2
Determine gametes: List all possible allele combinations each parent can produce in their gametes.
3
Set up the grid: Write one parent's gametes across the top and the other parent's down the side.
4
Fill in offspring genotypes: Combine alleles from each row and column in each cell.
5
Count and ratio: Tally the genotypes and phenotypes to determine the ratios.
🧬
Monohybrid Cross
Calculate 2×2 Punnett squares for single-trait inheritance. Shows genotype and phenotype ratios with dominant/recessive classification.
🧬🧬
Dihybrid Cross
Compute 4×4 Punnett squares for two-trait crosses. Demonstrates Mendel's Law of Independent Assortment with 16-cell grids.
📊
Allele Frequency
Calculate p and q allele frequencies using Hardy-Weinberg equilibrium. Determine expected genotype frequencies from population data.
📝
Step-by-Step Solutions
Every calculation includes a detailed breakdown showing the Punnett square, gamete combinations, ratio calculations, and final results.

⚠️ Important Note: Punnett squares show probabilities of offspring genotypes and phenotypes, not guaranteed outcomes. Actual results may vary, especially in small sample sizes. Hardy-Weinberg equilibrium assumes ideal conditions (random mating, no mutation, no selection, large population size, no gene flow). Real populations rarely satisfy all conditions perfectly.

Frequently Asked Questions

What is a Punnett square and how does it work?
A Punnett square is a diagram used to predict the genotypes of offspring from a genetic cross. Named after Reginald Punnett, it works by listing all possible gametes from one parent across the top and all possible gametes from the other parent down the side. Each cell in the grid represents a possible offspring genotype formed by combining one gamete from each parent. The Punnett square shows the probability of each genotype, not the actual outcome. For a monohybrid cross (one gene), the grid is 2×2 (4 cells); for a dihybrid cross (two genes), it is 4×4 (16 cells).
What is the difference between genotype ratio and phenotype ratio?
The genotype ratio describes the relative frequencies of different genetic combinations in the offspring (e.g., 1 AA : 2 Aa : 1 aa). The phenotype ratio describes the relative frequencies of observable traits (e.g., 3 purple : 1 white). Under complete dominance, the heterozygous genotype (Aa) has the same phenotype as the homozygous dominant (AA), so the phenotypic ratio (3:1) differs from the genotypic ratio (1:2:1). Under incomplete dominance or codominance, the heterozygous phenotype is distinct, making the genotypic and phenotypic ratios identical (1:2:1).
How is allele frequency (p and q) calculated?
Allele frequency is the proportion of each allele in a population. For a gene with two alleles (A and a): p = number of A alleles / total alleles and q = number of a alleles / total alleles. Since there are only two alleles, p + q = 1. You can calculate allele frequencies from genotype counts using: p = (2×AA + Aa) / (2×total individuals) and q = (2×aa + Aa) / (2×total individuals). The Hardy-Weinberg equation (p² + 2pq + q² = 1) then predicts expected genotype frequencies under equilibrium conditions.
What does the 9:3:3:1 ratio mean in a dihybrid cross?
The 9:3:3:1 ratio is the expected phenotypic ratio from a dihybrid cross between two individuals heterozygous for both traits (AaBb × AaBb) with complete dominance. It breaks down as: 9 offspring with both dominant traits (A_B_), 3 with dominant first trait and recessive second (A_bb), 3 with recessive first trait and dominant second (aaB_), and 1 with both recessive traits (aabb). This ratio demonstrates Mendel's Law of Independent Assortment — the two genes are inherited independently, creating 16 equally likely combinations in a 4×4 Punnett square.
What is Hardy-Weinberg equilibrium and its assumptions?
Hardy-Weinberg equilibrium is a principle stating that allele and genotype frequencies in a population remain constant from generation to generation in the absence of evolutionary influences. The equation p² + 2pq + q² = 1 predicts genotype frequencies from allele frequencies. The five assumptions are: (1) random mating — no mate selection based on genotype, (2) no mutation — alleles do not change, (3) no natural selection — all genotypes have equal survival and reproduction, (4) large population size — no genetic drift, and (5) no gene flow — no migration in or out. If these conditions are violated, the population may be evolving.
How do I determine if a trait is dominant or recessive?
A trait is considered dominant if it appears in the heterozygous condition (e.g., Aa shows the dominant phenotype). A trait is recessive if it only appears when two copies of the allele are present (homozygous recessive, aa). To determine dominance experimentally, cross two true-breeding (homozygous) parents with different traits — all F1 offspring will show the dominant trait. In pedigree analysis, dominant traits appear in every generation and affected individuals have at least one affected parent, while recessive traits can skip generations and appear in offspring of unaffected carrier parents.
What is the difference between complete dominance, incomplete dominance, and codominance?
Complete dominance: The dominant allele completely masks the recessive allele in heterozygotes (Aa = same phenotype as AA). Example: Mendel's pea plant flower color. Incomplete dominance: Neither allele is dominant; the heterozygote shows an intermediate phenotype (Rr = pink, when RR = red and rr = white). Example: Snapdragon flower color. Codominance: Both alleles are fully expressed in the heterozygote without blending. Example: Human ABO blood types — individuals with genotype I^A I^B have both A and B antigens on their red blood cells (Type AB blood).