What this calculator does
Hardy-Weinberg describes what allele and genotype frequencies look like in a population where nothing is changing them. Given the recessive allele frequency q, the dominant frequency p is 1 − q, and the three genotypes fall out as p² for AA, 2pq for Aa and q² for aa.
Its real use is as a null model. A population that matches the expected frequencies is not evolving at that locus; one that departs from them is being acted on by something, whether selection, migration, drift, non-random mating or mutation. The departure is the finding, not the match.
The formula
The dominant allele frequency p is 1 minus the recessive frequency q. Squaring p gives the expected proportion of homozygous dominant individuals, squaring q gives homozygous recessive, and twice p times q gives heterozygotes. The three sum to 1 by construction, which is why the equation is written as p² + 2pq + q² = 1.
| Term | Meaning |
|---|---|
| p | Frequency of the dominant allele. |
| q | Frequency of the recessive allele, with p + q = 1 for a two-allele locus. |
| 2pq | Expected heterozygote frequency. The factor of two is because Aa and aA are the same genotype. |
| Equilibrium | The state in which frequencies stay constant across generations, requiring no selection, no migration, no mutation, random mating and infinite population size. |
The inputs explained
| Field | What to enter |
|---|---|
| Frequency of the recessive allele (q) | The recessive allele frequency, between 0 and 1. Where only the recessive phenotype frequency is known, q is its square root, since only aa individuals show it. |
When to use it
Estimating carrier frequency
For a recessive condition, the observed disease frequency is q², so q is its square root and the carrier frequency 2pq follows. Carriers almost always outnumber affected individuals by a wide margin.
Testing whether a population is in equilibrium
Comparing observed genotype counts against the expected frequencies is the standard first test for whether something is acting on a locus.
Working through a genetics problem
Hardy-Weinberg questions typically give one frequency and ask for the others, which is exactly the calculation here.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
What genotype frequencies does each allele frequency give?
A range of recessive allele frequencies with the resulting genotype proportions.
| Recessive allele frequency (q) | Homozygous dominant (AA) | Heterozygous (Aa) | Homozygous recessive (aa) | Dominant allele frequency (p) |
|---|---|---|---|---|
| 0.1 | 81.0% | 18.0% | 1.00% | 0.9000 |
| 0.3 | 49.0% | 42.0% | 9.00% | 0.7000 |
| 0.5 | 25.0% | 50.0% | 25.0% | 0.5000 |
| 0.7 | 9.00% | 42.0% | 49.0% | 0.3000 |
Questions
What are the assumptions of Hardy-Weinberg?
No selection, no mutation, no migration, random mating and an infinitely large population. No real population satisfies all five, which is the point: the model describes what would happen if nothing were acting, so departures from it reveal what is.
How do I find q if I only know the disease frequency?
Take the square root. Only homozygous recessive individuals show a recessive condition, so the observed frequency is q². A condition affecting 1 in 10,000 gives q² = 0.0001, so q = 0.01, and the carrier frequency 2pq is then about 0.0198, or roughly 1 in 50.
Why are there always more carriers than affected individuals?
Because 2pq exceeds q² whenever q is below about one third, and for rare alleles it exceeds it enormously. At q = 0.01 the ratio is nearly 200 to 1. This is why rare recessive conditions persist in populations despite being selected against.
What does it mean if a population is not in equilibrium?
That something is acting on the locus. Common causes are selection, inbreeding or other non-random mating, migration bringing in different frequencies, or genetic drift in a small population. Identifying which requires more than the frequencies alone.
To work out allele frequencies from observed genotype counts first, see the allele frequency calculator. For probabilities across several independent gene pairs, see the multi-gene cross calculator.