← HSC Biology calculators

NSW · HSCBiology

Hardy-Weinberg equilibrium calculator

Enter any of p, q, p², 2pq, or q² and get all five quantities. Includes a sanity check that p² + 2pq + q² = 1.

Inputs

Hardy-Weinberg: p + q = 1, p² + 2pq + q² = 1.

Result
p (dominant allele) = 80.00%
q (recessive allele) = 20.00%

homozygous dominant (AA) = 64.00%
2pq heterozygote (Aa) = 32.00%
homozygous recessive (aa) = 4.00%

Check: p² + 2pq + q² = 1.000 (should be 1.000).

How this calculator works

The calculator picks the simplest relation given your known quantity. From q² you take the square root to get q, then p = 1 − q, then everything else follows. The final check confirms that the genotype frequencies sum to exactly 1.

Common questions

What is the Hardy-Weinberg equilibrium?
An idealised state in which allele and genotype frequencies don't change between generations, given p + q = 1 and p² + 2pq + q² = 1.
What are the five Hardy-Weinberg assumptions?
No mutation, no migration, no natural selection, random mating, and a very large population. Violating any of these causes evolutionary change.
How do I find q from the frequency of affected individuals?
For an autosomal recessive trait, affected individuals are q². So q = √(frequency affected), and p = 1 − q.
What is the carrier frequency?
2pq. If 1 in 10000 people is affected by a recessive disease, q² = 0.0001, so q = 0.01, p = 0.99, and the carrier frequency 2pq ≈ 2%.