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)

=1

Allele Frequencies

Dominant (p) and recessive (q) allele proportions

p (dominant allele)
0.700000
q (recessive allele)
0.300000

Genotype Distribution

Visual breakdown of population genotypes

AA (p²)

49.00%

Aa (2pq)

42.00%

aa (q²)

9.00%

Carrier Information

Heterozygous carrier statistics

Carrier Frequency
42.00%
Carrier Ratio
1 in 2

Expected Counts

In a population of 1,000

AA (homozygous dominant)
490.0
Aa (heterozygous)
420.0
aa (homozygous recessive)
90.0

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:

Core Equations
p + q = 1
p² + 2pq + q² = 1

Homozygous Dominant (AA)

2pq

Heterozygous Carrier (Aa)

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

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

ApplicationHow HWE is Used
Genetic counselingEstimate carrier probabilities for recessive disorders like CF and sickle cell disease
Forensic geneticsCalculate expected genotype frequencies for DNA profile matching
Evolutionary biologyDetect natural selection by comparing observed vs expected genotype frequencies
GWAS quality controlFilter SNPs deviating from HWE — often signals genotyping error
Conservation biologyMonitor 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.

Last updated Mar 26, 2026