How this instrument works
The Hardy-Weinberg principle, formalized independently by mathematician Godfrey Hardy and physician Wilhelm Weinberg in 1908, describes what allele and genotype frequencies look like in a population that is not evolving. If a gene has two alleles — a dominant A at frequency p and a recessive a at frequency q, with p + q always equal to 1 — then in a large, randomly mating population free of mutation, migration and selection, the genotype frequencies settle into a fixed relationship: p² homozygous dominant (AA), 2pq heterozygous (Aa), and q² homozygous recessive (aa), with all three summing to exactly 1.
That equation, p² + 2pq + q² = 1, is really just the algebra of combining two independent probabilities: each offspring gets one allele from each parent, drawn at random with probability p for A and q for a, so the four possible combinations — AA, Aa, aA and aa — occur with probabilities p×p, p×q, q×p and q×q. Because Aa and aA are genetically identical, they combine into the single 2pq heterozygote term, leaving p² and q² as the two homozygote terms.
The real value of the equilibrium isn't predicting a static population — it's acting as a null hypothesis. Population geneticists compare a population's observed genotype counts against what Hardy-Weinberg predicts from the observed allele frequencies; a close match suggests the equilibrium conditions roughly hold, while a significant mismatch is evidence that something — nonrandom mating, a small population size, migration, mutation, or natural selection — is actively shaping the gene pool.
- Enter the dominant allele's frequency into Dominant allele frequency (p) — a decimal between 0 and 1.
- Read Recessive allele frequency (q = 1 - p) directly beneath it; the instrument computes q automatically.
- Homozygous dominant frequency (p²), Heterozygous frequency (2pq) and Homozygous recessive frequency (q²) update together and always sum to 1.
- p must stay between 0 and 1 inclusive — anything outside that range isn't a valid allele frequency and the instrument will flag it.
Worked example — dominant allele frequency p = 0.6
Enter 0.6 into Dominant allele frequency (p). Recessive allele frequency (q = 1 - p) reads 0.4. Homozygous dominant frequency (p²) computes as 0.6 × 0.6 = 0.36, Heterozygous frequency (2pq) as 2 × 0.6 × 0.4 = 0.48, and Homozygous recessive frequency (q²) as 0.4 × 0.4 = 0.16.
Check the three genotype frequencies against each other: 0.36 + 0.48 + 0.16 = 1.00 exactly, confirming the population matches Hardy-Weinberg equilibrium at these allele frequencies — 36% of individuals are expected to be AA, 48% Aa, and 16% aa.
Questions
What does it mean for a population to be in Hardy-Weinberg equilibrium?
It means the population's allele and genotype frequencies aren't changing from generation to generation because none of the five disrupting forces — mutation, migration, genetic drift (small population size), nonrandom mating, or natural selection — is acting on it. In practice, no real population meets all five conditions perfectly, so biologists use the equilibrium equation as a baseline to measure against rather than a literal description of any wild population.
Why does 2pq represent heterozygotes and not just pq?
Because there are two distinct ways to become heterozygous: receiving A from the mother and a from the father, or a from the mother and A from the father. Each combination has probability p × q, and since both produce the identical Aa genotype, their probabilities add together to 2pq. The two homozygote outcomes, AA and aa, each have only one way to occur, which is why they stay as the single terms p² and q².
Can I use this calculator if I only know q, not p?
Yes — since p and q always sum to 1 for a two-allele gene, enter 1 minus your known q value into Dominant allele frequency (p) and the instrument will recompute q, along with p², 2pq and q², from there. The labels 'dominant' and 'recessive' are just names for the two alleles; the underlying math treats them symmetrically.
Why do the three genotype frequencies always add up to 1?
Because p² + 2pq + q² is the algebraic expansion of (p + q)², and p + q equals 1 by definition — every individual carries exactly one of the two alleles at each of their two gene copies, so the frequencies of all possible genotypes must exhaust 100% of the population. If your own hand-calculated frequencies don't sum to 1, it's a sign of a rounding or arithmetic slip rather than real biology.
Does a population failing to match Hardy-Weinberg predictions mean something is wrong?
Not necessarily wrong — it means the population isn't meeting one or more of the equilibrium's idealized conditions, which is normal and often expected. Small population sizes, assortative mating, recent migration, ongoing selection, or even a genotyping error in the sampled data can all produce genotype counts that deviate from p², 2pq and q². A mismatch is a prompt to investigate which force is at work, not evidence of a flawed calculation.