Hardy-Weinberg Calculator
Written by Thierno Sadou Diallo, formula verified per our methodology • Last checked on 9/5/2026
At Hardy-Weinberg equilibrium, the expected genotype frequencies are p² (homozygous dominant), 2pq (heterozygous), and q² (homozygous recessive), where p and q are the frequencies of the two alleles (p + q = 1). For p = 0.6, that gives 36% homozygous dominant, 48% heterozygous, and 16% homozygous recessive.
Explanation
The Hardy-Weinberg law describes the expected distribution of genotypes in a theoretical population at equilibrium, for a gene with two alleles, in the absence of selection, mutation, migration, or genetic drift. If p is the frequency of the dominant allele and q that of the recessive allele (with p + q = 1), the expected population splits into three genotypes following the expansion of (p + q)² = p² + 2pq + q² = 1: a proportion p² of homozygous dominant individuals, a proportion 2pq of heterozygotes, and a proportion q² of homozygous recessive individuals. This model serves as a theoretical reference in population genetics: a significant gap between the frequencies observed in a real population and these expected values suggests that one of the evolutionary forces excluded by the model (natural selection, genetic drift, migration, mutation, or non-random mating) is at work. This calculator starts directly from an already-known allele frequency p; in practice, this is often estimated from the genotype frequencies observed in a real sample.
Example: allele frequency p = 0.6
Inputs
Frequency of the dominant allele (p): 0.6.
Calculation
q = 1 − 0.6 = 0.4. Homozygous dominant = p² = 0.36 (36%). Heterozygous = 2pq = 2 × 0.6 × 0.4 = 0.48 (48%). Homozygous recessive = q² = 0.16 (16%).
Result
The expected population is 36% homozygous dominant, 48% heterozygous, and 16% homozygous recessive.
Frequently asked questions
What does Hardy-Weinberg equilibrium mean in practice?
It's a theoretical state where a population's allele and genotype frequencies stay stable from one generation to the next, in the absence of evolutionary forces (selection, mutation, migration, genetic drift) and under the assumption of random mating. No real population is ever perfectly at equilibrium, but this model serves as a reference for detecting and measuring the influence of these forces.
Where does the allele frequency p to enter come from?
In a real case, p and q are generally estimated by counting the alleles observed in a population sample: for example, if 100 individuals (so 200 alleles for this gene) show 120 dominant alleles and 80 recessive ones, p = 120 ÷ 200 = 0.6. This calculator starts directly from this already-calculated frequency.
Does this model work for a gene with more than two alleles?
The principle generalizes mathematically to more than two alleles (with extra terms in the expansion), but this calculator sticks to the most common case taught: a gene with two alleles, one dominant and one recessive.