Genetics & evolution · HL

Hardy–Weinberg Calculator

Choose the known frequency. The calculator assumes two alleles with p + q = 1.

Your values

Start with the example or enter your own values. Use a dot for decimals and e for scientific notation.

Hardy–Weinberg Calculator inputs

Calculated locally. No account or input upload.

Result & working

Example

The calculator is loading. The worked example is also shown below.

The formula

p + q = 1

p² + 2pq + q² = 1

What the variables mean
SymbolMeaning
p, qAllele frequencies.
p², 2pq, q²Predicted genotype frequencies at equilibrium.

When to use this calculator

The equilibrium prediction depends on assumptions such as random mating and absence of strong evolutionary forces.

Worked example

The page opens with these example values. The result below is pre-generated for reference.

  1. p + q = 1 → p = 0.6, q = 0.4
  2. p² = 0.36
  3. 2pq = 0.48
  4. q² = 0.16
  5. Check: p² + 2pq + q² = 1

p = 0.6, q = 0.4

Common mistakes

  • A dominant phenotype frequency is p² + 2pq, not p² alone.