Boneyard Tools

Hardy-Weinberg Equilibrium Calculator

Enter any one of p, q, the homozygous dominant frequency or the homozygous recessive frequency, and this calculator returns all Hardy-Weinberg genotype frequencies.

How to use the Hardy-Weinberg calculator

  1. Pick which value you know: p, q, the AA frequency or the aa frequency.
  2. Enter that single value as a frequency between 0 and 1.
  3. Read p, q and the AA, Aa and aa genotype frequencies, which always sum to 1.

Examples

From the dominant allele frequency

p = 0.6
q = 0.4, AA = 0.36, Aa = 0.48, aa = 0.16

From the recessive genotype frequency

aa = 0.16
q = 0.4, p = 0.6, AA = 0.36, Aa = 0.48

Frequently asked questions

What is the Hardy-Weinberg equation?

It is p squared plus 2pq plus q squared equals 1, where p and q are allele frequencies. The terms give the AA, Aa and aa genotype frequencies.

How do I find p and q from genotype frequencies?

Take the square root of the AA frequency to get p, or the square root of the aa frequency to get q. The other allele frequency is one minus that value.

Why do the three genotype frequencies add up to one?

Because p plus q equals 1, expanding (p + q) squared gives p squared plus 2pq plus q squared, which also equals 1. Together they cover every genotype.

What assumptions does Hardy-Weinberg make?

It assumes a large population with random mating, no migration, no mutation, no selection and no genetic drift. Real populations only approximate this ideal.

Can I use percentages instead of decimals?

Enter frequencies as decimals between 0 and 1. A genotype seen in 16 percent of a population is 0.16, so use that value, not 16.

Related tools