Hardy-Weinberg Equilibrium Calculator

Hardy-Weinberg equilibrium gives population genetics a mathematical baseline: if allele frequencies are known and the model assumptions hold, expected genotype frequencies can be calculated. The Hardy-Weinberg Equilibrium Calculator supports two to five alleles and also includes a recessive-disease carrier mode based on an affected proportion q².

What this calculator does

In genotype mode, choose the number of alleles and enter frequencies p, q, and—when needed—r, s, and t. Their sum must equal 1 within the calculator’s tolerance. The tool then lists every expected homozygous and heterozygous genotype frequency. In carrier mode, enter the affected proportion q²; the calculator derives q, p = 1 − q, the heterozygous carrier frequency 2pq, and an approximate carrier prevalence.

How to use it

Enter allele frequencies as decimals between 0 and 1, not percentages, unless you convert the percentage first. For example, 60% is 0.60. In multi-allele mode, confirm the frequencies sum to 1 before interpreting the output. For carrier calculations, q² should represent the population prevalence of an autosomal recessive genotype under the model—not an individual person’s test result or a general disease incidence figure from a mismatched population.

How the calculation works

For two alleles, expansion of (p + q)² gives p² + 2pq + q². With more alleles, the same principle applies: each homozygote has frequency pᵢ² and each distinct heterozygote has frequency 2pᵢpⱼ. The number of expected genotype classes for n alleles is n(n+1)/2. In carrier mode, q = √q² and carrier frequency is 2(1−q)q.

Example

Using the default genotype inputs p = 0.6 and q = 0.4, the frequencies sum to 1 and the calculator returns three expected genotypes. The expected frequencies are pp = 0.36, pq = 0.48, and qq = 0.16, corresponding to 36%, 48%, and 16% under Hardy-Weinberg expectations.

How to interpret the result

The calculated frequencies are expectations for a population model, not predictions for a specific child, family, or individual. Researchers can compare observed genotype counts with the expected proportions to investigate whether a population departs from the baseline. A departure can have many possible causes and usually requires formal statistical testing and biological context rather than a conclusion from the calculator alone.

Limitations and notes

Hardy-Weinberg equilibrium assumes a very large randomly mating population with no selection, migration, mutation, or genetic drift affecting the locus, along with accurate allele-frequency estimates and appropriate population definition. Real populations can violate several assumptions at once. In medical genetics, carrier-frequency estimates should not replace ancestry-appropriate prevalence data, laboratory testing, or genetic counseling when individual decisions are involved.

See an error or outdated claim? We welcome correction requests. Request a correctionEditorial policy