Hardy-Weinberg Equilibrium Calculator
Estimate allele frequencies p and q and the expected genotype counts under Hardy-Weinberg equilibrium from the number of recessive (homozygous) individuals in a population.
How it works
q² = recessive individuals ÷ total · q = √q² · p = 1 − q · AA = p² · Aa = 2pq · aa = q² · p + q = 1
Under Hardy-Weinberg equilibrium the recessive phenotype corresponds to the aa genotype, whose frequency is q². The recessive allele frequency is therefore the square root of the recessive-phenotype proportion, and the dominant frequency is p = 1 − q. Expanding (p + q)² gives the three genotype frequencies p², 2pq and q², which — multiplied by the population size — predict how many carriers hide behind the visible recessive count.
Worked example
If 90 of 1000 people show a recessive trait, q² = 0.09, so q = 0.30 and p = 0.70. Genotype frequencies are AA = 0.49, Aa = 0.42 and aa = 0.09, meaning about 420 heterozygous carriers exist — far more than the 90 who actually display the trait.
Sources: Hardy-Weinberg principle — Wikipedia
Frequently asked questions
What assumptions does Hardy-Weinberg make?
A large population with random mating, no mutation, no migration, no selection and no genetic drift. Real populations violate these to some degree, so treat the result as a baseline expectation rather than an exact prediction.
Why can I find q from just the recessive count?
Only the homozygous recessive genotype (aa) shows the recessive phenotype, and its frequency is q². Taking the square root of that proportion recovers q directly, which is why the recessive phenotype is the easiest genotype to count.
How many carriers are there?
Carriers are the heterozygotes, with frequency 2pq. They often vastly outnumber affected individuals — in the example above, 420 carriers versus 90 affected — which matters for genetic counselling.
Related calculators
Educational estimate, not medical or laboratory advice — verify formulas, units and assumptions for your specific protocol.