Hardy Weinberg Equilibrium Calculator
Calculate Hardy-Weinberg equilibrium genotype frequencies (p², 2pq, q²), carrier rates, and chi-square test. Enter allele frequencies, genotype counts, or disease prevalence.
q (recessive) = 0.3000
Used to calculate expected genotype counts
Genotype Frequencies
0.4900
p² (AA)
0.4200
2pq (Aa)
0.0900
q² (aa)
Allele Frequencies
Dominant (p) and recessive (q) allele proportions
Genotype Distribution
Visual breakdown of population genotypes
49.00%
42.00%
9.00%
Carrier Information
Heterozygous carrier statistics
Expected Counts
In a population of 1,000
How the Hardy-Weinberg Calculator Works
Core equations for population genetics
The Hardy-Weinberg principle describes the relationship between allele frequencies and genotype frequencies in a population that is not evolving. Given two alleles at a single locus with frequencies p (dominant) and q (recessive), the expected genotype frequencies are:
p²
Homozygous Dominant (AA)
2pq
Heterozygous Carrier (Aa)
q²
Homozygous Recessive (aa)
Hardy-Weinberg Assumptions
Five conditions required for equilibrium to hold
The Hardy-Weinberg equilibrium holds when a population meets five key conditions. Violation of any condition drives evolutionary change:
No mutation
Alleles are not changing from one type to another
Random mating
Individuals pair by chance, not by genotype or phenotype
No natural selection
All genotypes are equally fit — no survival or reproduction advantage
Infinitely large population
No genetic drift — small populations experience random frequency changes
No gene flow
No migration of individuals into or out of the population
Worked Example: Cystic Fibrosis
Applying Hardy-Weinberg to a real genetic condition
Cystic fibrosis (CF) is an autosomal recessive disorder affecting about 1 in 2,500 Caucasians. Using Hardy-Weinberg:
Step-by-step Calculation
q²
0.0004
1 / 2500
q
0.0200
√0.0004
p
0.9800
1 − 0.02
2pq
0.0392
~1 in 26
This reveals that approximately 1 in 26 people are carriers of the CF allele — far more common than the 1 in 2,500 affected rate might suggest. This is why carrier screening is so important for recessive genetic conditions.
Common Mistakes to Avoid
Frequent errors in Hardy-Weinberg calculations
Confusing allele vs genotype frequency
q is the allele frequency; q² is the genotype frequency. If 4% are affected (q² = 0.04), then q = 0.2, not 0.04.
Forgetting p + q = 1
The two allele frequencies always sum to 1. If you know q, calculate p as 1 − q. Don't treat them as independent.
Using percentages instead of proportions
Hardy-Weinberg uses proportions (0 to 1), not percentages. Convert 4% to 0.04 before calculating.
Assuming equilibrium without testing
Real populations rarely meet all five assumptions. Use the chi-square test to verify whether observed genotype counts match expected frequencies.
Real-World Applications
How Hardy-Weinberg is used in practice
| Application | How HWE is Used |
|---|---|
| Genetic counseling | Estimate carrier probabilities for recessive disorders like CF and sickle cell disease |
| Forensic genetics | Calculate expected genotype frequencies for DNA profile matching |
| Evolutionary biology | Detect natural selection by comparing observed vs expected genotype frequencies |
| GWAS quality control | Filter SNPs deviating from HWE — often signals genotyping error |
| Conservation biology | Monitor genetic diversity and detect inbreeding in endangered populations |
Frequently Asked Questions
Common questions and detailed answers
Embed Hardy Weinberg Equilibrium Calculator
Add this calculator to your website or blog for free.
You Might Also Like
Related calculators from other categories
Last updated Mar 26, 2026