What "allele frequency" actually measures
An allele is one of the two copies of a gene that every diploid individual carries — one from each parent. The frequency of an allele is the share of all gene copies in the population that happen to be that variant. If 1 in 50 of those copies were the cystic-fibrosis variant, the allele frequency is 0.02.
Two facts matter for the calculator: an allele frequency always sits between 0 and 1, and across a single gene the frequencies of all variants must sum to 1. For a two-allele system that's the familiar p + q = 1.
The Hardy-Weinberg equation
Under random mating, no selection and a large population, genotype frequencies are predicted by squaring the allele-frequency equation. That gives the three classic terms — homozygous dominant, heterozygous (carrier), and homozygous recessive (affected):
(p + q)² = p² + 2pq + q² = 1
p— Frequency of the dominant (wild-type) allele, conventionally Aq— Frequency of the recessive allele, conventionally ap²— Share homozygous dominant (AA) — unaffected non-carriers2pq— Share heterozygous (Aa) — phenotypically healthy carriersq²— Share homozygous recessive (aa) — affected by the condition
Going from disease prevalence to allele frequencies
The calculator works backwards from the only number you usually have: disease prevalence. Every affected person is homozygous recessive, so prevalence equals q². Square-root to get q, subtract from 1 to get p, then plug both into 2pq to find the carrier rate.
Worked example with a 1-in-10,000 condition:
- q² = 0.0001 → q = 0.01
- p = 1 − 0.01 = 0.99
- 2pq = 2 × 0.99 × 0.01 ≈ 0.0198 — about 1 carrier in 50
The carrier rate is the surprise: rare diseases produce many more carriers than affected individuals. A 1-in-a-million condition still yields a 1-in-500 carrier rate.
Reading the result responsibly
Hardy-Weinberg is a model with assumptions that get violated in real human populations. Three sanity checks before quoting a carrier rate.
- Match the prevalence to the population — Cystic fibrosis hits about 1 in 2,500 Northern Europeans but only around 1 in 17,000 African Americans. Plugging the wrong prevalence misses the carrier rate by an order of magnitude.
- Founder populations break the model — Ashkenazi Jewish, Finnish and French-Canadian populations carry several recessive variants well above general-population rates. For counselling, use ethnicity-specific prevalence figures.
- Consanguinity inflates homozygotes — Relatives share rare alleles, so the homozygous frequency rises above q². Hardy-Weinberg silently assumes mating is random.