Allele Frequency (Hardy-Weinberg)

Calculate allele frequencies p and q.

Result:

--

Decoding the Gene Pool: The Maths of Evolution

Population genetics is the study of how genetic composition changes over time. At the heart of this field lies the Hardy-Weinberg Principle, a mathematical model that provides a baseline for understanding evolutionary forces. Our Allele Frequency Calculator allows biology students and researchers to instantly compute the values of p and q from raw population data.

The Constants of Life: p and q

In a simplified genetic model with only two alleles for a trait (Dominant "A" and Recessive "a"), the sum of their frequencies must always equal 1 (or 100%).
$$p + q = 1$$
- p: The frequency of the dominant allele (A).
- q: The frequency of the recessive allele (a).
If you know one, you instantly know the other ($p = 1 - q$).

The Genotypes: $p^2 + 2pq + q^2 = 1$

While alleles are invisible (hidden inside DNA), genotypes are often visible or testable. The Hardy-Weinberg equation predicts how these alleles are distributed into individuals:
- $p^2$ (Homozygous Dominant): Individuals with "AA".
- $2pq$ (Heterozygous): Individuals with "Aa" (Carriers).
- $q^2$ (Homozygous Recessive): Individuals with "aa".

Example:
If 9% of a population has blue eyes (recessive trait, aa), then $q^2 = 0.09$.
This means $q = \sqrt{0.09} = 0.3$.
Therefore, $p = 1 - 0.3 = 0.7$.
Carriers ($2pq$) = $2 \times 0.7 \times 0.3 = 0.42$ or 42%.
Even though blue eyes are rare (9%), nearly half the population (42%) carries the gene!

Applications in Medicine

This calculator isn't just for biology exams; it's used in genetic counseling.
For diseases like Cystic Fibrosis (recessive), knowing the incidence rate ($q^2$) allows scientists to estimate how many healthy people are silent carriers ($2pq$). This risk assessment is vital for prospective parents from high-risk populations.

Assumptions of the Model

The Hardy-Weinberg equilibrium assumes a "perfect" static population:
1. No mutation.
2. Random mating (no sexual selection).
3. No gene flow (no migration in or out).
4. Infinite population size (no genetic drift).
5. No natural selection.
In the real world, these conditions are rarely met, which is exactly why allele frequencies change—evolution is happening!