Determine allele frequencies (p and q) and genotype frequencies (p2, 2pq, q2) for a population in Hardy-Weinberg equilibrium. Enter either allele frequency or the number of individuals with each phenotype.
The Hardy-Weinberg principle, independently formulated by mathematician G. H. Hardy and physician Wilhelm Weinberg in 1908, is the foundational theorem of population genetics. It states that under specific idealized conditions (large population, random mating, no mutation, no migration, no selection), allele and genotype frequencies remain constant from generation to generation — providing a stable baseline for analyzing genetic variation. While these conditions are rarely fully met in real populations, deviations from Hardy-Weinberg equilibrium reveal which evolutionary forces are acting on a population.
The Hardy-Weinberg equations are elegantly simple: p + q = 1 (allele frequencies sum to 1 for a two-allele system) and p² + 2pq + q² = 1 (genotype frequencies sum to 1). Where p = dominant allele frequency, q = recessive allele frequency, p² = homozygous dominant frequency, 2pq = heterozygous frequency, and q² = homozygous recessive frequency. From these two equations, knowing any one frequency lets you calculate all others — making Hardy-Weinberg a powerful tool for studying genetic disease prevalence, population structure, and evolutionary processes.
This calculator computes allele and genotype frequencies using Hardy-Weinberg equations. Use it for: population genetics coursework, predicting carrier frequencies for genetic diseases, understanding genotype distributions in populations, comparing observed vs. expected genotype frequencies (to test for HW equilibrium), conservation genetics, and evolutionary biology research. Important context: real populations often deviate from HW equilibrium due to natural selection, genetic drift (especially in small populations), migration (gene flow), mutations (rare but accumulating), assortative mating (non-random pairing), and inbreeding. These deviations indicate which evolutionary forces are operating — Hardy-Weinberg serves as the "null hypothesis" against which evolutionary change is measured.
Cystic fibrosis affects approximately 1 in 2,500 newborns in US population. q² = 1/2,500 = 0.0004 (affected frequency) q = √0.0004 = 0.02 (recessive allele frequency) p = 1 - 0.02 = 0.98 (dominant allele frequency) Heterozygous carriers: 2pq = 2 × 0.98 × 0.02 = 0.0392 About 3.9% of population are CF carriers. That's 1 in 25 people — much higher than disease frequency. Implications: - Most carriers don't know their status (no symptoms) - Two carriers have 25% chance of affected child per pregnancy - 50% chance of carrier child - 25% chance of unaffected non-carrier Genetic counseling and pre-pregnancy testing increasingly accessible. Identifies carrier couples and informs reproductive choices.
Sickle cell allele (S) and normal allele (A) - autosomal recessive disease. In US population overall: q² = ~1 in 3,000 affected q = √(1/3000) = 0.018 Carrier frequency: 2pq = 2 × 0.982 × 0.018 = 0.036 (~3.6%) In African American population: q² = ~1 in 365 affected q = √(1/365) = 0.052 Carrier frequency: 2pq = 2 × 0.948 × 0.052 = 0.099 (~10%) In West African populations (historical): q² = ~1 in 100 affected q = 0.1 Carrier frequency: 2pq = 2 × 0.9 × 0.1 = 0.18 (~18%) Why elevated in West African ancestry? Heterozygous advantage — carriers have partial resistance to malaria. In malaria-endemic regions, natural selection maintained high carrier frequency despite disease cost. This is real-world deviation from HW (selection acting). In US (no malaria), selection no longer favors carriers, and S allele frequency gradually declines (over many generations).
Plant population (100 individuals). Observed genotypes: Tall (AA + Aa): 64 individuals Short (aa): 36 individuals If only tall vs. short visible (dominant trait), can't distinguish AA vs. Aa directly. Apply HW assumptions: q² = 36/100 = 0.36 q = 0.6 p = 0.4 p² = 0.16 (16 AA expected) 2pq = 2 × 0.4 × 0.6 = 0.48 (48 Aa expected) If we test individuals (e.g., by test crosses) and find: AA: 20, Aa: 44, aa: 36 Chi-square comparison: AA: expected 16, observed 20 (deviation +4) Aa: expected 48, observed 44 (deviation -4) aa: expected 36, observed 36 (deviation 0) Statistical test (chi-square) determines if deviations significant. Small deviations may be sampling variation; large deviations suggest non-HW conditions. Common reasons for deviations: - Selection against heterozygotes (rare) - Assortative mating (tall mates with tall) - Migration in/out of population - Recent bottleneck or founder effect
Use this calculator for population genetics coursework, predicting carrier frequencies for genetic diseases, understanding genotype distributions, comparing observed vs. expected genotype frequencies, conservation genetics, or evolutionary biology research.
Pair with punnett-square (specific cross outcomes), population-growth (broader population dynamics), and blood-type (specific multi-allele example).
Important Hardy-Weinberg considerations:
1. **Idealized conditions rarely met.** Real populations deviate due to selection, drift, migration, mutation, assortative mating, inbreeding. HW is null model.
2. **Deviations reveal evolutionary forces.** Significant departure from HW frequencies signals one or more evolutionary forces operating.
3. **Two-allele simplification.** Standard equations for one gene with two alleles. Multi-allele systems (blood types) require modified equations.
4. **X-linked traits use different equations.** Hemizygous males complicate calculations.
5. **Population size matters.** Small populations show drift faster — HW assumes large population.
6. **Random mating assumption critical.** Visible traits often show assortative mating, violating HW.
7. **Useful for null hypothesis.** Even with assumption violations, HW provides expected frequencies for comparison.
8. **Carrier calculations practical.** Often most useful application — determines how common heterozygotes are in population.
9. **Genetic counseling depends on HW.** Carrier screening risk calculations use HW-derived frequencies.
10. **Conservation genetics applications.** Track heterozygosity loss in small populations as biodiversity warning sign.
11. **Forensic DNA uses HW.** Match probability calculations assume HW; population substructure requires adjustment.
12. **Selection coefficients calculable.** Comparing HW-expected to observed can quantify selection strength on specific alleles.
Generate a monohybrid Punnett square showing genotype and phenotype ratios.
Model exponential and logistic population growth over time.
Predict possible blood types of offspring from parent blood types.
Calculate bacterial generation (doubling) time from growth data.
p (dominant)
0.600
q (recessive)
0.400
Carriers (2pq)
48.0%
| Parameter | Value |
|---|---|
| Dominant Allele Frequency (p) | 0.6000 |
| Recessive Allele Frequency (q) | 0.4000 |
| p + q | 1.0000 |
| Homozygous Dominant (p2) | 0.3600 = 36.00% |
| Heterozygous (2pq) | 0.4800 = 48.00% |
| Homozygous Recessive (q2) | 0.1600 = 16.00% |
| p2 + 2pq + q2 | 1.0000 |
| Hom. Dominant (n=100) | 36 individuals |
| Heterozygous (n=100) | 48 individuals |
| Hom. Recessive (n=100) | 16 individuals |
| Carrier Frequency | 48.00% are carriers |