Allele Frequency Calculator
Free Allele frequency Calculator for genetics. Enter variables to compute results with formulas and detailed steps. See charts, tables, and visual results.
Formula
p = (2 x AA + Aa) / (2 x N) ; q = (2 x aa + Aa) / (2 x N) ; p + q = 1
Where p is the frequency of the dominant allele, q is the frequency of the recessive allele, AA is the count of dominant homozygous individuals, Aa is heterozygous count, aa is recessive homozygous count, and N is total individuals. For Hardy-Weinberg equilibrium, expected genotype frequencies are p squared, 2pq, and q squared.
Worked Examples
Example 1: MN Blood Group Allele Frequencies
Problem: In a population of 1,000 people, 360 have genotype MM, 480 have MN, and 160 have NN. Calculate the allele frequencies of M and N.
Solution: Total alleles = 1,000 x 2 = 2,000\nFrequency of M (p) = (2 x 360 + 480) / 2,000 = 1,200 / 2,000 = 0.60\nFrequency of N (q) = (2 x 160 + 480) / 2,000 = 800 / 2,000 = 0.40\nCheck: p + q = 0.60 + 0.40 = 1.00
Result: p(M) = 0.60, q(N) = 0.40
Example 2: Testing for Hardy-Weinberg Equilibrium
Problem: Observed: 50 AA, 40 Aa, 10 aa (total 100). Is this population in HWE?
Solution: p = (2x50 + 40) / 200 = 0.70, q = 0.30\nExpected: AA = 0.49 x 100 = 49, Aa = 0.42 x 100 = 42, aa = 0.09 x 100 = 9\nChi-square = (50-49)^2/49 + (40-42)^2/42 + (10-9)^2/9 = 0.0204 + 0.0952 + 0.1111 = 0.2268\n0.2268 < 3.841 critical value
Result: Chi-square = 0.2268, population IS in Hardy-Weinberg equilibrium (p > 0.05)
Frequently Asked Questions
What is allele frequency and why does it matter?
Allele frequency is the proportion of a specific allele (variant of a gene) within a population's gene pool. It is calculated by counting the number of copies of that allele and dividing by the total number of alleles at that locus in the population. Allele frequencies are fundamental to population genetics because changes in these frequencies over generations indicate evolution. If allele frequencies remain constant, the population is said to be in Hardy-Weinberg equilibrium, meaning no evolutionary forces are acting on that gene.
How do you calculate allele frequency from genotype counts?
To calculate allele frequency, count the total number of each allele in the population. For a two-allele system (A and a): the frequency of A (p) = (2 x number of AA individuals + number of Aa individuals) / (2 x total individuals). Similarly, q = (2 x number of aa individuals + number of Aa individuals) / (2 x total individuals). The factor of 2 accounts for diploid organisms carrying two alleles per locus. The frequencies p and q must always sum to 1.0, which serves as a useful check on your calculations.
What does the chi-square test tell us about allele frequencies?
The chi-square goodness-of-fit test compares observed genotype counts with those expected under Hardy-Weinberg equilibrium. A chi-square value less than 3.841 (the critical value at 1 degree of freedom and alpha = 0.05) means the population does not significantly deviate from HWE. A value above this threshold suggests evolutionary forces such as natural selection, genetic drift, non-random mating, or migration may be influencing the allele frequencies. This test is one of the most commonly used statistical tools in population genetics research.
Can allele frequency change over time?
Yes, allele frequencies change over time through several mechanisms collectively known as evolutionary forces. Natural selection favors alleles that increase fitness, causing their frequency to rise. Genetic drift causes random changes in small populations. Mutation introduces new alleles at very low rates. Gene flow (migration) between populations can introduce or remove alleles. Non-random mating (such as inbreeding or assortative mating) changes genotype frequencies without directly altering allele frequencies. Tracking these changes across generations is central to the study of evolution and conservation biology.
How do I get the most accurate result?
Enter values as precisely as possible using the correct units for each field. Check that you have selected the right unit (e.g. kilograms vs pounds, meters vs feet) before calculating. Rounding inputs early can reduce output precision.
Can I share or bookmark my calculation?
You can bookmark the calculator page in your browser. Many calculators also display a shareable result summary you can copy. The page URL stays the same so returning to it will bring you back to the same tool.