Hardy-Weinberg Calculator

Find allele and genotype frequencies — from a known allele frequency, or from real genotype counts — and test whether a population is in Hardy-Weinberg equilibrium. Every step shown.

q (recessive allele) = 1 − p is calculated automatically.

p (dominant allele)
q (recessive allele)

How the Hardy-Weinberg equation works

Hardy-Weinberg describes a population that is not evolving. With two alleles, their frequencies add to one: p + q = 1. The genotype frequencies then follow p² + 2pq + q² = 1, where p² is the homozygous dominant fraction, 2pq is the heterozygous fraction, and q² is the homozygous recessive fraction. A common exam move is to start from the recessive phenotype: if q² is known, then q = √(q²), p = 1 − q, and you can predict every genotype. When you have real counts, calculate the allele frequencies as p = (2 × AA + Aa) / (2N), compare the observed genotype counts to the expected ones, and use a chi-square test (critical value 3.84 for 1 degree of freedom at α = 0.05) to decide whether the population departs from equilibrium.

Related tools: DNA → protein translation · all biochem tools.