ThisCalculator

Biology

Allele Frequency Calculations Explained Simply

Updated · Standard formula, shown below

Frequency of allele A 0.3000
Frequency of allele B
0.7000
Result
Copies of allele A
300 copies
You entered
Total alleles in population
1000 copies
You entered

Allele Frequency Calculations Explained Simply

An allele frequency calculation tells you how common a specific version of a gene is within a population, expressed as a proportion or percentage. You enter the number of copies of the allele you are tracking and the total number of all alleles at that gene locus, and the calculator returns the frequency. This value is the raw material for population genetics, Hardy-Weinberg equilibrium tests, and evolutionary studies.

Formula

The allele frequency (p) is the number of copies of a specific allele divided by the total number of all alleles for that gene in the population:

p = a / n

  • p = frequency of the target allele (unitless, 0 to 1)
  • a = number of copies of that allele counted in the sample (copies)
  • n = total number of alleles at that locus in the population (copies)

For a diploid organism (like humans), each individual carries two alleles per gene, so n = 2 × (number of individuals). For a haploid organism (like most bacteria), n = number of individuals. The frequency of the alternate allele (q) is simply 1 − p when only two alleles exist at that locus.

Worked Example

Using the calculator defaults: you have counted 300 copies of allele A in a population with 1,000 total alleles at that locus.

  1. Identify the target allele count: a = 300 copies
  2. Identify the total allele count: n = 1,000 copies
  3. Divide: p = 300 / 1,000 = 0.3
  4. Convert to percent: 0.3 × 100 = 30%

The frequency of allele A is 0.3 (or 30%), and the frequency of the alternate allele B is 1 − 0.3 = 0.7 (70%). The calculator rounds the first output to 4 decimal places, giving 0.3000.

Background: Why Allele Frequencies Matter

Allele frequency is the central measurement in population genetics. It was formalized in the early 20th century through the work of G.H. Hardy and Wilhelm Weinberg, who independently described how allele frequencies remain constant across generations under ideal conditions. That principle, the Hardy-Weinberg equilibrium, gives researchers a null hypothesis: if observed frequencies change over time, something is acting on the population—natural selection, mutation, migration, genetic drift, or non-random mating.

Conservation biologists use allele frequencies to assess genetic diversity in endangered species. Low diversity, indicated by few alleles or one allele dominating, signals vulnerability to disease or environmental change. Forensic scientists use allele frequencies at multiple loci to estimate how rare a DNA profile is. Plant and animal breeders track allele frequencies to select for desirable traits. In medicine, allele frequencies for disease-causing variants differ across populations, which informs genetic screening and risk assessment.

How to Count Alleles Correctly

The most common error in allele frequency work is miscounting the total. For a diploid species, each individual contributes two alleles to the gene pool. If you have 200 individuals, the total allele count is 400, not 200. To count the copies of a specific allele, you must account for both homozygotes and heterozygotes:

  • Count each homozygous individual (AA) as 2 copies of allele A
  • Count each heterozygous individual (Aa) as 1 copy of allele A
  • Count each homozygous individual (aa) as 0 copies of allele A

For example, with 50 AA, 30 Aa, and 20 aa individuals (100 total), the number of A alleles is (50 × 2) + (30 × 1) + (20 × 0) = 130. The total alleles are 100 × 2 = 200. The frequency of A is 130 / 200 = 0.65.

Common Problems and Misconceptions

A frequent misunderstanding is confusing allele frequency with genotype frequency. Genotype frequency describes the proportion of individuals with a particular genotype (e.g., AA, Aa, aa), while allele frequency describes the proportion of gene copies. They are related but not identical. For the example above, the genotype frequency of AA is 50/100 = 0.5, but the allele frequency of A is 0.65.

Another issue is assuming the sum of all allele frequencies must be 1 when more than two alleles exist. The calculator handles only two alleles (p and q). If a locus has three or more alleles, you must calculate each separately and verify they sum to 1. The formula still works for each allele individually: frequency of allele i = (copies of allele i) / (total copies of all alleles).

Rounding errors can also creep in. If you round p to 0.3 and q to 0.7, they sum to 1.0. But if you round to fewer decimal places in intermediate steps, the sum may drift. Keep full precision during calculations and round only the final reported values.

Hardy-Weinberg Equilibrium and Expected Frequencies

Once you have allele frequencies, you can predict expected genotype frequencies under Hardy-Weinberg assumptions. If p is the frequency of allele A and q is the frequency of allele a, then the expected genotype frequencies are:

  • AA = p²
  • Aa = 2pq
  • aa = q²

