Hardy-Weinberg Equilibrium Calculator
for a biallelic locus
The Hardy-Weinberg Equilibrium principle states that in a large, closed, randomly mating population with no evolutionary influences, the frequencies of alleles and genotypes will remain constant from one generation to the next. This principle provides a mathematical framework to study genetic variation and serves as a baseline to detect evolutionary changes. For a population to be in Hardy-Weinberg Equilibrium, five key assumptions must be met: no mutations, random mating, no natural selection, an infinitely large population size (no genetic drift), and no gene flow (migration).
This online calculator can be used to determine the allele frequencies and to calculate, using the Hardy-Weinberg equation, the expected number of common homozygotes, heterozygotes and rare homozygotes, from observed genotype counts for a gene with two alleles. It will then run a Chi-squared test and return the corresponding p-value, allowing you to determine whether the population is significantly deviating from Hardy-Weinberg Equilibrium proportions.
This calculator enables you to:
Determine allele frequencies (p and q)
Calculate expected genotype counts under Hardy-Weinberg equilibrium assumptions
Perform a Chi-squared test to assess whether deviations between observed and expected genotype counts are statistically significant — a low p-value (typically < 0.05) indicates a significant difference, suggesting the population may not be in Hardy-Weinberg Equilibrium
The Hardy-Weinberg Equation:
p2 = dominant homozygous frequency (AA)
2pq = heterozygous frequency (Aa)
q2 = recessive homozygous frequency (aa)