Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Allele Frequencies
p = 0.7  |  q = 0.3
p + q = 1
Genotype Frequency Percent
Homozygous dominant (p²) 0.49 49%
Heterozygous (2pq) 0.42 42%
Homozygous recessive (q²) 0.09 9%

What is the Hardy-Weinberg Equilibrium?

The Hardy-Weinberg principle describes a population that is not evolving — where allele and genotype frequencies stay constant from generation to generation. For a gene with two alleles, the dominant allele has frequency p and the recessive allele has frequency q. Since these are the only two alleles, they must add up to one: \(p + q = 1\). The equilibrium holds only when there is no selection, mutation, migration, genetic drift, and mating is random.

How to use this calculator

Choose whether you know the dominant allele frequency (\(p\)) or the recessive allele frequency (\(q\)), then enter a value between 0 and 1. The calculator finds the missing allele frequency and the three expected genotype frequencies: homozygous dominant (\(p^2\)), heterozygous (\(2pq\)), and homozygous recessive (\(q^2\)), each shown as a proportion and a percentage of the population.

The formula explained

Expand the binomial \((p + q)^2 = 1\) to get $$p^2 + 2pq + q^2 = 1$$ Each term is a genotype frequency: \(p^2\) is the fraction of individuals carrying two dominant alleles, \(q^2\) is the fraction carrying two recessive alleles, and \(2pq\) is the fraction of heterozygotes. Often you measure \(q^2\) (the visible recessive phenotype, e.g. an affected individual) and back-calculate \(q = \sqrt{q^2}\), then \(p = 1 - q\).

Advertisement
Parabolic curves of genotype frequencies plotted against allele frequency p from 0 to 1
How the three genotype frequencies change as allele frequency \(p\) varies from 0 to 1.
Bar showing allele frequencies p and q combining into genotype frequency bands p-squared, 2pq, and q-squared
The two allele frequencies (\(p\) and \(q\)) determine the three genotype frequencies \(p^2\), \(2pq\) and \(q^2\).

Worked example

Suppose the recessive allele frequency \(q = 0.3\). Then \(p = 1 - 0.3 = 0.7\). The genotype frequencies are \(p^2 = 0.49\) (49% homozygous dominant), $$2pq = 2 \times 0.7 \times 0.3 = 0.42$$ (42% heterozygous), and \(q^2 = 0.09\) (9% homozygous recessive). These sum to $$0.49 + 0.42 + 0.09 = 1.00,$$ confirming the population is in equilibrium.

FAQ

What if I only know the number of affected individuals? The recessive phenotype corresponds to \(q^2\). Divide affected individuals by total population to get \(q^2\), then take its square root to find \(q\) and enter that value.

Why do the genotype frequencies sum to 1? Because they represent all possible genotype combinations in the population, so their proportions must cover 100% of individuals.

Are carriers the heterozygotes? Yes — for a recessive trait, carriers have one dominant and one recessive allele, the \(2pq\) group.

Last updated: