Hardy-Weinberg Equilibrium Calculator

Calculate allele and genotype frequencies for a population in genetic equilibrium. Enter one allele frequency or actual genotype counts from field data to instantly derive all HWE values.

The Hardy-Weinberg Principle Explained

p² + 2pq + q² = 1 | p + q = 1

The Hardy-Weinberg principle states that in a large, randomly mating population with no mutation, migration, natural selection, or genetic drift, allele and genotype frequencies will remain constant from generation to generation. The two core equations are: (1) p + q = 1, where p and q are the frequencies of the two alleles; and (2) p² + 2pq + q² = 1, where p², 2pq, and q² are the expected frequencies of the three genotypes.

SymbolVariableDescription
pDominant allele freq.Frequency of the dominant allele (A) in the population. p = 1 − q.
qRecessive allele freq.Frequency of the recessive allele (a) in the population.
Homozygous dominant freq.Expected frequency of AA genotype individuals.
2pqHeterozygous freq.Expected frequency of Aa genotype individuals (carriers).
Homozygous recessive freq.Expected frequency of aa genotype individuals (show recessive phenotype).

How to Use This Calculator

  1. 1

    Choose your input type

    If you know only the allele frequency, use the 'Allele Frequency' tab and enter q. If you have actual survey data, use 'Genotype Counts' to enter observed genotype numbers.

  2. 2

    Enter your values

    For allele frequency, enter q (0 to 1). For genotype counts, enter the number of AA, Aa, and aa individuals observed.

  3. 3

    Read the results

    The calculator shows p, q, and all three expected genotype frequencies (p², 2pq, q²).

  4. 4

    Check equilibrium (genotype counts mode)

    When you enter observed counts, a chi-square test compares expected vs. observed genotype frequencies to test whether the population is in HWE.

Frequently Asked Questions

Related Calculators

More tools

Browse more calculator categories

All calculators