Solve Hardy-Weinberg problems step by step. Start from the frequency of the recessive phenotype (q²), from an allele frequency, or from observed genotype counts, and get p, q, p², 2pq, q², the number of carriers, and a chi-square test for equilibrium.
Hardy-Weinberg equations
Worked example: cystic fibrosis carriers
About 1 in 2,500 babies of European descent has cystic fibrosis, so q² = 0.0004 and q = √0.0004 = 0.02. Then p = 0.98 and the carrier frequency is 2pq = 2 × 0.98 × 0.02 = 0.0392, about 1 person in 25.
From counts: 360 AA, 480 Aa and 160 aa (N = 1,000) give p = (720 + 480) / 2,000 = 0.6. The expected numbers are 360, 480 and 160, so χ² = 0 and the population is in equilibrium.
Assumptions of Hardy-Weinberg equilibrium
| Assumption | What breaks it |
|---|---|
| Large population | Genetic drift in small populations |
| Random mating | Inbreeding, assortative mating |
| No mutation | New alleles appearing |
| No migration | Gene flow in or out |
| No natural selection | Some genotypes surviving or breeding better |
Frequently asked questions
What do p and q stand for?
p is the frequency of the dominant allele and q is the frequency of the recessive allele. Together they add up to 1.
How do I find q from the recessive phenotype?
The recessive phenotype frequency equals q², so take its square root. If 4% show the trait, q = √0.04 = 0.2.
How do I calculate the frequency of carriers?
Carriers are heterozygotes, so their frequency is 2pq. Multiply by the population size for the number of carriers.
How do I test for Hardy-Weinberg equilibrium?
Enter the observed genotype counts. The calculator compares them with p²N, 2pqN and q²N using chi-square with 1 degree of freedom.
Why is there only 1 degree of freedom?
There are 3 genotype classes, minus 1 because the total is fixed, minus 1 because p was estimated from the data.
Related tools
Free educational tool by HawkInc. Results are calculated in your browser and rounded for display; check critical work by hand or with a second method.