Skip to main content

Allele Frequency Calculator

The Allele Frequency Calculator determines gene pool proportions (p and q) and evaluates Hardy-Weinberg equilibrium for bi-allelic genetic systems.

Choose how your genetic data was sampled.

Number of observed homozygous dominant individuals in your sample.

Number of observed heterozygous carrier individuals.

Number of observed individuals expressing the recessive phenotype.

Used only when calculating from recessive phenotype mode.

Calculated Result
p = 0.6786 | q = 0.3214

Allele Frequencies (p : q)

Dominant Allele Frequency (p)

0.6786 (67.86%)

Recessive Allele Frequency (q)

0.3214 (32.14%)

Homozygous Dominant (p²)

46.05% (~64 indiv.)

Heterozygous Carriers (2pq)

43.62% (~61 indiv.)

Homozygous Recessive (q²)

10.33% (~14 indiv.)

Total Sampled Population

140 individuals (280 alleles)

Hardy-Weinberg Equilibrium (χ²)

4.601 — Deviates from Equilibrium (p ≤ 0.05)

Population Deviates from HWE — Observed genotype proportions differ significantly from expected random mating frequencies, suggesting selection, non-random mating, or migration.

Calculation Breakdown

  1. 1. Calculate Total Population & Allele PoolTotal N = 140 individuals | Total Gene Pool = 2 × 140 = 280 alleles
  2. 2. Determine Allele Frequencies (p and q)p = 0.6786 (67.86%) | q = 1 - p = 0.3214 (32.14%)
  3. 3. Compute Expected Hardy-Weinberg Genotype Proportionsp² (AA) = 46.05% | 2pq (Aa) = 43.62% | q² (aa) = 10.33%
  4. 4. Chi-Square Goodness-of-Fit Evaluationχ² = 4.601 (Critical threshold at df=1, α=0.05 is 3.841) → Reject H₀ (Significant disequilibrium)

Expected Hardy-Weinberg Genotype Proportions

Interactive visualization based on your current inputs

Genotype Frequency
0.012233546AA (Dominant)Aa (Carrier)aa (Recessive)GenotypePopulation Frequency (%)

What Is the Allele Frequency Calculator?

The Allele Frequency Calculator is a specialized population genetics tool designed to measure the distribution of genetic variants (alleles) across biological populations.

In population genetics, evolution is formally defined as any change in allele frequencies over successive generations. By calculating baseline allele frequencies (p and q), geneticists, wildlife conservationists, and epidemiologists can detect whether evolutionary forces such as natural selection, genetic drift, non-random mating, or migration are actively shaping a population.

How Does the Allele Frequency Calculator Work?

Every diploid organism inherits two alleles for every autosomal genetic locus — one from the maternal parent and one from the paternal parent. In a gene pool with two alternative alleles (A and a), their proportions must always sum to 1.0 (100% of the allele pool).

When you supply direct genotype counts (AA, Aa, aa), the calculator counts each allele directly: homozygous individuals carry two copies of an allele, while heterozygotes carry one copy. Dividing each allele count by the total gene pool (2N) yields the exact observed frequencies of p and q.

Under the Hardy-Weinberg principle, if mating is random and evolutionary pressures are absent, the expected genotype frequencies in the subsequent generation follow the binomial expansion: p² (AA) + 2pq (Aa) + q² (aa) = 1.0.

Our tool computes both the observed proportions and the expected theoretical counts, then automatically evaluates the Chi-square (χ²) goodness-of-fit statistic to determine whether observed discrepancies are statistically significant.

Allele Frequency Calculator Formula & Variables

The core mathematical equation utilized by this calculator is expressed as:

p + q = 1 and p² + 2pq + q² = 1

Variable Definitions

SymbolVariable Meaning & Units
pFrequency of the dominant allele (A) in the gene pool
qFrequency of the recessive allele (a) in the gene pool
p²Expected frequency of homozygous dominant genotype (AA)
2pqExpected frequency of heterozygous genotype (Aa)
q²Expected frequency of homozygous recessive genotype (aa)

In a diploid population of N individuals, each individual carries 2 alleles, yielding 2N total alleles. The dominant allele frequency p is (2×AA + Aa) ÷ 2N, and the recessive frequency q is (2×aa + Aa) ÷ 2N. The Hardy-Weinberg binomial expansion models the expected genotype proportions under random mating.

