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.

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

  1. Enter the frequency of allele A (dominant) as a decimal between 0 and 1.
  2. The calculator automatically computes q = 1 − p (recessive allele frequency).
  3. Expected genotype frequencies are displayed: p² (AA), 2pq (Aa), and q² (aa).
  4. Optionally enter the total sample size (N) plus observed counts for AA, Aa, and aa genotypes.
  5. The chi-square statistic and p-value are calculated to test for significant deviation from HWE.
  6. 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

Last updated: 2026-07-01 · Reviewed by Nham Vu