Skip to content
K Knidox Search…
Biology · Genetics

Allele Frequency Calculator

Find allele frequencies from observed genotype counts.

Enter the number of individuals of each genotype.

Allele frequencies
p = 0.6 · q = 0.4

1000 individuals = 2000 alleles · 1200 dominant, 800 recessive

Observed vs Hardy–Weinberg expected (counts)

To find an allele frequency, count alleles and divide by 2N. Use p = (2·AA + Aa) ÷ 2N. For 360 AA, 480 Aa, and 160 aa (N = 1,000, so 2N = 2,000): p = (720 + 480) ÷ 2,000 = 0.6, and q = (320 + 480) ÷ 2,000 = 0.4.

How allele frequency is counted

Allele frequency counts alleles, not individuals. Each diploid individual carries two alleles, so a population of N individuals holds 2N alleles in total. A homozygote (AA or aa) contributes two copies of one allele; a heterozygote (Aa) contributes one of each. Tally those copies and divide by 2N to get each allele’s frequency.

p = (2·AA + Aa) ÷ 2N

and q = (2·aa + Aa) ÷ 2N, where N = total individuals; p + q = 1

Worked example

A population of 1,000 individuals: 360 AA, 480 Aa, and 160 aa.

  1. 1
    Find the total allele count. N = 360 + 480 + 160 = 1,000 individuals, so 2N = 2,000 alleles in the gene pool.
  2. 2
    Count the dominant (A) alleles. 2·AA + Aa = 2 × 360 + 480 = 1,200 copies of A.
  3. 3
    Divide to get p. p = 1,200 ÷ 2,000 = 0.6.
  4. 4
    Get q and check. q = (2 × 160 + 480) ÷ 2,000 = 800 ÷ 2,000 = 0.4. Check: p + q = 0.6 + 0.4 = 1.00.

Reading the result, and what to watch for

What it tells you. Once you have p and q, you can compute the genotype counts you would expect if the population were in Hardy-Weinberg equilibrium and compare them to what you actually counted. The bar chart above shows both side by side.

Real-world example. In a wildflower field you score 1,000 plants for a flower-color gene and get the counts above; p = 0.6 says the dominant allele is the more common one in that gene pool that season.

Common mistakes. Don’t count a heterozygote only once — Aa adds one allele to both p and q. And don’t divide by N; the denominator is 2N because each individual carries two alleles.

How each genotype contributes alleles

For one individual of each genotype; multiply by the count you observe.

GenotypeA allelesa alleles
AA (homozygous dominant)20
Aa (heterozygous)11
aa (homozygous recessive)02
How is this different from Hardy–Weinberg?
Here you start from observed genotype counts to find allele frequencies. The Hardy–Weinberg tool goes the other way — from allele frequencies to expected genotype proportions.
Why count heterozygotes once for each allele?
An Aa individual carries one dominant and one recessive allele, so it contributes one copy to p and one to q.
Why divide by 2N instead of N?
Each diploid individual carries two alleles, so the gene pool has 2N alleles total. Dividing by N would double every frequency.
What if observed and expected counts differ a lot?
A large gap suggests the population is not in Hardy–Weinberg equilibrium — selection, drift, migration, or non-random mating may be acting. A chi-square test puts a number on the difference.
Do p and q always add to 1?
For a two-allele gene, yes — every allele in the pool is either A or a, so their frequencies must sum to 1. Use the “Check” line to confirm.
Can I use it for more than two alleles?
This tool models one dominant and one recessive allele. For three or more alleles you would add a frequency term for each and still divide every count by 2N.