
What Is Hardy–Weinberg Equilibrium? Population Genetics Explained
Learn what Hardy–Weinberg equilibrium is, the p² + 2pq + q² = 1 equation, its five assumptions, and how to calculate expected genotype frequencies — with a free calculator.
Hardy–Weinberg equilibrium is the cornerstone principle of population genetics. It describes the conditions under which allele and genotype frequencies stay constant across generations — a null model against which real evolutionary change is measured.
Our free Hardy–Weinberg Calculator computes expected genotype frequencies (p², 2pq, q²) from allele frequencies in seconds.
Try it right here — results update instantly.
What Is Hardy–Weinberg Equilibrium?
Hardy–Weinberg equilibrium states that, under certain ideal conditions, the allele frequencies in a population remain constant from generation to generation. The equation is:
p² + 2pq + q² = 1
Where p is the frequency of the dominant allele, q is the frequency of the recessive allele (p + q = 1), p² is the homozygous dominant frequency, 2pq is the heterozygous frequency, and q² is the homozygous recessive frequency.
The Five Assumptions
Hardy–Weinberg equilibrium holds only when five conditions are met:
- No mutation — allele frequencies do not change by mutation.
- No migration (gene flow) — no individuals enter or leave the population.
- Random mating — no sexual selection or assortative mating.
- No natural selection — all genotypes have equal fitness.
- Large population — no genetic drift from chance events.
When any assumption is violated, the population evolves. Comparing observed genotype frequencies to Hardy–Weinberg expectations reveals which evolutionary forces are at work.
How to Calculate Expected Genotype Frequencies
- 1Determine allele frequencies p and q (p + q = 1).
- 2Square p to get the homozygous dominant frequency (p²).
- 3Multiply 2 × p × q for the heterozygous frequency (2pq).
- 4Square q for the homozygous recessive frequency (q²).
- 5Verify the three sum to 1.
Example: If p = 0.7 and q = 0.3, then p² = 0.49, 2pq = 0.42, q² = 0.09. So 49% homozygous dominant, 42% heterozygous, 9% homozygous recessive.
Working Backwards from Phenotype Data
If you know the recessive phenotype frequency (q²), take its square root to find q, then p = 1 − q. This is useful when only the recessive trait is visibly distinguishable.
Example: If 16% of a population shows a recessive trait, q² = 0.16, so q = 0.4 and p = 0.6. Carriers (2pq) = 48%.
Testing for Equilibrium: Chi-Square
A chi-square test compares observed genotype counts to Hardy–Weinberg expectations. A small chi-square value (large p-value) means the population is consistent with equilibrium; a large value suggests a violation of one or more assumptions.
Why Hardy–Weinberg Matters
- It provides a baseline to detect evolution in real populations.
- It estimates carrier frequencies for recessive genetic diseases.
- It helps conservation biologists assess genetic diversity.
- It underpins population genetics models used in research.
Frequently Asked Questions
What does Hardy–Weinberg equilibrium mean?
It means allele and genotype frequencies stay constant across generations when no evolutionary forces act on the population.
What is the Hardy–Weinberg equation?
p² + 2pq + q² = 1, where p and q are allele frequencies and the three terms are the expected genotype frequencies.
What are the five assumptions of Hardy–Weinberg?
No mutation, no migration, random mating, no natural selection, and a large population size.
How do I find allele frequency from phenotype data?
Take the square root of the recessive phenotype frequency to get q, then p = 1 − q.
Is the CalcWisee Hardy–Weinberg Calculator free?
Yes. It is free, requires no sign-up, and runs in your browser on any device.
Related Biology Calculators
- Hardy–Weinberg Calculator — expected genotype frequencies
- Allele Frequency Calculator — p and q from genotype counts
- Punnett Square Calculator — individual crosses
- Browse all Biology Calculators.
Conclusion
Hardy–Weinberg equilibrium is the null model of population genetics — a benchmark for detecting evolution. The Hardy–Weinberg Calculator makes the p² + 2pq + q² = 1 equation instant and verifiable.
Important Disclaimer
This article and calculator are for educational purposes. Real populations rarely meet all Hardy–Weinberg assumptions; results should be interpreted as a theoretical baseline.
References
Try it yourself
Put this guide into practice with our free tool.
CalcWisee Editorial Team
Calculator development and formula review
CalcWisee is an independent site founded by Ayman. Every calculator is built from a published formula or official definition, tested against hand-worked examples before it goes live, and corrected promptly when a reader reports an issue to ayman@calcwisee.com.
Expertise: Financial mathematics, Health and fitness formulas, Applied mathematics, Unit conversion standards

