Hardy-Weinberg Equilibrium Calculator

Enter your population's genotype counts (AA, Aa, aa) or allele frequencies directly to calculate p and q — the dominant and recessive allele frequencies. The Hardy-Weinberg Equilibrium Calculator returns expected genotype frequencies (, 2pq, ), confirms whether p + q = 1, and displays a visual breakdown of population proportions.

Must be between 0 and 1. q will be calculated as 1 - p.

Individuals showing the dominant trait (AA + Aa).

Individuals showing the recessive trait (aa).

Results

Dominant Allele Frequency (p)

--

Recessive Allele Frequency (q)

--

Expected Frequency of AA (p²)

--

Expected Frequency of Aa (2pq)

--

Expected Frequency of aa (q²)

--

Total Alleles (2N)

--

p + q (should equal 1)

--

Expected Genotype Frequency Distribution

Results Table

Frequently Asked Questions

What is Hardy-Weinberg Equilibrium?

Hardy-Weinberg Equilibrium (HWE) is a principle stating that allele and genotype frequencies in a population remain constant from generation to generation, provided certain conditions are met: no mutation, random mating, no gene flow, no genetic drift, and no natural selection. It serves as a null model to detect evolutionary forces acting on a population.

What do p and q represent in Hardy-Weinberg equations?

In Hardy-Weinberg notation, p represents the frequency of the dominant allele (A) and q represents the frequency of the recessive allele (a) in the population. Since there are only two alleles at the locus, p + q must always equal 1. Knowing one value immediately gives you the other: q = 1 - p.

What are the Hardy-Weinberg equations?

The two core Hardy-Weinberg equations are: (1) p + q = 1, which describes allele frequencies, and (2) p² + 2pq + q² = 1, which describes expected genotype frequencies. Here, p² is the expected frequency of homozygous dominant (AA), 2pq is heterozygous (Aa), and q² is homozygous recessive (aa).

How do I calculate p and q from genotype counts?

Count the total number of alleles (2N, where N is the number of individuals). Then: p = (2·AA + Aa) / (2N) and q = (2·aa + Aa) / (2N). Alternatively, q = 1 - p once you have p. This calculator performs these calculations automatically from the counts you enter.

Can I calculate allele frequencies from phenotype data only?

Yes, if you assume the population is in Hardy-Weinberg equilibrium. With only dominant and recessive phenotype counts, you can estimate q² = (recessive count) / N, then q = √(q²), and p = 1 - q. This is less precise than using genotype counts because it relies on the HWE assumption holding true.

What does it mean if my population is NOT in Hardy-Weinberg Equilibrium?

A significant deviation between observed and expected genotype frequencies suggests that one or more HWE assumptions are being violated. This could indicate natural selection, non-random mating (e.g., inbreeding), genetic drift in small populations, gene flow from other populations, or mutation pressure. HWE testing is commonly used in population genetics and GWAS quality control.

How is this calculator useful in genetics research?

Hardy-Weinberg calculations are foundational in population genetics, conservation biology, and medical genetics. Researchers use them to estimate carrier frequencies of recessive diseases, perform quality control checks in genome-wide association studies (GWAS), and assess whether a population is evolving at a specific locus.

What sample size do I need for reliable Hardy-Weinberg results?

Larger sample sizes give more statistically reliable estimates of allele and genotype frequencies. As a general rule, a minimum of 50–100 individuals is recommended, though many population genetics studies use hundreds to thousands of individuals. Small populations are more prone to genetic drift, which itself causes departures from HWE.

More Ecology Tools