Hardy-Weinberg Equilibrium Calculator
Calculate allele and genotype frequencies using the Hardy-Weinberg principle. Find whether a population is evolving by testing equilibrium conditions.
Hardy-Weinberg Principle Guide
The Hardy-Weinberg Equations
The Hardy-Weinberg principle predicts genotype frequencies in a non-evolving population. Two equations: p + q = 1 (allele frequencies sum to 1), and p² + 2pq + q² = 1 (genotype frequencies sum to 1). Where p = frequency of dominant allele (A), q = frequency of recessive allele (a), p² = frequency of AA homozygotes, 2pq = frequency of Aa heterozygotes (carriers), q² = frequency of aa homozygotes. If the recessive phenotype frequency is known (= q²), then q = √(q²) and p = 1 − q.
Hardy-Weinberg Assumptions
The principle holds only when these conditions are met: large population (no genetic drift), random mating (no sexual selection), no natural selection (all genotypes equally fit), no mutation, and no migration (gene flow). If observed genotype frequencies differ significantly from Hardy-Weinberg expectations, at least one of these conditions is violated — meaning the population is evolving. Testing for H-W equilibrium is the standard first step in population genetics analysis.
Calculating Carrier Frequency
One important application: estimating carrier frequency for recessive genetic conditions. Cystic fibrosis: approximately 1 in 2,500 UK births are affected (aa = q² = 1/2500). So q = 1/50 = 0.02, p = 0.98, carrier frequency = 2pq = 2 × 0.98 × 0.02 ≈ 1/25 (about 4% of the UK population). This means roughly 1 in 25 people carry one CF allele without knowing — relevant for genetic counselling and understanding why recessive conditions persist in populations despite selection against them.
Evolution and Departure from Equilibrium
Comparing observed vs expected genotype frequencies tests whether a population is evolving. Excess homozygotes relative to H-W expectation suggests: inbreeding (non-random mating), recent founder effect, or population structure. Deficit of a genotype suggests natural selection against it. Allele frequency change over generations is the fundamental definition of evolution at the population level. Hardy-Weinberg provides the null hypothesis (no evolution) against which to test observed data.
Recommended for this calculator