Hardy-Weinberg Equilibrium Calculator

The Hardy-Weinberg Equilibrium Calculator determines allele and genotype frequencies in a population, and tests whether that population is evolving — a foundational concept in genetics and population biology. Select your data type (genotype counts, phenotype counts, or genotype percentages), enter your observed values, and optionally label your major and minor alleles. You'll get the allele p and q frequencies, plus expected genotype frequencies (p², 2pq, q²) under Hardy-Weinberg equilibrium to compare against your observed data.

Data Type *

%
%
%

Results

Allele p frequency

--

Allele q frequency

--

Expected AA (p²)

--

Expected Aa (2pq)

--

Expected aa (q²)

--

Total population

--

Results Table

More Biology Tools

Frequently Asked Questions

What is the Hardy-Weinberg equilibrium?

Hardy-Weinberg equilibrium describes a theoretical state where allele frequencies remain constant across generations in a population. This occurs when there's no mutation, migration, selection, or genetic drift, and mating is random.

How do you calculate allele frequencies from genotype counts?

For allele p: p = (2×AA + Aa) / (2×N), where N is total population. For allele q: q = (2×aa + Aa) / (2×N). Since p + q = 1, you can also calculate q = 1 - p.

What are the expected genotype frequencies under Hardy-Weinberg?

If allele frequencies are p and q, then expected genotype frequencies are: AA = p², Aa = 2pq, and aa = q². These represent the theoretical distribution assuming random mating.

Can I use phenotype data instead of genotype data?

Yes, if you have dominant and recessive phenotype counts. The frequency of the recessive allele (q) can be calculated as the square root of the recessive phenotype frequency: q = √(recessive/total).

What does it mean if observed frequencies don't match expected frequencies?

Deviations from Hardy-Weinberg expectations suggest that one or more assumptions are violated. This could indicate natural selection, inbreeding, population structure, or other evolutionary forces acting on the population.

How accurate should my allele frequency calculations be?

For scientific purposes, calculate to at least 4 decimal places. Small populations may show more variation due to genetic drift, while large populations should more closely approximate theoretical expectations.

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

Larger samples provide more accurate estimates. For meaningful results, aim for at least 50-100 individuals, though statistical power increases significantly with larger sample sizes of 500+ individuals.