Hardy-Weinberg Equilibrium Calculator

In a large, randomly mating population with no selection, mutation or migration, allele and genotype frequencies stay constant from generation to generation. This Hardy-Weinberg calculator finds the allele frequencies from genotype counts and tests whether the population fits equilibrium, or estimates the carrier frequency of a recessive condition from how often it occurs.

Inputs

Results

Frequency of allele A (p)
0.5425
Frequency of allele a (q)
0.4575
Expected heterozygote (carrier) frequency 2pq
49.64
%
Carriers: one in
2.015
Chi-square statistic
0.2215
P-value (1 degree of freedom)
0.6379
Conclusion at the 5 % level
Consistent with Hardy-Weinberg equilibrium

    RefBIO-GEN-001
    Methodp² + 2pq + q² = 1; χ² test with 1 degree of freedom
    UnitsSI
    Date2026-11-24

    Working

    Calculated in SI base units; inputs are converted from the units you choose.

    1. Allele frequenciesp = (2·AA + Aa)/(2N), q = 1 − pp = (2 × 298 + 489) / (2 × 1,000) = 0.5425, q = 0.4575
    2. Expected countsp²N, 2pqN, q²N294.3, 496.4, 209.3
    3. Chi-square testχ² = Σ(O − E)²/E, 1 degree of freedomχ² = 0.2215, P = 0.6379

    Observed and expected genotypes

    GenotypeObservedExpected(O − E)²/E
    AA298294.310.04636
    Aa489496.390.1099
    aa213209.310.06519

    p² + 2pq + q² = 1

    With allele frequencies p and q, the expected genotype frequencies are p² (AA), 2pq (Aa) and q² (aa). A chi-square test with one degree of freedom (three genotype classes minus one, minus one estimated allele frequency) compares observed and expected counts. For a recessive condition, q is the square root of its frequency, and carriers are far more common than affected people: a condition in 1 in 2500 births implies about 1 in 26 carriers.

    Assumptions and limits

    • Two alleles at one autosomal locus.
    • Random mating, large population, no selection, mutation or migration.
    • Chi-square approximation needs all expected counts of at least 5.

    References

    • Hartl, D. L. and Clark, A. G., Principles of Population Genetics, 4th ed., Sinauer, 2007, chapter on Hardy-Weinberg equilibrium.
    • Wigginton, J. E., Cutler, D. J. and Abecasis, G. R. (2005), A note on exact tests of Hardy-Weinberg equilibrium, American Journal of Human Genetics 76, 887–893.

    Questions

    Are 298 AA, 489 Aa and 213 aa in equilibrium?
    Yes. p = 0.5425 and the chi-square statistic is 0.2215 (P = 0.6379), so there is no significant departure.
    If 1 in 2500 people has a recessive condition, how common are carriers?
    q = 0.02, so 3.92 % of people, about 1 in 26, are carriers.

    This calculator is a design aid. Check results against the governing code or standard and have critical work verified by a qualified engineer. Read the disclaimer.