Hardy–Weinberg Equilibrium Calculator
Allele frequencies and chi-square test for Hardy–Weinberg equilibrium.
- Free, no sign-up
- Runs in your browser — files stay private
What is the Hardy–Weinberg Equilibrium Calculator?
Hardy–Weinberg equilibrium (HWE) predicts genotype frequencies p², 2pq and q² from allele frequencies in a randomly mating population. Testing HWE is a standard quality check in genetic association studies: strong deviation can signal genotyping errors, population stratification or selection.
How to use the Hardy–Weinberg Equilibrium Calculator
- Enter observed counts of the three genotypes.
- Read allele frequencies and expected counts.
- Check the chi-square p-value for deviation.
Formula and method
p = (2·AA + Aa) ÷ 2N q = 1 − p
expected: p²N, 2pqN, q²N χ² with 1 df
Frequently asked questions
What p-value threshold is used in GWAS?
Variants in controls with HWE p < 10⁻⁶ are often excluded as likely genotyping errors.