Hardy-Weinberg Equilibrium Calculator
Enter one allele frequency (or a genotype frequency) to calculate the expected genotype frequencies under Hardy-Weinberg equilibrium.
Last updated: September 22, 2026
Frequently asked questions
What is the Hardy-Weinberg equation?
p² + 2pq + q² = 1, where p and q are the frequencies of two alleles at a gene (p + q = 1). p² is the frequency of homozygous dominant individuals, 2pq is heterozygous, and q² is homozygous recessive.
If the dominant allele frequency (p) is 0.7, what are the genotype frequencies?
q = 1 − 0.7 = 0.3. p² = 0.49 (49% homozygous dominant), 2pq = 0.42 (42% heterozygous), q² = 0.09 (9% homozygous recessive).
How do I find allele frequencies if I only know the recessive phenotype frequency?
The recessive phenotype frequency equals q² (only homozygous recessive individuals show the recessive trait), so take its square root to get q, then p = 1 − q.
What assumptions does Hardy-Weinberg equilibrium require?
No mutation, no migration, no natural selection, random mating, and an infinitely large population (no genetic drift) - real populations rarely meet all these perfectly, so Hardy-Weinberg serves as a theoretical baseline to detect when evolution is happening, by comparing observed frequencies to the expected equilibrium.
Can I calculate genotype frequencies starting from the heterozygous (2pq) frequency instead?
It's harder because 2pq maps to two different p values (p and q are interchangeable in that term) - most calculators, including this one, expect you to start from p, q, or one of the homozygous frequencies (p² or q²), which each correspond to a single, unambiguous allele frequency.
What does it mean if my observed genotype frequencies don't match the Hardy-Weinberg prediction?
It suggests the population isn't in equilibrium - one of the assumptions (random mating, no selection, no migration, no mutation, large population) is being violated, which is exactly why biologists use Hardy-Weinberg as a null hypothesis to detect evolutionary forces at work.
If 9% of a population shows a recessive trait, what are p and q?
q² = 0.09, so q = √0.09 = 0.3, and p = 1 − 0.3 = 0.7. That means 49% are homozygous dominant and 42% are heterozygous carriers of the recessive allele.
I have actual genotype counts from a sample, not an assumed allele frequency - is this the right tool?
Not directly - this calculator starts from an assumed allele frequency (or one genotype frequency) and predicts expected genotype frequencies under equilibrium. If you have real counts of AA, Aa, and aa individuals and want their observed allele frequencies, use the Allele Frequency Calculator instead - then bring those p and q values back here to see whether your sample matches Hardy-Weinberg expectations.