InfyCalculator
🧬

Hardy-Weinberg Equilibrium Calculator

Work out allele and genotype frequencies under Hardy-Weinberg equilibrium from a dominant allele frequency p or from the frequency of the recessive phenotype q².

What do you know?
Allele frequency p
Recessive phenotype frequency q²
Loading calculator…

How it works

p + q = 1 · p² + 2pq + q² = 1 · If q² known: q = √q², p = 1 − q

The Hardy-Weinberg principle predicts genotype frequencies in a large, randomly mating population with no selection, mutation or migration. The two allele frequencies p and q sum to 1, and the three genotype frequencies follow the binomial expansion p² + 2pq + q². Because the recessive phenotype only appears in aa individuals, its frequency equals q², so taking the square root recovers the recessive allele frequency even when heterozygous carriers are hidden.

Worked example

Starting from a dominant allele frequency p = 0.6, the recessive allele is q = 1 − 0.6 = 0.4. The genotype frequencies are then p² = 0.36 (AA), 2pq = 0.48 (Aa carriers) and q² = 0.16 (aa) — which sum to 1.00 as required.

Sources: Hardy–Weinberg principle — Wikipedia

Frequently asked questions

What assumptions does Hardy-Weinberg make?

It assumes a large population, random mating, and no mutation, migration, genetic drift or natural selection. Real populations rarely meet all of these perfectly, so departures from the predicted frequencies are used to detect evolutionary forces at work.

How do I use it when only carriers are hidden?

If you can measure the recessive phenotype (aa), its frequency is q². Take the square root to get q, then p = 1 − q, and 2pq gives the carrier frequency you cannot observe directly — this is how carrier rates for recessive conditions are estimated.

Why is the heterozygote frequency 2pq and not pq?

A heterozygote can form two ways — a p egg with a q sperm, or a q egg with a p sperm — so the two paths add, giving 2pq. This is the middle term of the expansion (p + q)² = p² + 2pq + q².

Related calculators

Educational estimate, not medical advice — verify formulas, units and assumptions for your specific case.