Understanding science, for all. Home About
Novadette› 🧬 Biology› Genetics› Hardy–Weinberg Equilibrium
🧬 Genetics

Hardy–Weinberg Equilibrium

From one allele or genotype frequency, find all the others — for example the share of carriers of a recessive disease. Or test whether observed genotype counts fit equilibrium with a χ² test.

GeneticsPopulation GeneticsAlleles
Inputs
Input examples
Calculation
In “Frequencies”, click Use on the value you know (as a fraction or %). The others follow. Example: 1 in 2500 newborns has cystic fibrosis (q² = 0.0004).

What is Hardy–Weinberg Equilibrium?

For a gene with two alleles, A (frequency p) and a (frequency q), random mating produces the genotypes AA, Aa and aa in the proportions p² : 2pq : q². In a population that is not evolving, these frequencies stay the same generation after generation.

Recessive conditions show up only in aa individuals, but most copies of the allele hide in healthy carriers (Aa). The equation reveals how common carriers are from how often the condition appears.

p + qalways 1
q smallcarriers ≈ 2q
2pq max50% at p = q
χ² > 3.84not in equilibrium

Live Graph

p = 0.98
Result
Enter a value above

Conditions for Equilibrium

AssumptionIf violated…
No mutationnew alleles appear
Random matinggenotype ratios shift (e.g. inbreeding)
No natural selectionfavoured alleles increase
Very large populationgenetic drift changes frequencies
No migration (gene flow)alleles enter or leave

Worked Techniques

Start from the Recessive Phenotype

Only aa individuals are visibly different, so q² is usually what you can count. Take the square root to get q.

Example: 
Carrier Frequency

About 1 in 25 people carry the allele — a hundred times more than show the condition.

Example: in 10 000 people: 392 carriers, 4 affected.
χ² Goodness-of-Fit

Compare observed counts with the expected p²N, 2pqN and q²N. With one degree of freedom, χ² above 3.84 means p < 0.05: the population is likely not in equilibrium.

Example: 298 / 489 / 213 gives χ² ≈ 0.22 — consistent with equilibrium.

Sources & Verification

References
  1. G. H. Hardy, “Mendelian proportions in a mixed population”, Science 28(706), 49–50 (1908).
  2. R. R. Sokal & F. J. Rohlf, Biometry, 4th ed., W. H. Freeman, 2012 — Ch. 17 (Analysis of Frequencies).