Allele Frequency Calculator
Count homozygous and heterozygous individuals to get the dominant and recessive allele frequencies and the genotype frequencies of a population.
How it works
p = (2·AA + Aa) ÷ (2·total) · q = 1 − p · total = AA + Aa + aa
Every individual carries two alleles, so a population of N individuals holds 2N alleles at a gene. Each AA contributes two dominant alleles and each Aa contributes one, so counting alleles directly gives the dominant frequency p = (2·AA + Aa) ÷ 2N. The recessive frequency q is whatever is left over, 1 − p. This gene-counting method works from observed genotype counts and makes no equilibrium assumption.
Worked example
For 40 AA, 40 Aa and 20 aa individuals, the total is 100, so there are 200 alleles. Dominant alleles number 2×40 + 40 = 120, giving p = 120 ÷ 200 = 0.60 and q = 1 − 0.60 = 0.40.
Sources: Allele frequency — Wikipedia
Frequently asked questions
How is this different from Hardy-Weinberg?
This counts alleles directly from observed genotype numbers, so it works for any population. Hardy-Weinberg instead predicts what the genotype frequencies should be from p and q under equilibrium — comparing the two reveals whether a population is in equilibrium.
Why multiply by two?
Because each diploid individual has two copies of the gene, the total number of alleles is twice the number of individuals. Homozygous dominants contribute two dominant alleles each, so they are weighted by two in the numerator.
Do the allele frequencies always add to 1?
Yes. With only two alleles at the locus, p + q = 1 by definition, because every allele is either dominant or recessive. If you find more than two alleles, each gets its own frequency and they all sum to 1.
Related calculators
Educational estimate, not medical advice — verify formulas, units and assumptions for your specific case.