Allele Frequency Calculator

Already know p and q? Get genotype frequencies with the Hardy–Weinberg calculator →
Disease prevalence
N must be greater than 1. Example prevalences are listed in the FAQ.
Biology Updated 29 Oct 2026

Works out allele frequencies three ways. From the prevalence of a recessive condition (as '1 in N' or a percentage) it finds the disease allele frequency q, the normal allele frequency p, the share of non-carriers, carriers and affected people, and the carrier rate as '1 in X'. From AA, Aa and aa genotype counts it counts alleles to get p, q and the minor allele frequency, and from raw allele counts it handles up to five alleles.

  • Prevalence mode: one autosomal recessive allele, full penetrance, and a population in Hardy–Weinberg equilibrium (random mating, no selection, migration or new mutation).
  • Counts are taken from a diploid sample and are assumed to be representative of the population.
  • Child risk assumes the partner is unrelated and drawn from the same population; it does not cover consanguineous couples.

Formula

From disease prevalence (Hardy–Weinberg): q² = affected fraction, q = √q², p = 1 − q, carriers = 2pq, carrier rate = 1 in (1 ÷ 2pq). From genotype counts: p = (2·AA + Aa) ÷ 2N and q = (2·aa + Aa) ÷ 2N, with N individuals. From allele counts: frequency of each allele = its copies ÷ all copies counted.
  • '1 in N' is converted to a fraction as 1 ÷ N; a percentage is divided by 100. N must be above 1 (up to one billion) and percentages strictly between 0 and 100.
  • The prevalence route assumes the condition is autosomal recessive and the population is in Hardy–Weinberg equilibrium, so affected people make up q² of the population.
  • The child-risk line uses q ÷ 2: the known carrier transmits a half of the time and an unrelated partner transmits a with probability q (this already includes partners who are carriers or affected).
  • Counting alleles from genotypes needs no equilibrium assumption: every homozygote contributes two copies of its allele and every heterozygote one copy of each.
  • Minor allele frequency (MAF) is the frequency of the less common of two alleles. With more alleles the rarest allele's frequency is shown instead.
  • The '1 in X' carrier rate is shown to 2 decimals.

Recessive condition affecting 1 in 2,500

Inputs
  • Calculate from: prevalence
  • Prevalence given as: oneIn
  • Affected: 1 in N — N: 2500

q² = 1 ÷ 2,500 = 0.0004, so q = √0.0004 = 0.02 and p = 1 − 0.02 = 0.98. Carriers make up 2 × 0.98 × 0.02 = 0.0392 of the population, about 1 in 25.51 people, while 0.98² = 96.04% carry no copy. A child of a known carrier and an unrelated partner has a risk of 0.02 ÷ 2 = 1%.

Sources & references

Frequently asked questions

How do I calculate p and q from genotype counts?
Count alleles, not people. Each AA individual has two A alleles, each Aa has one A and one a, and each aa has two a. So p = (2 × AA + Aa) ÷ (2 × total individuals) and q = (2 × aa + Aa) ÷ (2 × total). With 36 AA, 48 Aa and 16 aa: p = (72 + 48) ÷ 200 = 0.6 and q = 0.4.
If 1% of a population has a recessive disease, what are p and q?
The affected people are the aa homozygotes, so q² = 0.01. Then q = √0.01 = 0.1 and p = 1 − 0.1 = 0.9. Carriers are 2 × 0.9 × 0.1 = 18% of the population, nearly one person in five.
What is the minor allele frequency?
It is the frequency of the less common allele at a locus with two alleles. Genome studies use it to describe how common a variant is: below about 1% a variant is usually called rare, and above 5% common.
What happens with more than two alleles?
The frequencies still add up to 1, for example p + q + r + s = 1 with four alleles. Each frequency is the number of copies of that allele divided by all copies counted. Four alleles can combine into 4 × 5 ÷ 2 = 10 different genotypes. Use the allele counts mode for up to five alleles.
What prevalences are typical for recessive disorders?
Figures vary a lot between populations. MedlinePlus Genetics (US National Library of Medicine) gives cystic fibrosis as 1 in 2,500 to 3,500 white newborns in the United States, phenylketonuria as 1 in 25,000 US newborns, oculocutaneous albinism as 1 in 12,000 to 15,000 people in European populations (1 in 4,000 to 7,000 in African populations) and sickle cell disease as about 1 in 500 African Americans. Tay–Sachs disease and harlequin ichthyosis are very rare in the general population. The quick-pick values in the input list are round example figures; use local data when you can.
Why is the carrier frequency so much higher than the disease frequency?
Because q is small, q² is tiny but 2pq ≈ 2q. A disease seen in 1 in 10,000 people has q = 0.01, yet about 2% of people (1 in 50) carry one copy. Most copies of a rare recessive allele are hidden in healthy carriers.

Related calculators