Calculate allele frequencies (p and q) from genotype counts (AA, Aa, aa) using the Hardy-Weinberg equation.
Last updated: March 2026
p = (2×AA + Aa) ÷ (2×N)
q = 1 - p
Allele frequency, also called gene frequency, represents how common a particular allele (version of a gene) is within a population. For a gene with two alleles—dominant (A) and recessive (a)—the frequencies are denoted as p and q, where p + q = 1. These frequencies are fundamental to understanding genetic variation, evolution, and inheritance patterns in populations.
The Hardy-Weinberg principle, formulated in 1908, describes the mathematical relationship between allele frequencies and genotype frequencies in a population at equilibrium. Under specific conditions (no mutation, random mating, no selection, large population, no migration), allele frequencies remain constant across generations, and genotype frequencies follow the equation: p² + 2pq + q² = 1. This principle serves as a null hypothesis for detecting evolutionary forces—deviations from expected frequencies indicate factors like natural selection, genetic drift, or non-random mating are acting on the population.
Calculating allele frequencies from genotype counts is essential in conservation biology (tracking genetic diversity in endangered species), medical genetics (estimating carrier frequencies for recessive diseases), agriculture (breeding programs), and evolutionary studies (detecting selection pressures). For example, if a recessive genetic disorder has frequency q² = 0.0001 (1 in 10,000), we can calculate q = 0.01 and p = 0.99, revealing that the carrier frequency (2pq) is approximately 0.0198 or ~1 in 50 individuals—critical information for genetic counseling.
Pro Tip: The factor of 2 in the numerator accounts for diploid organisms having two copies of each gene. AA individuals contribute 2 A alleles, while Aa individuals contribute 1 A allele.
Calculate allele frequencies for a population with 50 AA, 40 Aa, and 10 aa individuals:
The observed counts (50, 40, 10) are very close to Hardy-Weinberg expected (49, 42, 9), suggesting the population is in equilibrium with random mating and no significant evolutionary forces.
Hardy-Weinberg equilibrium describes a theoretical population where allele and genotype frequencies remain constant across generations. This requires: no mutations, random mating, no natural selection, infinitely large population, and no gene flow. Real populations rarely meet all conditions, making deviations useful for detecting evolutionary forces.
Use the formula p = (2×AA + Aa) ÷ (2×N) to find the dominant allele frequency, then calculate q = 1 - p.
p is calculated from genotype counts using allele totals, and q is found using q = 1 - p under the Hardy-Weinberg equation.
Each diploid individual has two copies of every gene. An AA individual contributes 2 A alleles to the gene pool, while an Aa individual contributes only 1 A allele. The total number of alleles in the population is 2N (twice the number of individuals), hence the denominator 2N in the frequency calculation.
Use a chi-square (χ²) goodness-of-fit test comparing observed genotype counts to Hardy-Weinberg expected counts. Calculate χ² = Σ[(observed - expected)² / expected] with 1 degree of freedom. If χ² exceeds critical value (3.841 at p=0.05), reject equilibrium—indicating evolutionary forces are acting.
Yes, but the formula becomes more complex. For three alleles (A₁, A₂, A₃) with frequencies p, q, r (where p+q+r=1), the expanded Hardy-Weinberg equation is: (p+q+r)² = p²+q²+r²+2pq+2pr+2qr = 1. Each term represents a genotype frequency.
Common causes: inbreeding (increases homozygosity, reduces heterozygotes), assortative mating (like mates with like), natural selection (favors certain genotypes), genetic drift (random changes in small populations), mutation (introduces new alleles), and gene flow (migration between populations).
There are two ways to form an Aa heterozygote: inheriting A from mom and a from dad (frequency p×q), or inheriting a from mom and A from dad (frequency q×p). These are mutually exclusive events, so we add them: pq + qp = 2pq.
If a recessive disease has incidence q² (frequency of aa affected individuals), calculate q = √(q²), then p = 1-q. Carrier frequency is 2pq. Example: If disease incidence is 1/10,000 (0.0001), then q = 0.01, p = 0.99, and carrier frequency = 2(0.99)(0.01) ≈ 0.02 or 1 in 50.
No, never. Allele frequencies are proportions and must fall between 0 and 1. If your calculation gives p or q outside this range, you've made an error—check that you're dividing by 2N (total alleles) not N (total individuals), and verify your genotype counts are correct.
Related Tools
Generate Punnett square diagrams.
Calculate dihybrid cross outcomes.
Calculate trihybrid cross outcomes.
Calculate DNA concentration from absorbance.
Calculate DNA copy number.
Convert DNA sequence to mRNA.