This Hardy-Weinberg calculator computes allele and genotype frequencies for a population in genetic equilibrium: enter the recessive allele frequency (or the recessive phenotype share) and get p, q, p², 2pq and q².

p (dominant allele)–
q (recessive allele)–
p² — AA–
2pq — Aa carriers–
q² — aa–

The Hardy-Weinberg Principle

In 1908 Hardy and Weinberg independently proved a beautiful null result: if nothing disturbs a population, allele frequencies stay constant generation after generation, and genotype frequencies settle into the binomial pattern p² + 2pq + q² = 1 (with p + q = 1). It is essentially a two-allele Punnett Square played at population scale — the same cross, with frequencies instead of four boxes. This calculator is part of our Biology Calculators collection.

Worked Example (Verified)

Suppose the recessive allele frequency is q = 0.4:

  • p = 1 − 0.4 = 0.6
  • AA (p²) = 36% — homozygous dominant
  • Aa (2pq) = 48% — carriers, who look dominant but pass the recessive on
  • aa (q²) = 16% — homozygous recessive, the only group whose phenotype reveals its genotype
  • In 1,000 people: 360 AA, 480 Aa, 160 aa — note how the recessive trait shows in 16% while nearly half the population silently carries the allele. That asymmetry explains how recessive conditions persist.

The Five Equilibrium Conditions (i.e., the Ways Evolution Happens)

The theorem’s power is its assumptions — each violation is a mechanism of evolution:

  • No mutation — alleles stop converting into each other
  • Random mating — no mate choice by genotype
  • No gene flow — no migration in or out
  • Infinite (very large) population — no genetic drift
  • No natural selection — all genotypes survive and reproduce equally

Real populations violate at least one, always — which is the point: Hardy-Weinberg is the baseline that lets biologists detect and measure evolution when frequencies depart from it.

Related Tools

Frequently Asked Questions

What is the Hardy-Weinberg equation?

p² + 2pq + q² = 1, where p and q are the dominant and recessive allele frequencies (p + q = 1), and the three terms are the expected genotype frequencies AA, Aa and aa.

How do I find q from the recessive phenotype?

The recessive phenotype frequency equals q² (only aa shows it), so q = √(phenotype frequency). If 16% show the trait, q = √0.16 = 0.4 — the calculator’s second mode does exactly this.

Why is 2pq the carrier frequency?

Heterozygotes form two ways — A from mother/a from father, or the reverse — each with probability pq. Total: 2pq.

What does it mean if a population is not in Hardy-Weinberg equilibrium?

One of the five conditions is being violated — selection, drift, migration, mutation or non-random mating is acting. Comparing observed genotype counts to the calculator’s expectations is how researchers detect it (often with a chi-square test).

Can allele frequencies change while genotype frequencies stay in HW proportions?

Yes — HW describes how genotypes form from alleles in one generation of random mating. Allele frequencies can drift or be selected between generations while each generation’s genotypes still follow p², 2pq, q² from its own p and q.

Is this Hardy-Weinberg calculator free?

Yes — free, instant, no sign-up.