Hardy-Weinberg Equilibrium Calculator
Calculate Hardy-Weinberg equilibrium genotype frequencies from allele frequencies. Includes chi-square HWE test, inbreeding coefficient, and phenotype-based allele estimation.
p² — Homozygous Dominant (AA)
—
Recessive Allele Frequency (q) —
2pq — Heterozygous (Aa) —
q² — Homozygous Recessive (aa) —
p² + 2pq + q² (should = 1) —
Extended More scenarios, charts & detailed breakdown ▾
p² (AA freq)
—
q (recessive) —
2pq (Aa freq) —
q² (aa freq) —
Professional Full parameters & maximum detail ▾
Aa freq (with F)
—
q —
AA freq (with F) —
aa freq (with F) —
Expected AA individuals —
Expected Aa individuals —
Expected aa individuals —
How to Use This Calculator
- Enter the dominant allele frequency p (0 to 1). q = 1 − p is calculated automatically.
- Results show p², 2pq, and q² genotype frequencies.
- Use From Phenotype Freq to back-calculate p and q from observable recessive phenotype frequency.
- Use Test for Equilibrium to run a chi-square test on observed genotype counts.
Formula
p + q = 1 (allele frequencies sum to 1)
p² + 2pq + q² = 1 (genotype frequencies sum to 1)
Where p² = freq(AA), 2pq = freq(Aa), q² = freq(aa)
Example
Example: p = 0.6, q = 0.4. AA = 0.36 (36%), Aa = 0.48 (48%), aa = 0.16 (16%). Check: 0.36 + 0.48 + 0.16 = 1.00.
Frequently Asked Questions
- The Hardy-Weinberg principle states that allele and genotype frequencies in a population remain constant from generation to generation in the absence of other evolutionary influences. The equation p² + 2pq + q² = 1 describes genotype frequencies.
- HWE requires: (1) no mutations, (2) no gene flow/migration, (3) no natural selection, (4) random mating (no sexual selection), and (5) large population size (no genetic drift). Violation of any condition can shift allele frequencies.
- If the recessive phenotype frequency is q², then q = √(q²) and p = 1 − q. This assumes the population is in HWE and the trait shows simple dominant-recessive inheritance.
- F measures the probability that two alleles in an individual are identical by descent. F = 0 means random mating (HWE). F = 1 means complete inbreeding. Inbreeding increases homozygosity and reduces heterozygosity.
- Use a chi-square goodness-of-fit test. Compare observed genotype counts with expected counts from HWE frequencies. A chi-square value above 3.84 (1 df, α = 0.05) indicates significant deviation from HWE.
Related Calculators
Sources & References (5) ▾
- Hardy G.H. (1908) — Mendelian Proportions in a Mixed Population, Science — Science (AAAS)
- OpenStax Biology 2e, Chapter 19: Population Genetics — OpenStax
- NCBI Bookshelf — Modern Genetic Analysis (Griffiths) — NCBI / W.H. Freeman
- Khan Academy — Hardy-Weinberg Equilibrium (AP Biology) — Khan Academy
- Hartl & Clark — Principles of Population Genetics, 4th Ed. — Sinauer Associates