DNA

Biology

Hardy-Weinberg Calculator

Calculate the complementary allele frequency, expected AA, Aa, and aa individuals, and heterozygote percentage. The allele-pair square visual partitions the full population into the three expected genotype regions.

Allele a frequency (q)-
Expected AA individuals-
Expected Aa individuals-
Expected aa individuals-
Expected heterozygotes-

Decision view

Hardy-Weinberg allele-pair square

Hardy-Weinberg allele-pair squareThe p × q allele space partitions into p², 2pq, and q² expected genotype regions.
Exact scenario comparisonAllele A frequency (p) changes while all other entered assumptions remain constant.
Allele A frequency (p)Allele a frequency (q)Expected AA individualsExpected Aa individualsExpected aa individualsExpected heterozygotes

How to use Hardy-Weinberg Calculator

  1. Enter one allele frequency between zero and one.
  2. Use the same locus, population definition, sampling period, and allele coding.
  3. Compare observed genotype counts with expected counts using an appropriate statistical test and sampling model.

Calculator guide

Understanding Hardy-Weinberg Calculator

Hardy-Weinberg proportions form a null model: if allele frequencies are p and q, expected genotype shares are p², 2pq, and q² under specific population assumptions.

Complement For two alleles, q equals one minus p.
Punnett square p², 2pq, and q² fill the complete allele-pair space.
Expected counts Proportions multiply by modeled population.
Test required Observed counts are needed to assess deviation.

Calculation method

How the calculation works

Apply p plus q equals one and the Hardy-Weinberg genotype proportions p squared, 2pq, and q squared to the entered population. Set q equal to one minus p, then multiply p², 2pq, and q² by the entered diploid population.

Population genetics

Separate expectation from evidence

Calculated genotype counts are a null reference, not observations.

Observed sample Collect genotype counts under a documented sampling design.
Expected cells Calculate from allele frequencies estimated consistently.
Goodness-of-fit Use a suitable exact or chi-square procedure.
Biological interpretation Consider structure and technical error before selection.

Worked situations

Practical examples

  • With p = 0.6, q = 0.4.
  • Expected shares are 36% AA, 48% Aa, and 16% aa.
  • In a modeled population of 1,000, those correspond to 360, 480, and 160 individuals.

Better inputs

Useful tips

  • Retain unrounded expected counts for statistical testing.
  • Distinguish allele frequencies from genotype frequencies.
  • Investigate sampling, structure, selection, migration, mutation, and genotyping error before causal interpretation.

Before relying on the result

Limitations and common mistakes

  • The calculator supplies expected proportions, not a test of equilibrium.
  • Random mating, large population, no selection, no migration, and no mutation are assumed.
  • Finite-sample variation, relatedness, substructure, sex linkage, multiple alleles, and genotyping uncertainty are excluded.

Reference

Key terms

Allele frequency
Share of gene copies represented by one allele.
Genotype frequency
Share of individuals carrying a genotype.
Heterozygote
Individual carrying one copy of each modeled allele.
Equilibrium expectation
Null-model genotype proportions derived from allele frequencies.

Important note

Calculated from the entered values using the displayed biological or statistical model. Study design, sampling, measurement quality, and biological variation affect interpretation.

Frequently asked questions

Does matching p², 2pq, and q² prove equilibrium?

No. It means observed data may be consistent with the null model within sampling uncertainty.

Why is heterozygosity highest at p = 0.5?

The product 2p(1-p) reaches its maximum when both alleles are equally frequent.

Can p and q be genotype frequencies?

No. They represent allele frequencies.

Does this support more than two alleles?

No. The page uses a two-allele model.