Hardy Weinberg Calculator
Enter allele frequencies or observed genotype counts to calculate Hardy-Weinberg equilibrium allele and genotype frequencies.
Input Mode
Leave blank to auto-compute q = 1 - p
Enter observed counts for each genotype in your sample.
Enter allele frequencies or genotype counts and click Calculate.
Allele Frequencies
p (dominant, A)
—
q (recessive, a)
—
p + q = —
Expected Genotype Frequencies
AA (p²)
—
—
Aa (2pq)
—
—
aa (q²)
—
—
Chi-Square Test (df = 1)
| Genotype | Observed | Expected | (O-E)²/E |
|---|---|---|---|
| Total | — | — | — |
Hardy-Weinberg equations:
p + q = 1 | p² + 2pq + q² = 1
Summary
Enter allele frequencies or observed genotype counts to calculate Hardy-Weinberg equilibrium allele and genotype frequencies.
How it works
- Choose input mode: enter allele frequencies directly, or provide observed genotype counts.
- If entering genotype counts, allele frequencies p and q are derived automatically.
- Expected genotype frequencies are calculated as p², 2pq, and q².
- Expected genotype counts (if sample size is known) are compared to observed counts via chi-square test.
- The chi-square statistic and p-value indicate whether the population deviates from equilibrium.
- Results update instantly as you type.
Use cases
- Genetics coursework and exam preparation.
- Estimating carrier frequency for recessive genetic disorders.
- Population genetics research and data analysis.
- Testing whether a sampled population is in Hardy-Weinberg equilibrium.
- Predicting genotype distribution given known allele frequencies.
- Biology and bioinformatics teaching demonstrations.
- Forensic genetics allele frequency analysis.
- Evolutionary biology studies comparing generations.
Frequently Asked Questions
Related tools
Last updated: 2026-05-28 ·
Reviewed by Nham Vu