These expected values are then compared to observed genotype counts using a chi-square test. A significant difference suggests the population is not in equilibrium. However, equilibrium does not mean evolution is absent—it means the five assumptions (no mutation, random mating, no natural selection, large population size, no migration) are approximately met. Many real populations violate one or more, so deviations are common and informative.

For the worked example with p = 0.3 and q = 0.7, the expected genotype frequencies are AA = 0.09, Aa = 0.42, aa = 0.49. In a sample of 100 individuals, you would expect 9 AA, 42 Aa, and 49 aa if the population is in equilibrium.

Limits of the Calculation

This simple ratio assumes you have accurately sampled the population. Small sample sizes produce unreliable frequency estimates. A sample of 10 individuals (20 alleles) gives a very imprecise estimate compared to a sample of 1,000 individuals. Sampling bias—collecting more individuals from one area or one family—skews the results. The calculation also assumes you can distinguish the alleles you are counting, which requires reliable genotyping methods.

The formula gives a snapshot of one point in time. It does not tell you how fast frequencies are changing, nor does it identify the cause of change. To study dynamics, you need multiple samples over generations. Finally, the two-allele model is an oversimplification for many real genes. Blood type ABO, for example, has three common alleles (IA, IB, i), and the HLA system has dozens. For multi-allelic loci, you must compute each frequency separately and report them as a set.

Practical Applications and Real-World Context

Allele frequency data underpin many practical decisions. In conservation, managers monitor allele frequencies to detect genetic bottlenecks—events that sharply reduce population size and remove rare alleles. In agriculture, breeders track allele frequencies for disease resistance genes to ensure they do not become fixed at the expense of other traits. In human genetics, allele frequencies for conditions like cystic fibrosis (CFTR gene) or sickle cell anemia (HBB gene) vary by ancestry, and knowing these frequencies helps genetic counselors estimate carrier risk.

One well-known example is the sickle cell allele. In regions with high malaria prevalence, the frequency of the sickle cell allele can be relatively high because heterozygous carriers have some protection against malaria. In regions without malaria, the allele frequency is much lower because homozygous individuals suffer severe disease. This is natural selection acting on allele frequencies, visible in real populations.

Frequently Asked Questions

What is the difference between allele frequency and gene frequency?

They are the same thing. Both terms refer to the proportion of a specific allele among all alleles at a locus in a population. Some textbooks use “gene frequency” loosely, but the precise term is allele frequency because a gene can have many alleles.

How do I calculate allele frequency from genotype counts?

Count the number of copies of the target allele by adding twice the number of homozygous individuals to the number of heterozygous individuals. Divide by twice the total number of individuals (for diploids). For example, with 10 AA, 20 Aa, and 70 aa, the A allele count is (10×2) + 20 = 40, and the total alleles are 100×2 = 200, so the frequency is 40/200 = 0.2.

Can allele frequencies be negative?

No. Allele frequencies are proportions, so they range from 0 to 1. A frequency of 0 means the allele is absent; a frequency of 1 means it is the only allele present. Negative values indicate a counting error or an impossible input.

What if there are more than two alleles?

Calculate the frequency of each allele separately using the same formula: copies of that allele divided by total alleles. The sum of all allele frequencies will be 1. For example, with three alleles A, B, and C, compute p(A), p(B), and p(C) individually, and verify p(A) + p(B) + p(C) = 1.

Why do allele frequencies change between generations?

They change when the Hardy-Weinberg assumptions are violated. Mutation introduces new alleles, migration brings alleles in or out, natural selection favors certain alleles, genetic drift randomly changes frequencies in small populations, and non-random mating alters genotype distributions. Measuring the change helps identify which evolutionary forces are active.

Is a 50% allele frequency the same as a 50% genotype frequency?

No. A 50% allele frequency means half of the gene copies are that allele. The genotype frequencies depend on how those alleles are paired. Under Hardy-Weinberg equilibrium, if p = 0.5 and q = 0.5, the genotype frequencies are 0.25 AA, 0.50 Aa, and 0.25 aa—not 50% for any single genotype.

Related

Formula used
in a | Copies of allele A | copies | 300 | 0
in n | Total alleles in population | copies | 1000 | 0
out p | Frequency of allele A | - | a / n | 4
out q | Frequency of allele B | - | 1 - (a / n) | 4

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.