Hardy-Weinberg Equilibrium Calculator
Calculate allele and genotype frequencies using Hardy-Weinberg equilibrium: p + q = 1 and p² + 2pq + q² = 1. Determine if a population is evolving by comparing observed vs expected frequencies.
🧬 Genetics📐 p + q = 1; p² + 2pq + q² = 1🧬 Biology
Frequency of recessive allele q
OR frequency of recessive homozygotes q²
Please enter valid values.
Formula & Reference
| Variable | Symbol | Formula | Units |
|---|---|---|---|
| Hardy-Weinberg Equilibrium Calculator | — | p + q = 1; p² + 2pq + q² = 1 | frequency |
Step-by-Step Examples
Example 1
Cystic Fibrosis
CF recessive allele frequency q = 0.022 in Northern Europeans.
- p = 1 - 0.022 = 0.978
- AA: p² = 0.957 (normal, non-carrier)
- Aa: 2pq = 2 x 0.978 x 0.022 = 0.043 (4.3% carriers)
- aa: q² = 0.00048 (1 in 2083 affected)
✓ Carrier frequency: 4.3% | Affected: 1 in 2083
Example 2
Phenylketonuria
1 in 10,000 people have PKU (aa). Find allele frequencies.
- q² = 1/10000 = 0.0001
- q = sqrt(0.0001) = 0.01
- p = 1 - 0.01 = 0.99
- Carrier (Aa): 2 x 0.99 x 0.01 = 0.0198 ~ 2%
✓ q = 0.01, carrier frequency ~2%
Example 3
MN Blood Group
In a population: MM=490, MN=420, NN=90. N=1000. Are they in H-W equilibrium?
- p(M) = (2x490+420)/(2x1000) = 1400/2000 = 0.70
- q(N) = 1 - 0.70 = 0.30
- Expected MM: 0.49x1000=490, MN: 0.42x1000=420, NN: 0.09x1000=90
- Observed matches expected: population IS in H-W equilibrium
✓ Population is in Hardy-Weinberg equilibrium
Real-World Applications
Conservation Biology
HWE deviation reveals inbreeding, genetic drift, or selection in endangered species.
Genetic Counseling
Calculate carrier frequencies for autosomal recessive diseases in risk assessment.
Population Genetics
Foundation for detecting selection, gene flow, and other evolutionary forces.
Medical Genomics
Predict disease allele frequencies in populations for public health planning.
Common Mistakes to Avoid
⚠️
q is the recessive allele frequency
q² is the homozygous recessive genotype frequency. Take square root of q² to find q.
⚠️
H-W assumes 5 conditions
No mutation, random mating, no genetic drift, no gene flow, no natural selection. Violations cause deviation from H-W.
⚠️
p + q must equal 1
For two alleles only. If three alleles: p + q + r = 1 and frequencies expand accordingly.
Frequently Asked Questions
What is Hardy-Weinberg equilibrium? ▾
A population where allele and genotype frequencies remain constant generation to generation under ideal conditions (no evolution). Used as a null hypothesis to detect evolution.
What are the 5 Hardy-Weinberg assumptions? ▾
1) No mutation, 2) Random mating, 3) Large population (no drift), 4) No gene flow, 5) No natural selection. Violation of any assumption means evolution is occurring.
How do I test for H-W equilibrium? ▾
Use chi-square test: compare observed genotype counts to expected counts calculated from allele frequencies. If chi-square > critical value: not in equilibrium.
What does deviation from H-W tell us? ▾
Deviation indicates evolutionary forces at work: excess homozygotes suggests inbreeding or assortative mating; deficit suggests heterozygote advantage (e.g. sickle cell).
Why is H-W useful in medicine? ▾
Predicts carrier frequency from disease frequency without direct testing. If disease affects 1/10,000 (q²), then carrier frequency = 2pq ≈ 2% — important for genetic counseling.