Hardy–Weinberg Calculator

The Hardy–Weinberg principle says that, with no evolutionary forces at work, a population's allele and genotype frequencies stay the same from generation to generation. With two alleles, p + q = 1 and the genotype shares are p², 2pq and q². Enter p, or the share of the population showing the recessive trait, to get every frequency. With p = 0.8, q is 0.2.

From p
0.2

With p = 0.8, the other allele has q = 0.2; the genotype shares follow p² + 2pq + q² = 1.

Homozygous dominant (p²) 0.64
Heterozygous (2pq) 0.32
Homozygous recessive (q²) 0.04

How to use the Hardy–Weinberg equation

Start from p: q = 1 − p, then the genotype shares are p², 2pq and q². If you only know how many show the recessive trait, that share is q², so q = √q² and p = 1 − q. You can type shares as decimals (0.04) or percentages (4%).

q = 1 − p; p² + 2pq + q² = 1

Here it is with your numbers:

  1. The other allele, q: 1 − 0.8 = 0.2.
  2. Homozygous dominant, p²: 0.8² = 0.64.
  3. Heterozygous carriers, 2pq: 2 × 0.8 × 0.2 = 0.32.
  4. Homozygous recessive, q²: 0.2² = 0.04.

It means with p = 0.8, the other allele has q = 0.2; the genotype shares follow p² + 2pq + q² = 1.

Source OpenStax Biology 2e · 19.1 Population Evolution ↗

Hardy–Weinberg example

In plants where violet flowers (V) are dominant over white (v), with p = 0.8 and q = 0.2 in 500 plants, you would expect 320 VV, 160 Vv and 20 vv: 480 violet plants and 20 white ones.

The principle assumes a very large population with no mutation, migration or selection. No real population meets that exactly, but it is the baseline that real changes are measured against.

FAQs

What is the Hardy-Weinberg equation?

p² + 2pq + q² = 1, where p and q are the frequencies of the two alleles (p + q = 1). p² is the share of homozygous dominant individuals, 2pq heterozygous and q² homozygous recessive.

Source OpenStax Biology 2e · 19.1 Population Evolution ↗

How do I calculate Hardy-Weinberg expectations?

Square each allele frequency for the two homozygous groups and use 2pq for the heterozygotes. With p = 0.8 and q = 0.2 in 500 plants, expect 320 VV (0.64), 160 Vv (0.32) and 20 vv (0.04).

How do you determine if a population is in Hardy-Weinberg equilibrium?

Compare the genotype counts you observe with p², 2pq and q² from the allele frequencies. If they differ, some evolutionary force, such as selection, mutation, migration or a small population, may be acting.

What is a Hardy-Weinberg calculator?

A tool that turns one allele frequency (or the share showing the recessive trait) into all the allele and genotype frequencies expected at equilibrium, with the working shown.

Sources

Related calculators