Calculate allele and genotype frequencies using the Hardy-Weinberg equilibriu...
Enter either an allele frequency (p or q) or a genotype frequency (such as q² from observed homozygous recessive individuals). The calculator applies the two core equations — p + q = 1 for allele frequencies and p² + 2pq + q² = 1 for genotype frequencies — to derive all remaining values automatically from your single input.
Understanding allele distributions in populations underpins modern evolutionary biology, conservation planning, and medical genetics. Hardy-Weinberg analysis reveals whether a population is evolving by comparing observed genotype counts to expected equilibrium values, helping researchers identify selection pressures, genetic drift, or non-random mating patterns in real-world populations.
Allele frequencies (p and q) describe how common each variant is in the gene pool, while genotype frequencies (p², 2pq, q²) describe the proportion of individuals with each genetic combination. A small change in allele frequency can produce a large shift in genotype distribution, which is why tracking both levels is essential for accurate genetic analysis.
Start with the most reliable data point you have — typically the frequency of the homozygous recessive phenotype, since it maps directly to q². Remember that real populations rarely meet all five equilibrium assumptions perfectly, so treat your results as useful approximations rather than exact predictions when applying them to field data.
The Hardy-Weinberg principle states that allele and genotype frequencies in a population will remain constant from generation to generation in the absence of other evolutionary influences. Named after G.H. Hardy and Wilhelm Weinberg, who independently derived the principle in 1908, it serves as a null hypothesis in population genetics.
p + q = 1
Allele frequencies
p² + 2pq + q² = 1
Genotype frequencies
Where:
For a population to be in Hardy-Weinberg equilibrium, five conditions must be met:
Deviation from Hardy-Weinberg equilibrium indicates that evolution IS occurring in a population. By comparing observed vs. expected genotype frequencies, scientists can detect selection, non-random mating, or other evolutionary forces at work.
Calculating Carrier Frequency: For recessive genetic disorders, the carrier frequency is 2pq. For example, if cystic fibrosis occurs in 1 in 2,500 births (q² = 0.0004), then q = 0.02 and p = 0.98. The carrier frequency is 2pq = 2(0.98)(0.02) ≈ 1 in 25 people.
Hardy-Weinberg equilibrium is a principle in population genetics stating that allele and genotype frequencies in a population remain constant from generation to generation when no evolutionary forces are acting. It provides a mathematical baseline described by two equations: p + q = 1 for allele frequencies and p-squared + 2pq + q-squared = 1 for genotype frequencies. Deviations from these expected frequencies indicate that evolution is occurring through mechanisms like natural selection, genetic drift, mutation, migration, or non-random mating.
The five conditions are: (1) no natural selection, meaning all genotypes have equal fitness; (2) random mating, where mate choice is independent of genotype; (3) no mutation, so no new alleles are created; (4) infinitely large population size, eliminating genetic drift; and (5) no gene flow, meaning no migration into or out of the population. In reality, no natural population perfectly meets all five conditions, so Hardy-Weinberg serves as a null hypothesis against which real populations are compared.
Start with the frequency of the homozygous recessive phenotype, since it directly corresponds to q-squared. Take the square root to find q (the recessive allele frequency), then calculate p = 1 - q. For example, if 1 in 2,500 people show a recessive condition, q-squared = 0.0004, so q = 0.02 and p = 0.98. From there, calculate genotype frequencies: homozygous dominant (p-squared), heterozygous carriers (2pq), and homozygous recessive (q-squared).