Hardy–Weinberg Calculator
From the share of a population showing a recessive trait, estimate the recessive and dominant allele frequencies and the carrier (heterozygote) frequency — p² + 2pq + q² = 1.
How common the recessive allele and the carriers are, from the trait's frequency.
How the hardy–weinberg calculator works
In a large, randomly mating population with no selection, migration or mutation, allele frequencies stay constant and genotypes occur as p² (AA), 2pq (Aa) and q² (aa). Measure q² — the share of recessive phenotypes — take the square root for q, then p = 1 − q and the carriers are 2pq. If 1 in 2,500 people has cystic fibrosis, q = 0.02 and about 1 in 25 is a carrier.
Formula: q = √(recessive frequency) · p = 1 − q · carriers = 2pq
Worked examples
| Inputs | Recessive allele frequency (q) | Note |
|---|---|---|
| 4% show the recessive trait | 0.2 | q 0.2, 32% carriers |
| Cystic fibrosis: 1 in 2,500 | 0.02 | q 0.02, 1 in 25 carry |
| 9% recessive | 0.3 | q 0.3, 42% carriers |
FAQFrequently asked questions
What assumptions does Hardy–Weinberg make?
Large population, random mating, no selection, mutation or migration. Real populations deviate, which is exactly how geneticists detect selection.
Why start from the recessive phenotype?
Because it is the one genotype you can see: every aa shows the trait, while AA and Aa look the same.
What does "1 in 25 is a carrier" mean?
About 4% of the population carry one copy of the allele without showing the trait — the 2pq term.
Can I use it for X-linked genes?
The frequencies work differently for males (one X); the equation here is for autosomal genes.
Where these figures come from
- IUPAC — Standard atomic weights (2021 conventional values) — the molar-mass table
- NIST — CODATA 2018 fundamental physical constants — Avogadro constant, gas constant, speed of light
- NIST Chemistry WebBook — thermochemical data
- CSIRO — Australia's national science agency
Last checked: September 2026. Atomic masses are the IUPAC conventional values; constants are CODATA 2018; equations are the standard textbook forms.