biology calculators

Allele Frequency Calculator

Compute the frequency of a specific allele in a population from counts of each genotype (AA, Aa, aa). Commonly used in population genetics and Hardy-Weinberg equilibrium studies.

About this calculator

Allele frequency measures how common a particular allele is within a population's gene pool. For a two-allele system (A and a), each individual carries two alleles, so a population of N individuals has 2N total alleles. Homozygous AA individuals contribute 2 copies of allele A, heterozygous Aa individuals contribute 1 copy, and homozygous aa individuals contribute 0 copies of A. The frequency of allele A (often denoted p) is: p = (2·AA + Aa) / (2·(AA + Aa + aa)). The frequency of allele a is simply q = 1 − p. These frequencies are foundational for testing Hardy-Weinberg equilibrium, detecting selection, and understanding population structure.

How to use

Suppose you genotype 200 individuals: 120 are AA, 60 are Aa, and 20 are aa. Enter 120, 60, and 20 into the respective fields. Total alleles = 2 × (120 + 60 + 20) = 400. Allele A copies = (2 × 120) + 60 = 300. Frequency of A = 300 / 400 = 0.75, or 75%. Frequency of a = 1 − 0.75 = 0.25, or 25%. You can now use these values to test whether the population is in Hardy-Weinberg equilibrium by comparing observed vs. expected genotype frequencies.

Frequently asked questions

What is the difference between allele frequency and genotype frequency in population genetics?

Allele frequency refers to the proportion of a specific allele among all alleles at a locus in a population, while genotype frequency refers to the proportion of individuals with a specific genotype. For example, if p = 0.6 (allele A frequency) and q = 0.4 (allele a frequency), then under Hardy-Weinberg equilibrium the expected genotype frequencies are p² = 0.36 for AA, 2pq = 0.48 for Aa, and q² = 0.16 for aa. Allele frequencies are more stable across generations under ideal conditions, making them the primary unit of analysis in population genetics.

How do allele frequencies change over time in a population?

Allele frequencies change due to evolutionary forces including natural selection, genetic drift, mutation, gene flow, and non-random mating. Natural selection increases the frequency of beneficial alleles and decreases harmful ones. Genetic drift causes random fluctuations, especially in small populations, and can fix or eliminate alleles by chance. Mutation introduces new alleles at low rates, while gene flow (migration) can rapidly introduce or remove alleles. Tracking these changes over generations is central to understanding evolution.

How can I use allele frequency to test Hardy-Weinberg equilibrium?

Once you have allele frequencies p and q, you can predict expected genotype frequencies under Hardy-Weinberg equilibrium: p² for AA, 2pq for Aa, and q² for aa. Multiply these by the total sample size to get expected counts, then perform a chi-square goodness-of-fit test comparing observed to expected counts. A significant chi-square result (typically p < 0.05) suggests the population is not in equilibrium, implying one or more evolutionary forces are acting. This test is widely used in genetics studies as an initial diagnostic check.