How to Use the Allele Frequency Calculator

  1. Select your calculation mode: Choose "Observed Genotype Counts" if you have laboratory or field counts of all three genotypes (AA, Aa, aa), or "Recessive Phenotype Count" if you only know the frequency of individuals expressing the recessive trait.
  2. For Genotype Counts mode: Enter the observed number of homozygous dominant (AA), heterozygous (Aa), and homozygous recessive (aa) individuals.
  3. For Recessive Phenotype mode: Enter the count of homozygous recessive individuals and your total sample size.
  4. Click Calculate to see the dominant frequency (p), recessive frequency (q), expected genotype proportions, and the Chi-square equilibrium assessment.
  5. Examine the interactive bar chart below the results to visualize how genotype proportions distribute across the population.

Step-by-Step Example Calculation

Genotype Sample of 140 Wildflower Plants

Input Values:

mode:counts
homoDominant:70
heterozygous:50
homoRecessive:20
Worked Steps: Total population = 70 + 50 + 20 = 140 plants (280 alleles). Dominant allele count = 2(70) + 50 = 190. Recessive allele count = 2(20) + 50 = 90. Dominant frequency p = 190 ÷ 280 = 0.6786 (67.86%). Recessive frequency q = 90 ÷ 280 = 0.3214 (32.14%). Expected genotype frequencies: AA = 46.05%, Aa = 43.62%, aa = 10.33%. Chi-square test gives χ² = 3.65 (below critical value 3.841), indicating this population is in Hardy-Weinberg equilibrium.

Understanding Your Result

Allele Frequencies (p and q): Values range between 0.0 and 1.0. If p = 0.70, it means 70% of all alleles in the gene pool are dominant A, and the remaining 30% (q = 0.30) are recessive a.

Carrier Frequency (2pq): Represents the proportion of healthy individuals carrying one copy of the recessive allele. In human genetics, this identifies how many individuals are carriers for autosomal recessive conditions.

Chi-Square (χ²) Statistic: A test of conformity to equilibrium. If χ² ≤ 3.841 (at the 5% significance level, df = 1), the population does not deviate significantly from Hardy-Weinberg equilibrium. If χ² > 3.841, the population is experiencing evolutionary disturbance.

Factors That Affect the Result

  • Natural Selection: Unequal reproductive success or survival rates between genotypes directly skews allele frequencies over generations.
  • Genetic Drift: In small or isolated populations, random sampling errors can cause sudden, non-adaptive shifts in allele frequencies.
  • Gene Flow & Migration: Individuals entering or leaving the population introduce or remove alleles, disrupting local equilibrium.
  • Non-Random / Assortative Mating: Inbreeding or preference for specific physical traits increases homozygosity and depletes heterozygotes.
  • Mutation Pressure: Spontaneous mutations convert one allele into another, introducing novel variation into the gene pool.

When Should You Use This Calculator?

  • Medical Genetics & Public Health: Estimating carrier frequencies for genetic conditions such as cystic fibrosis, sickle cell anemia, or Tay-Sachs disease.
  • Conservation Biology: Monitoring genetic diversity and inbreeding levels in endangered wildlife breeding programs.
  • Forensic Science: Calculating the rarity of specific DNA profile matches across demographic databases.
  • Academic Education: Solving genetics problem sets, laboratory simulations, and university biology examinations.

Assumptions & Limitations

  • Assumes a strictly bi-allelic genetic locus with two segregating alleles (A and a). For multi-allelic systems (like ABO blood types), trinomial expansions are required.
  • Recessive phenotype mode assumes the population is already in Hardy-Weinberg equilibrium in order to extract q as the square root of q².
  • Sex-linked (X-linked) genes follow different frequency dynamics between males and females and are not modeled by this autosomal equation.

Frequently Asked Questions

Calculation Accuracy & Reference Note

Calculations utilize the standard Hardy-Weinberg population genetics equations and Pearson Chi-Square test with 1 degree of freedom (critical threshold 3.841 at α = 0.05).

Standard Reference: Hardy-Weinberg Principle; Principles of Population Genetics (Hartl & Clark).