What allele frequency means and why you count alleles, not people
An allele frequency is the proportion of all copies of a gene in a population that are a particular variant. The unit of accounting is the allele copy, not the individual — and since every diploid individual carries two copies at an autosomal locus, a sample of N people contributes 2N allele copies.
That distinction does all the work. A heterozygote contributes one copy of each allele, so it counts once towards p and once towards q. A homozygote contributes two copies of the same allele. Add them up and the frequency of A is (2 × the number of AA individuals + the number of Aa individuals) divided by 2N. Nothing else is involved: no equilibrium assumption, no square root, no model.
This is the key difference from a Hardy-Weinberg estimate. Hardy-Weinberg infers allele frequencies from a phenotype frequency by assuming the population is in equilibrium. Gene counting measures them from genotypes and assumes nothing. That is why you can legitimately test a sample for Hardy-Weinberg equilibrium using frequencies obtained by counting, but not the other way round — using Hardy-Weinberg to derive the frequencies and then testing the same data for Hardy-Weinberg would be circular.
The formula, and the two heterozygosities it lets you compare
Write the counts as nAA, nAa and naa, with N their sum. Then p = (2nAA + nAa) ÷ 2N and q = (2naa + nAa) ÷ 2N. Computing both and checking that they sum to exactly 1 is a genuine arithmetic check on your counts; at a biallelic locus it must hold to the last digit.
The minor allele frequency is simply the smaller of the two. Variant databases and genotyping arrays report MAF rather than the frequency of a named allele because which allele is called the reference is an arbitrary choice of assembly, while which is rarer is a property of the population.
Two heterozygosity measures are worth separating. Observed heterozygosity Ho = nAa ÷ N is what you saw. Expected heterozygosity He = 2pq is what random mating at the frequencies you just counted would have produced. They answer different questions, and their ratio is informative in a way neither is alone.
Wright's FIS = (He − Ho) ÷ He puts a number on the difference. It runs from +1, when every individual is homozygous despite both alleles being present, through 0 when the sample matches Hardy-Weinberg exactly, to −1, when every individual is heterozygous. Its sign is what you read first: positive means a heterozygote deficit, negative means a heterozygote excess. It is undefined when He = 0, which happens whenever the sample is fixed for a single allele — and that is a real result, not an error.
Worked example: 1,000 individuals genotyped at one locus
You genotype 1,000 individuals and score 320 AA, 460 Aa and 220 aa.
- Total the individuals. N = 320 + 460 + 220 = 1,000.
- Total the allele copies. 2N = 2,000.
- Count copies of A. Each AA gives two, each Aa gives one: (2 × 320) + 460 = 640 + 460 = 1,100.
- Count copies of a. (2 × 220) + 460 = 440 + 460 = 900. Check: 1,100 + 900 = 2,000. ✓
- Divide. p = 1,100 ÷ 2,000 = 0.55; q = 900 ÷ 2,000 = 0.45. They sum to 1.00. ✓
- Minor allele frequency. The smaller of the two: 0.45.
- Observed heterozygosity. Ho = 460 ÷ 1,000 = 0.460, or 46.0%.
- Expected heterozygosity. He = 2 × 0.55 × 0.45 = 0.495, or 49.5%.
- Inbreeding coefficient. FIS = (0.495 − 0.460) ÷ 0.495 = 0.035 ÷ 0.495 = 0.0707.
- Expected counts. AA: 0.552 × 1,000 = 302.5. Aa: 0.495 × 1,000 = 495. aa: 0.452 × 1,000 = 202.5. These sum to 1,000. ✓
Read the result. You observed 460 heterozygotes where 495 were expected, a shortfall of 35, and 320 AA where 302.5 were expected, a surplus of 17.5 — with a matching surplus of 17.5 in the aa class. The alleles have not changed; they have been repackaged, 35 heterozygotes' worth of them, into homozygotes. FIS = 0.071 says that shortfall is about 7% of the expected heterozygosity. Whether a departure of that size is more than sampling would produce is a question for the chi-square goodness-of-fit test, not for the coefficient itself.
How to read p, MAF and the sign of F-IS
Allele frequency has no good or bad value. A frequency of 0.55 is not better or worse than 0.02; it is a description of one population at one locus. What is interpretable is a comparison — the same locus in two populations, or the same population over time.
Minor allele frequency is the number with conventional thresholds. Human genetics has long used a MAF of 0.01 as the working boundary between a common polymorphism and a rare variant, and genome-wide association studies routinely filter out variants below 0.01 or 0.05 because power to detect an effect collapses at very low frequencies. Those thresholds are analytical conventions, not properties of the genome, and different consortia set them differently.
Read the sign of F-IS before its magnitude. A positive value means heterozygotes are scarcer than random mating predicts. The classical explanation is inbreeding, and for a population of pure self-fertilisers FIS heads towards 1. But two duller explanations are far more common in real data: pooling two subpopulations that differ in allele frequency, which produces a heterozygote deficit called the Wahlund effect, and allele dropout in the assay, where a failed amplification turns a true heterozygote into an apparent homozygote. Before you conclude anything about mating systems, rule out the assay.
A negative F-IS is not an error. It means an excess of heterozygotes, produced by recent admixture between differentiated groups, by negative assortative mating, by selection favouring heterozygotes, or simply by small-sample noise — in a sample of 20 individuals, FIS bounces around zero by several hundredths from nothing but chance. The value is bounded below by −1 and above by +1, and it hits those bounds only in the extreme cases where every individual is heterozygous or none is.
Genotype counts, heterozygosity and F-IS at a fixed p of 0.5
| AA | Aa | aa | Observed Ho | Expected He | F-IS | Pattern |
|---|---|---|---|---|---|---|
| 0 | 1,000 | 0 | 1.000 | 0.500 | −1.000 | Every individual heterozygous — an F1 bulk |
| 150 | 700 | 150 | 0.700 | 0.500 | −0.400 | Marked heterozygote excess |
| 250 | 500 | 250 | 0.500 | 0.500 | 0.000 | Exactly Hardy-Weinberg |
| 300 | 400 | 300 | 0.400 | 0.500 | 0.200 | Moderate heterozygote deficit |
| 375 | 250 | 375 | 0.250 | 0.500 | 0.500 | Severe deficit, typical of heavy inbreeding |
| 500 | 0 | 500 | 0.000 | 0.500 | 1.000 | No heterozygotes at all |
Every row contains exactly 1,000 copies of A and 1,000 copies of a. Allele frequency alone cannot distinguish these populations; only the genotype counts can.
Mistakes that corrupt an allele frequency estimate
- Dividing by N instead of 2N. The denominator counts allele copies, not individuals. Using N doubles every frequency and breaks the check that p + q = 1.
- Forgetting that heterozygotes contribute to both alleles. Each Aa individual adds one copy to the A total and one to the a total; it is not neutral.
- Counting phenotypes instead of genotypes. Under complete dominance you cannot see the difference between AA and Aa, so a phenotype tally cannot support gene counting. That case needs the Hardy-Weinberg route and its assumptions.
- Applying it unchanged to X-linked or haploid loci. Males carry a single X, so the denominator is 2 × females + males, not 2N. Mitochondrial and chloroplast loci are haploid and uniparentally inherited.
- Pooling samples from distinct populations. Combining two groups with different allele frequencies produces a heterozygote deficit that has nothing to do with mating within either group.
- Ignoring missing genotypes. Individuals who failed to genotype must be excluded from N, and if failure is correlated with genotype the estimate is biased, not merely noisier.
- Reading F-IS as a significance test. It is an effect size. A value of 0.07 in 20 individuals means almost nothing; the same value in 5,000 is a strong signal. Test it separately.
Where this sits among population genetics tools
Gene counting is the first step in nearly every population-genetic analysis, and the numbers it produces feed directly into the next ones. Once you have p and q you can generate Hardy-Weinberg expectations and test them formally with the genetics chi-square goodness-of-fit calculator, which uses one fewer degree of freedom than a standard goodness-of-fit test because an allele frequency was estimated from the same data.
If you only have a disease incidence rather than genotype counts — the usual situation for a recessive condition, where heterozygotes are invisible — you cannot count genes and must infer them instead through the Hardy-Weinberg equilibrium calculator. If your question is about a specific mating rather than a population, use the Punnett square probability calculator, and if it is about the risk to a particular couple's child, the autosomal recessive carrier risk calculator.
FIS is one of three Wright fixation indices. FIT compares individuals to the total population and FST compares subpopulations to the total, which is the standard measure of population differentiation. This calculator reports FIS only, because it is the one that a single sample at a single locus can support.
Key terms
- Allele copy
- One physical instance of a gene variant. A diploid individual carries two at each autosomal locus, which is why the denominator of an allele frequency is 2N.
- Minor allele frequency (MAF)
- The frequency of the less common allele at a locus. Reported by variant databases because it does not depend on which allele the reference assembly happens to carry.
- Observed heterozygosity (Ho)
- The proportion of individuals actually scored as heterozygous — a direct count, requiring no model.
- Expected heterozygosity (He)
- 2pq, the heterozygote frequency random mating would produce at the counted allele frequencies. Also called gene diversity.
- F-IS
- Wright's inbreeding coefficient within a subpopulation, (He − Ho)/He. Positive for a heterozygote deficit, negative for an excess, bounded by −1 and +1.
- Allele dropout
- A genotyping failure in which one allele does not amplify, so a true heterozygote is called as a homozygote. It inflates F-IS and is a leading cause of apparent heterozygote deficits.
