Allele Frequency Calculator for a Population
Frequency of allele A (p)
- Frequency of allele a (q)
- Result
- Expected heterozygotes 2pq
- Result
- Observed heterozygote share
- Result
This calculator works out allele frequencies in a population from genotype counts for one gene with two alleles. Enter how many individuals are AA, Aa and aa, and you get p and q plus the expected and observed share of heterozygotes.
Formula
Each individual carries two alleles, so p = (2 × NAA + NAa) ÷ (2 × N) and q = 1 − p, where N is the total number of individuals. Under Hardy-Weinberg equilibrium the expected genotype shares are p², 2pq and q².
- NAA, NAa, Naa: counts of each genotype
- p, q: allele frequencies, between 0 and 1
Worked Example
350 AA, 500 Aa and 150 aa individuals (N = 1,000).
- A alleles = 2 × 350 + 500 = 1,200 out of 2,000; p = 0.6000
- q = 1 − 0.6 = 0.4000
- Expected heterozygotes 2pq = 2 × 0.6 × 0.4 = 0.4800
- Observed heterozygotes = 500 ÷ 1,000 = 0.5000
Limits and common mistakes
- The formula assumes one gene with two alleles. More alleles need a count per allele.
- A gap between expected and observed heterozygotes hints that the population is not in equilibrium; testing it properly needs a chi-square test.
- Count individuals, not alleles, in the inputs.
Formula used
in daa | Individuals with genotype AA | individuals | 350 | 0 in dab | Individuals with genotype Aa | individuals | 500 | 0 in dbb | Individuals with genotype aa | individuals | 150 | 0 out p | Frequency of allele A (p) | - | (2 * daa + dab) / (2 * (daa + dab + dbb)) | 4 out q | Frequency of allele a (q) | - | 1 - p | 4 out het | Expected heterozygotes 2pq | - | 2 * p * q | 4 out obs | Observed heterozygote share | - | dab / (daa + dab + dbb) | 4
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.