Skip to main content

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.

Skip to calculator
Biology

Allele Frequency Calculator

Calculate allele frequencies (p and q) from genotype counts, test for Hardy-Weinberg equilibrium, and compare observed vs expected genotype frequencies with chi-square analysis.

Last updated: December 2025

Calculator

Adjust values & calculate
320
480
200
Allele Frequencies
p = 0.5600 | q = 0.4400
p + q = 1.0000 | Total: 1,000 individuals (2,000 alleles)
Dominant Allele (p)
0.5600
56.0% of gene pool
Recessive Allele (q)
0.4400
44.0% of gene pool

Observed vs Expected Genotype Frequencies

GenotypeObserved %Expected %Expected Count
AA32.00%31.36%313.6
Aa48.00%49.28%492.8
aa20.00%19.36%193.6
Population IS in Hardy-Weinberg Equilibrium
Chi-square = 0.6747 (critical value = 3.841 at p = 0.05, df = 1)
Note: This calculator assumes a diploid organism with two alleles at a single locus. The chi-square test uses 1 degree of freedom and a significance level of 0.05.
Your Result
p = 0.5600, q = 0.4400 | HWE Chi-square = 0.6747 (In equilibrium)
Share Your Result
Understand the Math

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.

Last reviewed: December 2025

Worked Examples

Example 1: MN Blood Group Allele Frequencies

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 Frequency of M (p) = (2 x 360 + 480) / 2,000 = 1,200 / 2,000 = 0.60 Frequency of N (q) = (2 x 160 + 480) / 2,000 = 800 / 2,000 = 0.40 Check: p + q = 0.60 + 0.40 = 1.00
Result: p(M) = 0.60, q(N) = 0.40

Example 2: Testing for Hardy-Weinberg Equilibrium

Observed: 50 AA, 40 Aa, 10 aa (total 100). Is this population in HWE?
Solution:
p = (2x50 + 40) / 200 = 0.70, q = 0.30 Expected: AA = 0.49 x 100 = 49, Aa = 0.42 x 100 = 42, aa = 0.09 x 100 = 9 Chi-square = (50-49)^2/49 + (40-42)^2/42 + (10-9)^2/9 = 0.0204 + 0.0952 + 0.1111 = 0.2268 0.2268 < 3.841 critical value
Result: Chi-square = 0.2268, population IS in Hardy-Weinberg equilibrium (p > 0.05)
Expert Insights

Background & Theory

The Allele Frequency Calculator applies the following established principles and formulas. Biology is the scientific study of life, encompassing the structure, function, growth, evolution, and distribution of living organisms. At the cellular level, all life is composed of cells, the basic structural and functional units of organisms. Prokaryotic cells lack a membrane-bound nucleus, while eukaryotic cells possess a nucleus and membrane-bound organelles including mitochondria, which generate ATP through oxidative phosphorylation, and ribosomes, which synthesize proteins. Genetics quantifies the inheritance of traits. Gregor Mendel's laws describe how alleles segregate during gamete formation and assort independently for genes on different chromosomes. Punnett squares provide a visual method for calculating the probability of offspring genotypes and phenotypes from known parental genotypes. For a monohybrid cross of two heterozygotes (Aa ร— Aa), the expected phenotypic ratio is 3 dominant to 1 recessive. The Hardy-Weinberg equilibrium principle states that allele and genotype frequencies in a population remain constant from generation to generation in the absence of evolutionary forces. If p and q are the frequencies of two alleles at a locus, then p + q = 1 and genotype frequencies are pยฒ, 2pq, and qยฒ for the three possible genotypes. Deviations from equilibrium signal the action of natural selection, genetic drift, mutation, migration, or non-random mating. Population growth follows two primary models. Exponential growth, N = Nโ‚€eสณแต—, describes unlimited growth where Nโ‚€ is the initial population, r is the intrinsic rate of increase, and t is time. Logistic growth incorporates carrying capacity K, describing how growth slows as population approaches the environment's maximum sustainable size: dN/dt = rN(1 โˆ’ N/K). Enzyme kinetics describes the rate of enzyme-catalyzed reactions. The Michaelis-Menten equation, v = Vmax[S]/(Km + [S]), relates reaction velocity v to substrate concentration [S], maximum velocity Vmax, and the Michaelis constant Km, which equals the substrate concentration at half-maximal velocity. DNA replication relies on complementary base pairing: adenine pairs with thymine (two hydrogen bonds) and guanine with cytosine (three hydrogen bonds), ensuring faithful copying of genetic information.

History

The history behind the Allele Frequency Calculator traces back through the following developments. The systematic study of living things began with Aristotle (384โ€“322 BCE), who classified over 500 animal species and wrote foundational texts on anatomy, reproduction, and animal behavior. His scala naturae ranked organisms in a hierarchy from simple to complex and influenced biological thought for two millennia. Theophrastus, his student, applied similar methods to plants. Carl Linnaeus established modern taxonomy in Systema Naturae (1735), introducing the binomial nomenclature system that assigns each organism a genus and species name. His hierarchical classification system โ€” species, genus, family, order, class, phylum, kingdom โ€” provided the organizational framework that biologists still use, now extended to seven ranks and supplemented by cladistics. Charles Darwin and Alfred Russel Wallace independently developed the theory of evolution by natural selection, which Darwin published in On the Origin of Species in 1859. Darwin argued that heritable variation exists within populations, that organisms with advantageous traits survive and reproduce at higher rates, and that this differential reproduction gradually changes the character of populations over generations. This unified all of biology under a single explanatory framework. Gregor Mendel's meticulous pea plant experiments, conducted from 1856 to 1863 and published in 1866, established the particulate nature of inheritance and the laws of segregation and independent assortment. Overlooked until 1900, when three botanists independently rediscovered his work, Mendel's laws laid the foundation for the science of genetics. James Watson and Francis Crick, building on Rosalind Franklin's X-ray crystallography data, determined the double-helix structure of DNA in 1953, revealing the physical basis of heredity and the mechanism by which genetic information is stored and copied. The Human Genome Project, a 13-year international collaboration, published the complete sequence of the human genome in 2003, comprising approximately 3.2 billion base pairs. The development of CRISPR-Cas9 gene editing by Jennifer Doudna, Emmanuelle Charpentier, and colleagues from 2012 onward opened an era of precise genome modification with transformative implications for medicine, agriculture, and basic research.

Share this calculator

Explore More

Frequently Asked Questions

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.
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.
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.
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.
You may use the results for reference and educational purposes. For professional reports, academic papers, or critical decisions, we recommend verifying outputs against peer-reviewed sources or consulting a qualified expert in the relevant field.
All calculations use established mathematical formulas and are performed with high-precision arithmetic. Results are accurate to the precision shown. For critical decisions in finance, medicine, or engineering, always verify results with a qualified professional.
Educational Note: This calculator is provided for educational and informational purposes. Results are based on the formulas and inputs provided. Always verify important calculations independently. NovaCalculator processes calculator inputs client-side; optional analytics follow visitor consent settings. ยฉ 2024โ€“2026 NovaCalculator.

Share this calculator

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.

How do I verify Allele Frequency Calculator's result independently?

The Formula section on this page shows the equation used. You can reproduce the calculation manually or in a spreadsheet using those steps. Compare your answer against the worked examples in the Examples section, which use known reference values so you can confirm the calculator is behaving as expected.

References

Reviewed by Daniel Agrici, Founder & Lead Developer ยท Editorial policy