Hardy-Weinberg Equilibrium Calculator
Enter allele frequency p to get expected genotype frequencies, then optionally enter observed counts for a chi-square goodness-of-fit test.
Allele Frequency
Enter a decimal value between 0 and 1 (e.g. 0.6)
Derived allele a frequency (q = 1 − p)
—
Chi-Square Test (optional)
Enter observed genotype counts to test for deviation from HWE.
Enter allele frequency p and click Calculate to see results.
Allele Frequencies
p (allele A)
—
q (allele a)
—
Expected Genotype Frequencies
AA (homozygous dominant)
p²
—
Aa (heterozygous)
2pq
—
aa (homozygous recessive)
q²
—
Frequency Distribution
AA (p²)—
Aa (2pq)—
aa (q²)—
Chi-Square Goodness-of-Fit Test
χ² statistic
—
p-value (df = 1)
—
| Genotype | Observed | Expected | (O−E)²/E |
|---|
Copied!
Summary
Enter allele frequency p to get expected genotype frequencies, then optionally enter observed counts for a chi-square goodness-of-fit test.
How it works
- Enter the frequency of allele A (dominant) as a decimal between 0 and 1.
- The calculator automatically computes q = 1 − p (recessive allele frequency).
- Expected genotype frequencies are displayed: p² (AA), 2pq (Aa), and q² (aa).
- Optionally enter the total sample size (N) plus observed counts for AA, Aa, and aa genotypes.
- The chi-square statistic and p-value are calculated to test for significant deviation from HWE.
- A conclusion states whether the population is in Hardy-Weinberg equilibrium at α = 0.05.
Use cases
- Estimate genotype frequencies in a population genetics study.
- Test whether a SNP dataset deviates from Hardy-Weinberg equilibrium.
- Verify population data quality in GWAS pre-processing.
- Teach or learn the Hardy-Weinberg principle in genetics courses.
- Estimate the frequency of heterozygous carriers of a recessive allele.
- Detect non-random mating, selection, or population structure in survey data.
- Cross-check manually computed HWE values in lab reports.
- Quickly explore how changing p shifts expected genotype proportions.
Frequently Asked Questions
Related tools
Last updated: 2026-05-29 ·
Reviewed by Nham Vu