Hardy-Weinberg Equilibrium Calculator
Calculate allele and genotype frequencies for a population in genetic equilibrium. Enter one allele frequency or actual genotype counts from field data to instantly derive all HWE values.
The Hardy-Weinberg Principle Explained
p² + 2pq + q² = 1 | p + q = 1The Hardy-Weinberg principle states that in a large, randomly mating population with no mutation, migration, natural selection, or genetic drift, allele and genotype frequencies will remain constant from generation to generation. The two core equations are: (1) p + q = 1, where p and q are the frequencies of the two alleles; and (2) p² + 2pq + q² = 1, where p², 2pq, and q² are the expected frequencies of the three genotypes.
| Symbol | Variable | Description |
|---|---|---|
| p | Dominant allele freq. | Frequency of the dominant allele (A) in the population. p = 1 − q. |
| q | Recessive allele freq. | Frequency of the recessive allele (a) in the population. |
| p² | Homozygous dominant freq. | Expected frequency of AA genotype individuals. |
| 2pq | Heterozygous freq. | Expected frequency of Aa genotype individuals (carriers). |
| q² | Homozygous recessive freq. | Expected frequency of aa genotype individuals (show recessive phenotype). |
How to Use This Calculator
- 1
Choose your input type
If you know only the allele frequency, use the 'Allele Frequency' tab and enter q. If you have actual survey data, use 'Genotype Counts' to enter observed genotype numbers.
- 2
Enter your values
For allele frequency, enter q (0 to 1). For genotype counts, enter the number of AA, Aa, and aa individuals observed.
- 3
Read the results
The calculator shows p, q, and all three expected genotype frequencies (p², 2pq, q²).
- 4
Check equilibrium (genotype counts mode)
When you enter observed counts, a chi-square test compares expected vs. observed genotype frequencies to test whether the population is in HWE.
Frequently Asked Questions
Related Calculators
More tools →Natural Selection Simulation Calculator
Simulate allele frequency change across generations from initial p and genotype fitness values for AA, Aa, and aa.
Genetic Drift Calculator
Estimate drift variance, allele frequency range, heterozygosity retention, fixation probability, and loss probability in a finite effective population.
Mendelian Genetics Calculator
Determine genotype and phenotype ratios for monohybrid crosses.